/* AmharicLab — Shop / ሱቅ */
:root {
  --teal: #049FB4; --teal-dark: #037F90; --teal-soft: #E2F3F5;
  --orange: #FE8909; --orange-dark: #C9650A; --orange-soft: #FFF1E0;
  --ink: #1D2433; --muted: #5B6475; --line: #E3E7ED; --bg: #FFFBF4; --card: #FFFFFF;
  --radius: 18px;
  --font: 'Noto Sans Ethiopic', 'Inter', system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); font-family: 'Nunito', system-ui, sans-serif; } /* same font as the rest of the site, for the header and footer */
.shop, .lightbox { color: var(--ink); font-family: var(--font); line-height: 1.55; }
.shop .en, .lightbox .en { color: var(--muted); font-family: 'Inter', 'Noto Sans Ethiopic', system-ui, sans-serif; font-weight: 400; }
.shop a { color: var(--teal-dark); }

.shop { max-width: 1200px; margin: 0 auto; padding: 32px 20px 64px; }

/* hero */
.shop-hero { text-align: center; padding: 8px 0 20px; }
.eyebrow { margin: 0; font-size: .85rem; font-weight: 700; letter-spacing: .06em; color: var(--orange-dark); text-transform: uppercase; }
.shop-hero h1 { margin: 6px 0 8px; font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1.15; }
.shop-hero h1 span { color: var(--teal-dark); font-family: 'Inter', sans-serif; font-weight: 600; }
.lead { margin: 0 auto; max-width: 640px; font-size: 1.08rem; }
.lead .en { display: inline-block; margin-top: 4px; font-size: .98rem; }

/* deliver-to picker */
.ship-to { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 14px; margin: 18px 0 26px; }
.ship-to__label { font-weight: 700; }
.ship-to__label .en { font-weight: 400; margin-left: 4px; }
.ship-to__options { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pill { font: inherit; font-size: .95rem; border: 2px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; padding: 8px 16px; min-height: 44px; cursor: pointer; }
.pill .en { margin-left: 4px; font-size: .85rem; }
.pill:hover { border-color: var(--teal); }
.pill[aria-checked="true"] { background: var(--teal); border-color: var(--teal); color: #fff; }
.pill[aria-checked="true"] .en { color: #E7F7F9; }
.pill:focus-visible, .btn:focus-visible, .qty button:focus-visible, .linkbtn:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

/* notices */
.notice { max-width: 760px; margin: 0 auto 20px; padding: 12px 16px; border-radius: 12px; text-align: center; font-size: .95rem; }
.notice--warn { background: var(--orange-soft); }
.notice--error { background: #FBE9E7; }

/* grid */
.book-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
@media (max-width: 980px) { .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .book-grid { grid-template-columns: minmax(0, 1fr); } .shop { padding: 22px 16px 48px; } }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 6px 22px rgba(29, 36, 51, .06); }
.card--skeleton { min-height: 640px; background: linear-gradient(100deg, #f3f5f8 30%, #fafbfc 50%, #f3f5f8 70%); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .card--skeleton { animation: none; } }

.card__media { position: relative; background: linear-gradient(180deg, var(--teal-soft), #F7FBFC); padding: 22px 18px 10px; display: flex; justify-content: center; }
.card__media img { width: 100%; max-width: 300px; height: auto; aspect-ratio: 770 / 1017; object-fit: contain; display: block; cursor: zoom-in; }
.badge { position: absolute; top: 14px; left: 14px; background: var(--orange); color: #fff; font-weight: 700; font-size: .85rem; padding: 4px 12px; border-radius: 999px; }
.badge .en { color: #FFF4E6; font-size: .78rem; margin-left: 4px; }
.card__links { display: flex; justify-content: center; gap: 16px; padding: 0 18px 4px; background: #F7FBFC; }
.linkbtn { background: none; border: 0; font: inherit; font-size: .85rem; color: var(--teal-dark); text-decoration: underline; cursor: pointer; padding: 8px 4px; min-height: 44px; }

.card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card__code { margin: 0; font-family: 'Inter', monospace; font-size: .8rem; color: var(--muted); letter-spacing: .04em; }
.card__title { margin: 0; font-size: 1.3rem; line-height: 1.3; }
.card__title .en { display: block; font-size: 1rem; font-weight: 600; color: var(--teal-dark); margin-top: 2px; }
.card__desc { margin: 0; font-size: .95rem; }
.card__desc.en { font-size: .9rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0; padding: 0; list-style: none; }
.chips li { background: #F3F5F8; border-radius: 999px; padding: 3px 10px; font-size: .8rem; color: var(--muted); font-family: 'Inter', var(--font); }

.card__buy { margin-top: auto; border-top: 1px dashed var(--line); padding-top: 14px; display: grid; gap: 10px; }
.price-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.price { font-family: 'Inter', sans-serif; font-weight: 700; font-size: 1.6rem; color: var(--ink); }
.postage-note { font-size: .82rem; color: var(--muted); text-align: right; }
.qty-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.qty-label { font-size: .9rem; font-weight: 600; }
.qty { display: inline-flex; align-items: center; border: 2px solid var(--line); border-radius: 12px; overflow: hidden; }
.qty button { width: 44px; height: 44px; border: 0; background: #fff; font-size: 1.3rem; color: var(--ink); cursor: pointer; }
.qty button:hover { background: var(--teal-soft); }
.qty button:disabled { color: #B9C0CC; cursor: not-allowed; background: #fff; }
.qty output { min-width: 40px; text-align: center; font-family: 'Inter', sans-serif; font-weight: 700; }
.total-row { display: flex; justify-content: space-between; font-size: .95rem; }
.total-row strong { font-family: 'Inter', sans-serif; }
.btn { font: inherit; font-weight: 700; font-size: 1.05rem; border: 0; border-radius: 12px; min-height: 50px; padding: 12px 18px; cursor: pointer; background: var(--orange); color: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn .en { color: #FFF4E6; font-weight: 600; }
.btn:hover { background: var(--orange-dark); }
.btn[disabled] { opacity: .7; cursor: progress; }
.card__error { margin: 0; font-size: .85rem; color: #B42318; }

/* postage table */
.postage { margin: 44px auto 0; max-width: 860px; }
.postage h2, .trust h2 { font-size: 1.4rem; margin: 0 0 12px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.postage__table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.postage__table th, .postage__table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.postage__table th { background: #F7F8FA; font-size: .85rem; }
.postage__table th .en, .postage__table td .en { display: block; font-size: .8rem; }
.postage__table tr:last-child td { border-bottom: 0; }
.postage__table tr.is-selected td { background: var(--teal-soft); }
.small { font-size: .85rem; margin: 8px 2px 0; }

/* trust strip */
.trust { margin: 36px auto 0; max-width: 1000px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 760px) { .trust { grid-template-columns: minmax(0, 1fr); } }
.trust__item { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.trust__item svg { width: 28px; height: 28px; color: var(--teal-dark); flex: none; }
.trust__item strong { display: block; }
.trust__item .en { font-size: .85rem; }

/* lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(15, 20, 30, .82); display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 50; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(560px, 92vw); max-height: 88vh; border-radius: 8px; box-shadow: 0 20px 60px rgba(0, 0, 0, .4); background: #fff; }
.lightbox__close { position: absolute; top: 14px; right: 18px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: #fff; font-size: 1.8rem; cursor: pointer; }

/* success page */
.success { max-width: 640px; margin: 40px auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 36px 28px; text-align: center; box-shadow: 0 6px 22px rgba(29, 36, 51, .06); }
.success__icon { width: 72px; height: 72px; border-radius: 50%; background: #E8F3E9; display: inline-flex; align-items: center; justify-content: center; }
.success h1 { margin: 14px 0 6px; font-size: 1.8rem; }
.success .summary { margin: 18px auto; padding: 14px; background: #F7F8FA; border-radius: 12px; font-size: .95rem; text-align: left; max-width: 420px; }
.success .summary div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }

/* ---------- inside the Android / iOS app ---------- */
.app-note { margin: 0; font-size: .8rem; color: var(--muted); text-align: center; }
.app-order-note { max-width: 760px; margin: 0 auto 20px; padding: 14px 16px; border-radius: 12px; text-align: center; background: var(--teal-soft); }

/* ---------- basket & checkout ---------- */
.steps { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; list-style: none; margin: 14px 0 26px; padding: 0; font-size: .95rem; }
.steps li { display: flex; align-items: center; gap: 8px; }
.steps strong { width: 28px; height: 28px; border-radius: 50%; background: var(--teal); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-family: 'Inter', sans-serif; font-size: .85rem; }
.steps .en { font-size: .85rem; }
.card__inbasket { margin: 0; font-size: .85rem; color: #2E7D32; font-weight: 600; text-align: center; }
.card__inbasket .en { color: #2E7D32; }
.postage-note .en { display: block; font-size: .78rem; }

.basket-fab { position: fixed; right: 18px; bottom: 18px; z-index: 40; display: inline-flex; align-items: center; gap: 10px; min-height: 56px; padding: 10px 20px 10px 14px; border: 0; border-radius: 999px; background: var(--teal-dark); color: #fff; font: 700 1rem var(--font); box-shadow: 0 10px 28px rgba(3, 127, 144, .35); cursor: pointer; }
.basket-fab[hidden] { display: none; }
.basket-fab:hover { background: #026a78; }
.basket-fab:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.basket-fab svg { width: 26px; height: 26px; }
.basket-fab__count { min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px; background: var(--orange); font-family: 'Inter', sans-serif; font-size: .85rem; display: inline-flex; align-items: center; justify-content: center; }
.basket-fab .en { color: #DDF4F7; font-family: 'Inter', sans-serif; font-weight: 600; }
.basket-fab #basketFabTotal { font-family: 'Inter', sans-serif; }
@media (max-width: 640px) {
  .basket-fab { left: 16px; right: 16px; bottom: 14px; justify-content: center; }
  .shop { padding-bottom: 96px; }
}
.al-is-app .basket-fab { bottom: calc(14px + env(safe-area-inset-bottom)); }

html.dialog-open { overflow: hidden; }
.dlg { border: 0; padding: 0; border-radius: 20px; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); color: var(--ink); font-family: var(--font); line-height: 1.5; box-shadow: 0 24px 70px rgba(15, 20, 30, .35); background: #fff; overflow: auto; }
.dlg--checkout { width: min(720px, calc(100vw - 32px)); }
.dlg::backdrop { background: rgba(15, 20, 30, .6); }
.dlg .en { color: var(--muted); font-family: 'Inter', 'Noto Sans Ethiopic', system-ui, sans-serif; font-weight: 400; }
.dlg__head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 14px 22px; background: #fff; border-bottom: 1px solid var(--line); }
.dlg__head h2 { margin: 0; font-size: 1.2rem; }
.dlg__head h2 .en { font-size: .95rem; margin-left: 4px; }
.dlg__x { width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; background: #F3F5F8; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--ink); }
.dlg__x:hover { background: var(--teal-soft); }
.dlg__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 22px 22px; }
@media (max-width: 480px) { .dlg__actions { grid-template-columns: 1fr; } .dlg__actions .btn:last-child { order: -1; } }
.btn--ghost { background: #fff; color: var(--teal-dark); border: 2px solid var(--teal); }
.btn--ghost .en { color: var(--teal-dark); }
.btn--ghost:hover { background: var(--teal-soft); }
.dlg .btn { flex-wrap: wrap; text-align: center; }
.dlg .btn:focus-visible, .dlg__x:focus-visible, .co-item__remove:focus-visible, .dlg .linkbtn:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

.added { display: flex; gap: 16px; align-items: center; padding: 18px 22px; }
.added img { width: 96px; height: auto; flex: none; object-fit: contain; }
.added p { margin: 0 0 6px; }
.added__title { font-weight: 700; font-size: 1.05rem; }
.added__title .en, .co-item__title .en { display: block; font-size: .88rem; font-weight: 600; color: var(--teal-dark); }
.added__meta, .added__sum { font-size: .92rem; }
.added__warn { font-size: .9rem; color: #B42318; }
.added__sum strong { font-family: 'Inter', sans-serif; }

#coForm { padding: 6px 22px 22px; }
.co-empty { padding: 26px 22px; text-align: center; display: grid; gap: 14px; justify-items: center; }
.co-empty[hidden], #coFull[hidden] { display: none; }
.co-h { margin: 18px 0 10px; font-size: 1.02rem; }
.co-h .en { font-size: .9rem; }
.co-items { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 14px; }
.co-item { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto auto; grid-template-areas: "img info qty line" "img info rm rm"; align-items: center; gap: 4px 14px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.co-item:last-child { border-bottom: 0; }
.co-item img { grid-area: img; width: 56px; height: auto; align-self: start; }
.co-item__info { grid-area: info; min-width: 0; }
.co-item__title { margin: 0; font-weight: 700; font-size: .95rem; line-height: 1.35; }
.co-item__unit { margin: 2px 0 0; font-size: .85rem; font-family: 'Inter', sans-serif; }
.co-item .qty { grid-area: qty; }
.co-item__line { grid-area: line; font-family: 'Inter', sans-serif; min-width: 64px; text-align: right; }
.co-item__remove { grid-area: rm; justify-self: end; background: none; border: 0; font: inherit; font-size: .82rem; color: #B42318; text-decoration: underline; cursor: pointer; min-height: 36px; padding: 4px; }
.co-item__remove .en { color: #B42318; }
@media (max-width: 520px) {
  .co-item { grid-template-columns: 48px minmax(0, 1fr) auto; grid-template-areas: "img info info" "img qty line" "img rm rm"; }
  .co-item img { width: 48px; }
}
.qty--sm button { width: 40px; height: 40px; font-size: 1.15rem; }
.qty--sm output { min-width: 30px; }
.co-more { display: block; margin: 6px 0 0; }

.co-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
@media (max-width: 520px) { .co-grid { grid-template-columns: minmax(0, 1fr); } }
.co-f { display: grid; gap: 4px; font-size: .9rem; font-weight: 600; }
.co-f .en { font-size: .82rem; }
.co-f--full { grid-column: 1 / -1; }
.co-f input, .co-f select { font: 400 1rem 'Inter', var(--font); color: var(--ink); width: 100%; min-height: 46px; padding: 10px 12px; border: 2px solid var(--line); border-radius: 10px; background: #fff; }
.co-f input:focus, .co-f select:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.co-f input:user-invalid, .co-f select:user-invalid { border-color: #D92D20; }
.co-notlisted { margin-top: 8px; }

.co-sum { border: 1px solid var(--line); border-radius: 14px; padding: 6px 16px; background: #F9FAFB; }
.co-sum > div { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.co-sum > div:last-child { border-bottom: 0; }
.co-sum strong { font-family: 'Inter', sans-serif; white-space: nowrap; }
.co-sum__where { display: block; font-size: .8rem; color: var(--muted); font-weight: 400; }
.co-sum__where .en { font-size: .8rem; }
.co-sum__total { font-size: 1.1rem; font-weight: 700; }
.co-sum__total strong { font-size: 1.25rem; color: var(--teal-dark); }
.co-error { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: #FBE9E7; color: #B42318; font-size: .9rem; }
.btn--pay { width: 100%; margin-top: 16px; min-height: 56px; font-size: 1.15rem; }
.co-secure { display: flex; gap: 8px; align-items: flex-start; color: var(--muted); }
.co-secure svg { flex: none; margin-top: 3px; color: var(--teal-dark); }
@media (max-width: 520px) {
  .dlg { width: calc(100vw - 24px); max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); border-radius: 18px; }
  .dlg--checkout { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
}

/* success page: list of books */
.success .summary ul { margin: 4px 0 0; padding-left: 18px; }

/* Phone and app: the three order steps stacked and aligned left */
@media (max-width: 640px) {
  .steps { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 10px; }
}
.al-is-app .steps { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 10px; }
/* Page heading kept for screen readers and search engines only (not shown) */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
