/* App blocks: used by the public app page and the app builder preview. Colours come from --a-* variables. */
.afa-blocks { color: var(--a-text, #0a0a0a); font-family: Manrope, system-ui, sans-serif; }
.afa-al-left { text-align: left; } .afa-al-center { text-align: center; } .afa-al-right { text-align: right; }
.afa-img { max-width: 100%; height: auto; border-radius: 12px; display: inline-block; }
.afa-w-25 { width: 25%; } .afa-w-50 { width: 50%; } .afa-w-75 { width: 75%; } .afa-w-100 { width: 100%; }
.afa-img { width: 50%; }
.afa-h { margin: 0; font-weight: 700; line-height: 1.2; color: var(--a-text, #0a0a0a); }
.afa-h-lg { font-size: 26px; } .afa-h-md { font-size: 19px; }
.afa-text { margin: 0; font-size: 15px; line-height: 1.55; opacity: .85; white-space: normal; }
.afa-hr { border: 0; border-top: 1px solid currentColor; opacity: .15; margin: 4px 0; }
.afa-sp-sm { height: 4px; } .afa-sp-md { height: 16px; } .afa-sp-lg { height: 36px; }
.afa-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; min-height: 112px; height: 100%;
  padding: 16px 10px; background: var(--a-card, #fff); color: var(--a-text, #0a0a0a); border: 1px solid rgba(0,0,0,.08); border-radius: 18px;
  text-decoration: none; box-shadow: 0 1px 2px rgba(0,0,0,.04); transition: transform .1s ease; }
a.afa-tile:hover { color: var(--a-text, #0a0a0a); transform: translateY(-1px); border-color: var(--a-primary, #0a0a0a); }
a.afa-tile:focus-visible { outline: 3px solid var(--a-primary, #0a0a0a); outline-offset: 2px; }
.afa-tile-wide { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; row-gap: 2px; align-content: center; justify-items: start; text-align: left; min-height: 72px; padding: 14px 18px; }
.afa-tile-wide > .afa-tile-icon, .afa-tile-wide > .afa-tile-img { grid-row: 1 / span 2; }
.afa-tile-wide .afa-tile-label { grid-column: 2; align-self: end; }
.afa-tile-wide .afa-tile-sub, .afa-tile-wide .afa-tile-warn { grid-column: 2; align-self: start; }
.afa-tile-wide:not(:has(.afa-tile-sub, .afa-tile-warn)) .afa-tile-label { grid-row: 1 / span 2; align-self: center; }
.afa-tile-icon { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 14px; background: var(--a-primary, #0a0a0a); color: var(--a-card, #fff); flex: none; }
.afa-tile-img { width: 48px; height: 48px; object-fit: cover; border-radius: 14px; flex: none; }
.afa-tile-label { font-weight: 600; font-size: 15px; line-height: 1.25; }
.afa-tile-sub { font-size: 12px; opacity: .65; line-height: 1.3; }
.afa-tile-empty { opacity: .6; border-style: dashed; }
.afa-tile-warn { font-size: 11px; font-weight: 600; color: #b45309; }
.afa-placeholder { text-align: center; padding: 22px 12px; font-size: 13px; opacity: .6; border: 1px dashed rgba(0,0,0,.2); border-radius: 12px; }
.afa-sp-show { border: 1px dashed rgba(0,0,0,.15); border-radius: 6px; }

/* public app page: full screen on a phone, inside a phone frame on a computer */
body.afa-page { margin: 0; background: var(--a-bg, #f4f4f5); display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.afa-wrap { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; background-color: var(--a-bg, #f4f4f5); padding: 0 16px 40px; padding-top: env(safe-area-inset-top); position: relative; }
.afa-wrap > .afa-pgs, .afa-wrap > .afa-install, .afa-wrap > .afa-msg, .afa-wrap > .afa-powered { max-width: 520px; margin-left: auto; margin-right: auto; }
.afa-pgs { padding-top: 20px; }
.afa-preview-bar { flex: none; }
@media (min-width: 700px) {
  body.afa-page { background: #fff; height: auto; min-height: 100vh; display: block; padding: 24px 16px; }
  body.afa-page .afa-preview-bar { max-width: 640px; margin: 0 auto 18px; }
  .afa-wrap { width: 390px; height: min(844px, calc(100vh - 48px)); margin: 0 auto; border: 12px solid #0a0a0a; border-radius: 52px; box-shadow: 0 24px 60px rgba(0,0,0,.18); }
  .afa-has-bar .afa-wrap { height: min(844px, calc(100vh - 120px)); }
  .afa-wrap::-webkit-scrollbar { width: 0; height: 0; }
  .afa-wrap { scrollbar-width: none; }
}
.afa-install { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; padding: 10px 12px; background: var(--a-card, #fff); color: var(--a-text, #0a0a0a);
  border: 1px solid rgba(0,0,0,.08); border-radius: 14px; font-size: 13px; }
.afa-install[hidden] { display: none; }
.afa-install span { flex: 1; }
.afa-install button { font: inherit; font-weight: 600; border: 0; border-radius: 10px; padding: 7px 12px; background: var(--a-primary, #0a0a0a); color: var(--a-card, #fff); cursor: pointer; }
.afa-install .afa-x { background: transparent; color: inherit; padding: 4px 8px; }
.afa-powered { text-align: center; margin: 28px 0 0; font-size: 12px; }
.afa-powered a { color: var(--a-text, #0a0a0a); opacity: .55; text-decoration: none; }
.afa-msg { text-align: center; padding: 60px 16px; color: var(--a-text, #0a0a0a); font-family: Manrope, system-ui, sans-serif; }
.afa-preview-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 0; padding: 10px 14px;
  background: #fff; color: #0a0a0a; border-bottom: 1px solid rgba(0,0,0,.12); font-size: 14px; font-family: Manrope, system-ui, sans-serif; }
.afa-preview-bar a { color: #0a0a0a; }
.afa-preview-bar button { font: inherit; font-weight: 600; border: 0; border-radius: 10px; padding: 7px 14px; background: #0a0a0a; color: #fff; cursor: pointer; }
.afa-preview-bar .afa-get { font-weight: 600; border-radius: 10px; padding: 7px 14px; background: #0a0a0a; color: #fff; text-decoration: none; }

@media (min-width: 700px) { .afa-preview-bar { border: 1px solid rgba(0,0,0,.12); border-radius: 12px; } }

/* top bar, menu and pages */
.afa-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 6px; margin: 0 -16px; padding: 10px 12px 10px 18px; background: var(--a-card, #fff); color: var(--a-text, #0a0a0a); border-bottom: 1px solid rgba(0,0,0,.08); font-family: Manrope, system-ui, sans-serif; }
.afa-top-name { font-weight: 700; font-size: 16px; color: inherit; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.afa-top-sp { flex: 1; }
.afa-top-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; color: inherit; cursor: pointer; list-style: none; }
.afa-top-btn::-webkit-details-marker { display: none; }
.afa-top-btn:hover, .afa-menu[open] > .afa-top-btn { background: rgba(0,0,0,.06); }
.afa-count { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--a-primary, #0a0a0a); color: var(--a-card, #fff); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.afa-count[hidden] { display: none; }
.afa-menu { position: relative; }
.afa-menu-list { position: absolute; right: 0; top: 46px; min-width: 190px; padding: 6px; background: var(--a-card, #fff); border: 1px solid rgba(0,0,0,.1); border-radius: 14px; box-shadow: 0 12px 30px rgba(0,0,0,.15); display: grid; }
.afa-menu-list a { padding: 10px 12px; border-radius: 10px; color: var(--a-text, #0a0a0a); text-decoration: none; font-weight: 600; font-size: 15px; }
.afa-menu-list a:hover, .afa-menu-list a:focus-visible { background: rgba(0,0,0,.06); }
.afa-pg { display: none; scroll-margin-top: 70px; }
.afa-pg:target, .afa-pgs:not(:has(.afa-pg:target)) > #p-home { display: block; }

/* product, cart and checkout */
.afa-prod { height: 100%; display: flex; flex-direction: column; background: var(--a-card, #fff); color: var(--a-text, #0a0a0a); border: 1px solid rgba(0,0,0,.08); border-radius: 16px; overflow: hidden; }
.afa-prod-img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.afa-prod-noimg { background: rgba(0,0,0,.06); }
.afa-prod-body { flex: 1; display: flex; flex-direction: column; gap: 4px; padding: 10px 12px 12px; text-align: left; }
.afa-prod-name { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.25; color: inherit; }
.afa-prod-desc { margin: 0; font-size: 12px; line-height: 1.4; opacity: .7; }
.afa-prod-price { margin: 2px 0 6px; font-size: 16px; font-weight: 700; }
.afa-add, .afa-btn { margin-top: auto; font: inherit; font-weight: 700; font-size: 14px; border: 0; border-radius: 10px; padding: 9px 12px; background: var(--a-primary, #0a0a0a); color: var(--a-card, #fff); cursor: pointer; }
.afa-add.afa-added { opacity: .75; }
.afa-cartpg { color: var(--a-text, #0a0a0a); font-family: Manrope, system-ui, sans-serif; }
.afa-cart-list { display: grid; gap: 10px; margin: 14px 0; }
.afa-ci { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--a-card, #fff); border: 1px solid rgba(0,0,0,.08); border-radius: 14px; }
.afa-ci-name { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; }
.afa-ci-name small { display: block; font-weight: 400; opacity: .7; }
.afa-ci button { font: inherit; width: 32px; height: 32px; border-radius: 9px; border: 1px solid rgba(0,0,0,.15); background: transparent; color: inherit; cursor: pointer; font-weight: 700; }
.afa-ci b { min-width: 20px; text-align: center; }
.afa-cart-total { display: flex; justify-content: space-between; font-size: 17px; margin: 0 0 16px; }
.afa-co { display: grid; gap: 6px; padding: 16px; background: var(--a-card, #fff); border: 1px solid rgba(0,0,0,.08); border-radius: 16px; }
.afa-co[hidden] { display: none; }
.afa-h-sm { font-size: 16px; margin-bottom: 4px; }
.afa-co label { font-weight: 600; font-size: 14px; margin-top: 6px; }
.afa-co input, .afa-co textarea { font: inherit; font-size: 16px; width: 100%; padding: 10px 12px; border: 1px solid rgba(0,0,0,.2); border-radius: 10px; background: #fff; color: #0a0a0a; }
.afa-co .afa-btn { margin-top: 12px; padding: 12px; font-size: 16px; }
.afa-opt { font-weight: 400; opacity: .7; }
.afa-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.afa-note { font-size: 14px; padding: 12px 14px; border-radius: 12px; background: rgba(0,0,0,.05); }
.afa-back { margin: 18px 0 0; text-align: center; }
.afa-back a { color: var(--a-text, #0a0a0a); font-weight: 600; }

/* image slides */
.afa-slides { position: relative; }
.afa-track { display: flex; height: 220px; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 16px; scrollbar-width: none; }
.afa-track::-webkit-scrollbar { display: none; }
.afa-slide { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; }
.afa-dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 6px; }
.afa-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.6); cursor: pointer; box-shadow: 0 0 0 1px rgba(0,0,0,.15); }
.afa-dots button[aria-current="true"] { background: #fff; width: 20px; border-radius: 4px; }

/* video */
.afa-video { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #000; }
.afa-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.afa-video-ph { display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; gap: 8px; }

/* social icons */
.afa-soc { display: inline-flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.afa-al-left .afa-soc { justify-content: flex-start; }
.afa-al-right .afa-soc { justify-content: flex-end; }
.afa-soc a { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: #0a0a0a; color: #fff; }
.afa-soc a:hover { opacity: .85; }
.afa-soc svg { width: 20px; height: 20px; }
.afa-left { margin: 0 0 6px; font-size: 12px; font-weight: 700; color: #166534; }
.afa-left-out { color: #991b1b; }
.afa-add:disabled { opacity: .5; cursor: not-allowed; }
.afa-ci button:disabled { opacity: .4; }
.afa-pay { border: 0; margin: 10px 0 4px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.afa-pay legend { font-weight: 800; font-size: 15px; margin-bottom: 4px; }
.afa-pay-opt { display: flex; gap: 10px; align-items: center; background: #fff; border: 1px solid #d4d4d8; border-radius: 10px; padding: 11px 12px; font-weight: 700; cursor: pointer; }
.afa-pay-opt:has(input:checked) { border: 2px solid var(--a-primary, #0a0a0a); padding: 10px 11px; }
