/* Core One — storefront (/shop), inside the website. The site theme (site.css +
   /site/theme.css) owns colours, fonts, buttons and radius; this file lays out the shop's
   own pieces with sh- classes and logical properties, so Arabic mirrors itself. */
[hidden] { display: none !important; }

.shop, .sh-sub, .sh-announce {
  --sh-ink: var(--c-text, #1f2430);
  --sh-head: var(--c-head, var(--sh-ink));
  --sh-accent: var(--c-btn, var(--o1, #1e56d5));
  --sh-on-accent: var(--c-btn-text, #fff);
  --sh-link: var(--c-link, var(--sh-accent));
  --sh-paper: var(--c-card, #fff);
  --sh-bg: var(--c-bg, #fff);
  --sh-muted: var(--c-muted, color-mix(in srgb, var(--sh-ink) 62%, transparent));
  --sh-line: var(--c-border, color-mix(in srgb, var(--sh-ink) 14%, transparent));
  --sh-soft: color-mix(in srgb, var(--sh-ink) 4%, var(--sh-bg));
  --sh-hover: var(--c-hover, var(--sh-soft));
  --sh-ok: #0d7a4f;
  --sh-bad: #b42318;
  --sh-r: var(--r, 12px);
}
.shop { padding-block: clamp(22px, 3.6vw, 44px) clamp(48px, 7vw, 88px); color: var(--sh-ink); }
.shop h1 { font-size: clamp(1.6rem, 1.25rem + 1.4vw, 2.3rem); line-height: 1.15; margin: 0; color: var(--sh-head); }
.shop h2 { color: var(--sh-head); }
.shop a:not(.btn) { color: inherit; }
.sh-empty { color: var(--sh-muted); padding-block: 40px; margin: 0; }
.shop .sh-empty a, .shop a.sh-continue, .shop .sh-link, .shop .sh-blurb a, .shop .sh-flash a {
  color: var(--sh-link); text-decoration: underline; text-underline-offset: 2px;
}
.sh-link { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }

/* announcement + sub-navigation (above the page content, full width) */
.sh-announce { background: var(--sh-ink); color: var(--sh-paper); text-align: center; font-size: .88rem; padding: 8px 16px; }
.sh-announce.is-closed { background: #b45309; color: #fff; }
.sh-sub { border-block-end: 1px solid var(--sh-line); background: var(--sh-paper); }
.sh-sub-in { display: flex; align-items: center; gap: 14px 22px; padding-block: 10px; flex-wrap: wrap; }
.sh-cats { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; flex: 1 1 360px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.sh-cats::-webkit-scrollbar { display: none; }
.sh-sub .sh-cats a {
  display: inline-block; white-space: nowrap; padding: 6px 13px; border-radius: 999px; font-size: .92rem;
  color: var(--sh-muted); text-decoration: none; border: 1px solid transparent;
}
.sh-sub .sh-cats a:hover { color: var(--sh-ink); background: var(--sh-hover); }
.sh-sub .sh-cats a.is-on { color: var(--sh-ink); border-color: var(--sh-line); background: var(--sh-soft); font-weight: 600; }
.sh-search { display: flex; gap: 6px; flex: 0 1 340px; margin-inline-start: auto; }
.sh-sub .sh-search input { flex: 1; min-width: 0; min-height: 36px; padding-block: .35em; border-radius: 999px; }

/* catalogue */
.sh-flash { flex-wrap: wrap; gap: .4em; }
.sh-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 24px; flex-wrap: wrap; margin-block-end: 18px; }
.sh-titles { min-width: 0; }
.sh-blurb { color: var(--sh-muted); margin: 8px 0 0; max-width: 70ch; }
.sh-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sh-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.sh-chip {
  border: 1px solid var(--sh-line); border-radius: 999px; padding: 5px 12px; font-size: .86rem; text-decoration: none;
  color: var(--sh-ink); background: var(--sh-paper);
}
.sh-chip:hover { border-color: var(--sh-accent); }
.shop a.sh-chip.is-on { background: var(--sh-accent); border-color: var(--sh-accent); color: var(--sh-on-accent); }
.sh-sort { position: relative; }
.sh-sort summary {
  list-style: none; cursor: pointer; border: 1px solid var(--sh-line); border-radius: 999px; padding: 5px 12px;
  font-size: .86rem; background: var(--sh-paper); user-select: none;
}
.sh-sort summary::-webkit-details-marker { display: none; }
.sh-sort summary::after { content: "▾"; margin-inline-start: 6px; color: var(--sh-muted); }
.sh-sort summary span { color: var(--sh-muted); }
.sh-sort ul {
  position: absolute; z-index: 20; inset-block-start: calc(100% + 6px); inset-inline-end: 0; min-width: 200px;
  list-style: none; margin: 0; padding: 6px; background: var(--sh-paper); border: 1px solid var(--sh-line);
  border-radius: calc(var(--sh-r) * .75); box-shadow: 0 12px 30px -12px color-mix(in srgb, var(--sh-ink) 40%, transparent);
}
.sh-sort li a { display: block; padding: 8px 10px; border-radius: 8px; text-decoration: none; font-size: .92rem; }
.sh-sort li a:hover, .sh-sort li a[aria-current] { background: var(--sh-soft); }
.sh-sort li a[aria-current] { font-weight: 600; }
.sh-count { color: var(--sh-muted); font-size: .88rem; margin: 0 0 14px; }

.sh-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 30px 22px; }
.sh-tile { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.sh-tile-link { display: flex; flex-direction: column; gap: 4px; text-decoration: none; }
.sh-img {
  position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 1; overflow: hidden;
  background: var(--sh-soft); border: 1px solid var(--sh-line); border-radius: var(--sh-r); margin-block-end: 8px;
}
.sh-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.sh-tile-link:hover .sh-img { border-color: color-mix(in srgb, var(--sh-ink) 30%, transparent); }
.sh-tile-link:hover .sh-img img { transform: scale(1.04); }
.sh-tile-link:focus-visible { outline: 2px solid var(--sh-accent); outline-offset: 3px; border-radius: var(--sh-r); }
.sh-noimg { font-size: 2.4rem; font-weight: 700; color: color-mix(in srgb, var(--sh-ink) 22%, transparent); }
.sh-tag {
  position: absolute; inset-block-start: 10px; inset-inline-start: 10px; padding: 2px 9px; border-radius: 999px;
  font-size: .74rem; font-weight: 700; background: var(--sh-paper); color: var(--sh-ink);
}
.sh-tag.is-sale { background: #c0392f; color: #fff; }
.sh-tag.is-out { inset-inline-start: auto; inset-inline-end: 10px; background: var(--sh-ink); color: var(--sh-paper); }
.sh-pd-price .sh-tag { position: static; vertical-align: middle; margin-inline-start: 8px; }
.sh-name { font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.sh-price { color: var(--sh-muted); }
.sh-price b { color: var(--sh-ink); font-weight: 600; }
.sh-price s, .sh-pd-price s { color: var(--sh-muted); font-weight: 400; margin-inline-end: 4px; }
.sh-quick .btn { width: 100%; }
.sh-pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-block-start: 34px; }
.sh-pager-n { color: var(--sh-muted); font-size: .9rem; }

/* product */
.sh-crumbs ol { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: .9rem; color: var(--sh-muted); }
.sh-crumbs li + li::before { content: "/"; margin-inline-end: 6px; opacity: .6; }
.sh-crumbs a { text-decoration: none; }
.sh-crumbs a:hover { text-decoration: underline; }
.sh-pd { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.sh-pd-img {
  display: flex; align-items: center; justify-content: center; aspect-ratio: 1; overflow: hidden;
  background: var(--sh-soft); border: 1px solid var(--sh-line); border-radius: var(--sh-r);
}
.sh-pd-img img { width: 100%; height: 100%; object-fit: cover; }
.sh-pd-img .sh-noimg { font-size: 6rem; }
.sh-pd-price { font-size: 1.45rem; margin: 12px 0 18px; }
.sh-pd-price b { font-weight: 700; }
.sh-pd-desc { color: var(--sh-muted); margin: 0 0 24px; white-space: pre-line; overflow-wrap: anywhere; max-width: 62ch; }
.sh-buy { border-block-start: 1px solid var(--sh-line); padding-block-start: 22px; }
.sh-buy-row { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.sh-fld { display: block; margin-block-end: 14px; min-width: 0; }
.sh-fld span { display: block; font-size: .9rem; font-weight: 600; margin-block-end: 6px; color: var(--sh-head); }
.sh-buy > .sh-fld { max-width: 420px; }
.sh-fld-qty { width: 110px; margin-block-end: 0; }
.sh-add { flex: 1 1 200px; }
.sh-minq { color: var(--sh-muted); font-size: .86rem; margin: 10px 0 0; }
.sh-stock { font-size: .9rem; font-weight: 600; margin: 14px 0 0; }
.sh-stock.is-in { color: var(--sh-ok); }
.sh-stock.is-out { color: var(--sh-bad); font-size: 1.05rem; margin-block-start: 6px; }
.sh-related { margin-block-start: clamp(40px, 6vw, 72px); }
.sh-related h2 { font-size: 1.3rem; margin: 0 0 18px; }

/* checkout steps */
.sh-steps { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: .9rem; color: var(--sh-muted); }
.sh-steps li { display: flex; align-items: center; gap: 8px; }
.sh-step-n {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .78rem; font-weight: 700;
  border: 1px solid var(--sh-line);
}
.sh-steps .is-on { color: var(--sh-ink); font-weight: 600; }
.sh-steps .is-on .sh-step-n { background: var(--sh-accent); border-color: var(--sh-accent); color: var(--sh-on-accent); }
.sh-steps .is-done .sh-step-n { background: color-mix(in srgb, var(--sh-ok) 14%, var(--sh-paper)); border-color: transparent; color: var(--sh-ok); }

/* cart */
.sh-cart { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); gap: clamp(20px, 3vw, 40px); align-items: start; margin-block-start: 22px; }
.sh-lines { list-style: none; margin: 0; padding: 0; border-block-start: 1px solid var(--sh-line); }
.sh-line {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto auto auto; align-items: center; gap: 8px 16px;
  padding-block: 16px; border-block-end: 1px solid var(--sh-line);
}
.sh-line-img { width: 64px; height: 64px; border-radius: calc(var(--sh-r) * .6); overflow: hidden; background: var(--sh-soft); display: flex; align-items: center; justify-content: center; }
.sh-line-img img { width: 100%; height: 100%; object-fit: cover; }
.sh-line-img .sh-noimg { font-size: 1.3rem; }
.sh-line-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sh-line-name { font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.sh-line-name:hover { text-decoration: underline; }
.sh-line-unit { color: var(--sh-muted); font-size: .88rem; }
.sh-line-warn { color: var(--sh-bad); font-size: .84rem; }
.sh-qty { display: inline-flex; align-items: center; border: 1px solid var(--sh-line); border-radius: 999px; overflow: hidden; }
.sh-qty button {
  width: 34px; height: 34px; border: 0; background: transparent; color: var(--sh-ink); font: inherit; font-size: 1.1rem; cursor: pointer;
}
.sh-qty button:hover:not(:disabled) { background: var(--sh-soft); }
.sh-qty button:disabled { opacity: .35; cursor: not-allowed; }
.sh-qty button:focus-visible { outline: 2px solid var(--sh-accent); outline-offset: -2px; }
.sh-qty-n { min-width: 30px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.sh-line-sub { font-weight: 600; text-align: end; min-width: 84px; font-variant-numeric: tabular-nums; }
.shop .sh-line-rm .sh-link { font-size: .86rem; color: var(--sh-muted); }

.sh-summary {
  background: var(--sh-soft); border: 1px solid var(--sh-line); border-radius: var(--sh-r); padding: 20px 22px;
  position: sticky; inset-block-start: 88px;
}
.sh-summary h2 { font-size: 1.05rem; margin: 0 0 12px; }
.sh-row { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; color: var(--sh-muted); }
.sh-row b { color: var(--sh-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.sh-row.is-disc, .sh-row.is-disc b { color: var(--sh-ok); }
.sh-row.is-grand { border-block-start: 1px solid var(--sh-line); margin-block-start: 8px; padding-block-start: 12px; font-size: 1.15rem; font-weight: 700; color: var(--sh-ink); }
.sh-promo { display: flex; gap: 6px; margin: 16px 0 6px; }
.shop .sh-promo input { flex: 1; min-width: 0; min-height: 38px; padding-block: .4em; text-transform: uppercase; }
.sh-promo input::placeholder { text-transform: none; }
.sh-promo-clear { margin: 0 0 6px; font-size: .86rem; }
.sh-promo-ok { color: var(--sh-ok); font-size: .86rem; margin: 4px 0 0; }
.sh-promo-bad { color: var(--sh-bad); font-size: .86rem; margin: 4px 0 0; }
.sh-go { display: block; width: 100%; text-align: center; margin-block-start: 16px; box-sizing: border-box; }
.sh-continue { display: block; text-align: center; margin-block-start: 12px; font-size: .92rem; }

/* checkout */
.shop .form-err { margin: 16px 0 0; }
.sh-checkout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); gap: clamp(20px, 3vw, 40px); align-items: start; margin-block-start: 22px; }
.sh-co-fields { display: grid; gap: 18px; min-width: 0; }
.sh-box { border: 1px solid var(--sh-line); border-radius: var(--sh-r); padding: 16px 20px 6px; margin: 0; min-width: 0; }
.sh-box legend { font-weight: 650; padding: 0 6px; }
.sh-fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.sh-fld.is-wide { grid-column: 1 / -1; }
.sh-fld input[type=email], .sh-fld input[type=tel] { direction: ltr; text-align: start; }
[dir="rtl"] .sh-fld input[type=email], [dir="rtl"] .sh-fld input[type=tel] { text-align: end; }
.sh-pay { padding-block-end: 14px; }
.sh-payopt {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; margin-block-end: 8px; cursor: pointer;
  border: 1px solid var(--sh-line); border-radius: calc(var(--sh-r) * .7); background: var(--sh-paper);
}
.sh-payopt:has(input:checked) { border-color: var(--sh-accent); box-shadow: 0 0 0 1px var(--sh-accent) inset; }
.sh-payopt input { accent-color: var(--sh-accent); width: 18px; height: 18px; margin: 0; }
.sh-paynote { color: var(--sh-muted); font-size: .86rem; margin: 8px 0 0; white-space: pre-line; }
.sh-rlines { list-style: none; margin: 0 0 8px; padding: 0 0 8px; border-block-end: 1px solid var(--sh-line); }
.sh-rlines li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: .94rem; }
.sh-rlines li > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.sh-rlines b { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* thank you */
.sh-thanks { max-width: 560px; margin-inline: auto; text-align: center; }
.sh-check {
  width: 64px; height: 64px; border-radius: 50%; margin: 6px auto 16px; display: grid; place-items: center; font-size: 30px;
  background: color-mix(in srgb, var(--sh-ok) 14%, var(--sh-paper)); color: var(--sh-ok);
}
.sh-lead { color: var(--sh-muted); margin: 10px 0 0; }
.sh-receipt { text-align: start; margin: 24px 0; padding: 18px 20px; border: 1px solid var(--sh-line); border-radius: var(--sh-r); background: var(--sh-paper); }
.sh-rq { color: var(--sh-muted); white-space: nowrap; margin-inline-start: auto; }
.sh-receipt .sh-rlines li { gap: 14px; }

@media (max-width: 900px) {
  .sh-cart, .sh-checkout { grid-template-columns: minmax(0, 1fr); }
  .sh-summary { position: static; }
}
@media (max-width: 760px) {
  .sh-pd { grid-template-columns: minmax(0, 1fr); }
  .sh-head { align-items: flex-start; }
  .sh-search { flex: 1 1 100%; margin-inline-start: 0; }
  .sh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; }
  .sh-line { grid-template-columns: 56px minmax(0, 1fr) auto; }
  .sh-line-img { width: 56px; height: 56px; }
  .sh-qty { grid-column: 2; justify-self: start; }
  .sh-line-sub { grid-column: 3; grid-row: 1; }
  .sh-line-rm { grid-column: 3; grid-row: 2; justify-self: end; }
}
@media (max-width: 520px) {
  .sh-fgrid { grid-template-columns: minmax(0, 1fr); }
  .sh-sort ul { inset-inline-end: auto; inset-inline-start: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .sh-img img { transition: none; }
  .sh-tile-link:hover .sh-img img { transform: none; }
}

/* add-ons on a product page: extras, a choice, a text */
.sh-adds { border: 0; padding: 0; margin: 0 0 16px; max-width: 420px; }
.sh-adds legend { font-size: .9rem; font-weight: 600; margin-block-end: 8px; color: var(--sh-head); }
.sh-adds legend em { font-style: normal; font-weight: 500; color: var(--sh-muted, #6b7280); margin-inline-start: 6px; font-size: .85rem; }
.sh-add-opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--sh-line); border-radius: 12px; margin-block-end: 6px; cursor: pointer; }
.sh-add-opt span { flex: 1; }
.sh-add-opt small, .sh-adds > small { color: var(--sh-muted, #6b7280); font-variant-numeric: tabular-nums; }
.sh-adds input[type=text] { width: 100%; border: 1px solid var(--sh-line); border-radius: 10px; padding: 10px 12px; font: inherit; }
