/* The home page's own pieces on top of the kit (kit/system.css): the logo, the gift cards, and the
   photographs in #names, #hampers and #custom. Colours and sizes come from the kit's tokens. */

.brand-logo { width: 44px; height: 44px; border-radius: 50%; flex: none; display: block; box-shadow: 0 0 0 1px var(--line); }
.nav__logo { gap: 10px; }

/* a photograph in a rounded frame, cropped to fill it */
.pic { margin: 0; position: relative; display: block; overflow: clip; border-radius: var(--r-lg); background: var(--surface); isolation: isolate; }
.pic > img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; display: block; }

/* ---------------------------------------------------------------- best sellers */
.gifts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-6) var(--s-5); margin-top: var(--s-7); }
.gift { display: grid; gap: var(--s-3); color: var(--ink); text-decoration: none; }
.gift__img { position: relative; display: block; aspect-ratio: 5 / 3; overflow: clip; border-radius: var(--r-lg); background: var(--surface); }
.gift__img img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.gift__row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); }
.gift__name { font-weight: 500; }
.gift__price { font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 767px) {
  .gifts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5) var(--s-4); }
  .gift__img { aspect-ratio: 4 / 5; }
  .gift__row { flex-direction: column; gap: 2px; }
  .gift:nth-child(n+5) { display: none; }   /* phones show four; "Shop all 9 gifts" opens the rest */
}

/* ---------------------------------------------------------------- names in English and Arabic */
.names__text h2 em { font-style: italic; }
.names__pics { display: grid; gap: var(--s-4); }
.names__pics .pic { aspect-ratio: 2 / 1; }
@media (min-width: 1024px) {
  /* two photos stacked, sized by the screen's height so they always end inside the band */
  .names__pics .pic { aspect-ratio: auto; height: clamp(180px, calc(33svh - 8px), 310px); }
}
@media (max-width: 1023px) { .names__pics { margin-top: var(--s-6); } }

/* ---------------------------------------------------------------- hampers and wrapping: one tall photo */
.hampers__side, .custom__side { display: grid; gap: var(--s-5); align-content: start; }
.hampers__pic { height: clamp(320px, 70svh, 660px); }

/* ---------------------------------------------------------------- custom gifts: two tall photos in one frame */
.custom__duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); background: none; border-radius: 0; overflow: visible; height: clamp(320px, 70svh, 660px); }
.custom__duo > img { position: static; width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-lg); }

@media (max-width: 1023px) {
  .hampers__pic, .custom__duo { margin-top: var(--s-6); }
  .hampers__pic { height: auto; aspect-ratio: 4 / 5; }
  .custom__duo { height: auto; aspect-ratio: 6 / 5; }
}

/* desktop: the space under the hero matches the gaps between the other sections */
@media (min-width: 1024px) {
  #gifts { padding-top: calc(var(--padt) + 110px); }
  #gifts .gifts { margin-top: var(--s-5); row-gap: var(--s-5); }
  #gifts .gift__img { aspect-ratio: 2 / 1; }
}

/* phones: room at the foot of the page for the fixed Order on WhatsApp bar, so it never covers the footer */
@media (max-width: 639px) { body { padding-bottom: var(--bar, 0px); } }

/* tablets: taller gift photos so the six cards fill the screen */
@media (min-width: 768px) and (max-width: 1023px) { .gift__img { aspect-ratio: 4 / 5; } }

/* ================================================================ the inner pages (shop, product, custom gifts, about) */

/* the first section of a page with no hero clears the fixed header */
main > section.shop:first-child, main > section.pdp:first-child { padding-top: calc(var(--nav, 72px) + var(--s-7)); }

/* ---------------------------------------------------------------- shop */
.gift__desc { color: var(--muted); font-size: var(--t-small); line-height: 1.45; }
.gifts--shop .gift__img { aspect-ratio: 4 / 5; }
.gift[hidden] { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-6); }
.chip { height: 44px; padding: 0 var(--s-4); border-radius: 999px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink);
  font: 500 var(--t-small)/1 var(--font-text); cursor: pointer; transition: background-color var(--dur, 160ms) var(--ease, ease), color var(--dur, 160ms) var(--ease, ease); }
.chip:hover { background: var(--surface); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 767px) { .gifts--shop .gift:nth-child(n+5) { display: grid; } .gifts--shop .gift[hidden] { display: none; } }

.more { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); margin-top: var(--s-6); }
.more__card { display: grid; gap: var(--s-2); color: var(--ink); text-decoration: none; }
.more__pic { height: clamp(220px, 40svh, 380px); margin-bottom: var(--s-2); }
.more__title { font: 500 var(--t-card, 1.25rem)/1.3 var(--font-text); }
.more__text { color: var(--muted); }
@media (max-width: 767px) { .more { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------------- product */
.crumbs { display: flex; flex-wrap: wrap; gap: var(--s-2); font-size: var(--t-small); color: var(--muted); margin-bottom: var(--s-6); }
.crumbs a { color: var(--muted); }
.crumbs [aria-current] { color: var(--ink); }
.pdp__main { aspect-ratio: 4 / 5; max-height: 78svh; width: 100%; }
.pdp__thumbs { display: flex; gap: var(--s-3); margin-top: var(--s-3); flex-wrap: wrap; }
.thumb { width: 76px; height: 76px; padding: 0; border: 2px solid transparent; border-radius: var(--r-md, 10px); overflow: clip; background: var(--surface); cursor: pointer; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb[aria-pressed="true"] { border-color: var(--ink); }
.thumb:focus-visible, .swatch:focus-visible, .stepper button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pdp__info { display: grid; gap: var(--s-4); align-content: start; }
.pdp__info h1 { font-size: clamp(2rem, 3.4vw, 3rem); }
.pdp__price { font: 600 1.5rem/1.2 var(--font-text); }
.pdp__colours { border: 0; padding: 0; margin: 0; display: grid; gap: var(--s-3); }
.pdp__colours legend { font: 500 var(--t-small)/1.4 var(--font-text); padding: 0; margin-bottom: var(--s-3); }
.pdp__colours legend span { font-weight: 400; color: var(--muted); }
.swatches { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.swatch { width: 44px; height: 44px; border-radius: 50%; background: var(--c); border: 3px solid var(--bg); box-shadow: 0 0 0 1px var(--line-strong); cursor: pointer; padding: 0; }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ink); }
#p-name-field[hidden] { display: none; }
.pdp__qty { display: flex; align-items: center; gap: var(--s-4); }
.pdp__qty-label { font: 500 var(--t-small)/1 var(--font-text); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 999px; }
.stepper button { width: 44px; height: 44px; border: 0; background: none; color: var(--ink); font-size: 1.25rem; cursor: pointer; border-radius: 50%; }
.stepper output { min-width: 2ch; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }
.pdp__order { width: 100%; }
.pdp__facts { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-2); color: var(--muted); font-size: var(--t-small); border-top: 1px solid var(--line); padding-top: var(--s-4); }
@media (max-width: 1023px) { .pdp__info { margin-top: var(--s-6); } .pdp__main { max-height: none; } }

/* ---------------------------------------------------------------- custom gifts */
.ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-6) var(--gutter); margin-top: var(--s-6); }
.way { display: grid; gap: var(--s-3); align-content: start; }
.way__pic { aspect-ratio: 4 / 3; margin-bottom: var(--s-2); }
.way h3 { font: 500 var(--t-card, 1.25rem)/1.3 var(--font-text); }
.way p { color: var(--muted); }
@media (max-width: 767px) { .ways { grid-template-columns: minmax(0, 1fr); } }

.steps { margin: var(--s-6) 0 0; padding-left: 1.2em; display: grid; gap: var(--s-3); }
.steps li::marker { color: var(--muted); font-weight: 600; }
.request__form { display: grid; gap: var(--s-4); align-content: start; }
.field--choices { border: 0; padding: 0; margin: 0; }
.field--choices legend { padding: 0; margin-bottom: var(--s-2); }
.choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2); }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span { display: grid; gap: 2px; min-height: 44px; height: 100%; padding: var(--s-3); border: 1px solid var(--line-strong); border-radius: var(--r-sm, 8px); background: var(--bg); font-weight: 500; }
.choice small { color: var(--muted); font-weight: 400; }
.choice input:checked + span { border: 2px solid var(--ink); padding: calc(var(--s-3) - 1px); }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.form__pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
@media (max-width: 1023px) { .request__form { margin-top: var(--s-6); } }
@media (max-width: 639px) { .choices, .form__pair { grid-template-columns: minmax(0, 1fr); } }

.faq { display: grid; gap: 0; border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); min-height: 56px; padding: var(--s-3) 0; font-weight: 500; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--muted); transition: transform var(--dur, 160ms) var(--ease, ease); }
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.faq__item p { margin: 0 0 var(--s-4); color: var(--muted); max-width: 60ch; }
@media (max-width: 1023px) { .faq { margin-top: var(--s-6); } }

/* ---------------------------------------------------------------- about */
.prose { display: grid; gap: var(--s-4); margin-top: var(--s-5); max-width: 60ch; }
.prose p { margin: 0; }
.story__pic, .belief__pic { height: clamp(320px, 70svh, 660px); }
@media (max-width: 1023px) { .story__pic, .belief__pic { height: auto; aspect-ratio: 4 / 5; margin-top: var(--s-6); } }

/* fixes after the first look */
@media (min-width: 1024px) {
  .gifts--shop .gift__img { aspect-ratio: 5 / 4; }
  /* the product photo and its thumbnails fit the first screen under the header and the breadcrumb */
  .pdp__main { aspect-ratio: auto; height: calc(100svh - var(--nav, 72px) - 260px); min-height: 380px; max-height: none; }
}
@media (max-width: 767px) { #p-related .gift:nth-child(3) { display: none; } }
.request__form { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) { #related .gift__img { aspect-ratio: 4 / 5; } }

/* ---------------------------------------------------------------- heights: by content, never by the screen
   The kit makes each section one or two screens tall. On a tall screen (a 4K monitor) that left wide empty
   bands under short sections and stretched the split hero's photo; on a short or wide one, content ran into
   the next section. Every section and the footer now take their content's height with the kit's even
   padding; only the photo hero (capped at 16:10 of the width) and the pinned steps keep screen heights. */
main > section.section:not(.hero):not([data-moment]) { height: auto; min-height: 0; }
main > section.section:not(.hero):not([data-moment]) > .wrap { height: auto; }
footer.closing { height: auto; min-height: 0; }
footer.closing > .wrap { height: auto; grid-template-rows: auto auto !important; row-gap: calc(var(--padt) + var(--padb)) !important; }
.closing__cta > .close__media { flex: none; height: clamp(220px, 30vw, 440px); min-height: 0; }
main > .hero.hero--photo { height: min(100svh, 62.5vw); min-height: 560px; }
@media (max-width: 1023px) { main > .hero.hero--photo { height: 100svh; min-height: 0; } }
/* the split hero (Custom gifts): the words and a 4:3 photo side by side, as tall as they are, not the screen */
main > .hero.hero--split { height: auto; min-height: 0; }
.hero--split > .wrap { height: auto; }
.hero--split > .wrap > .hero-text { height: auto; }
.hero--split .hero__media { height: auto; aspect-ratio: 4 / 3; flex: none; }
.hero--split .hero__media > img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 1023px) { .hero--split .hero__media { aspect-ratio: 4 / 3; min-height: 0; } }
.hero--split .hero__grid { align-items: start; }
.hero--split .hero__media { width: 100%; align-self: start; }
@media (min-width: 1024px) {
  /* the product photo fits under the header but never grows past 760px on a tall screen */
  .pdp__main { height: min(calc(100svh - var(--nav, 72px) - 260px), 760px); }
}

/* ---------------------------------------------------------------- big screens (a 4K monitor, a wide desktop)
   The kit is drawn for a 1280px column. On wider windows the whole system scales by --k: the column, the
   spacing and the type grow together, so a 4K screen shows the same page larger instead of a small column
   in a sea of cream. */
@media (min-width: 1920px) { :root { --k: 1.2; } }
@media (min-width: 2560px) { :root { --k: 1.5; } }
@media (min-width: 3200px) { :root { --k: 1.85; } }
@media (min-width: 1920px) {
  :root {
    --container: calc(1280px * var(--k)); --gut: calc(80px * var(--k));
    --padt: calc(120px * var(--k)); --padb: calc(72px * var(--k)); --hgap: calc(48px * var(--k)); --hpadb: calc(64px * var(--k));
    --nav: calc(72px * var(--k)); --head-gap: calc(48px * var(--k));
    --s-1: calc(4px * var(--k)); --s-2: calc(8px * var(--k)); --s-3: calc(12px * var(--k)); --s-4: calc(16px * var(--k)); --s-5: calc(24px * var(--k));
    --s-6: calc(32px * var(--k)); --s-7: calc(48px * var(--k)); --s-8: calc(64px * var(--k)); --s-9: calc(96px * var(--k)); --s-10: calc(128px * var(--k));
    --t-label: calc(13px * var(--k)); --t-small: calc(14px * var(--k)); --t-body: calc(16px * var(--k)); --t-lead: calc(18px * var(--k));
    --t-card: calc(18px * var(--k)); --t-h3: calc(24px * var(--k)); --t-h2: calc(48px * var(--k)); --t-h1: calc(72px * var(--k));
    --ly-scale: calc(.84 * var(--k)); --ly-lead: calc(20px * var(--k));
    --r-sm: calc(8px * var(--k)); --r-md: calc(12px * var(--k)); --r-lg: calc(20px * var(--k)); --r-btn: calc(8px * var(--k));
    --btn-h: calc(44px * var(--k)); --icon: calc(16px * var(--k));
  }
  body { font-size: var(--t-body); }
  .brand-logo { width: calc(44px * var(--k)); height: calc(44px * var(--k)); }
  .nav__logo { font-size: calc(18px * var(--k)); }
  .nav__link, .btn { font-size: var(--t-body); }
  .chip { height: var(--btn-h); }
  .swatch, .stepper button { width: var(--btn-h); height: var(--btn-h); }
  .thumb { width: calc(76px * var(--k)); height: calc(76px * var(--k)); }
  .pdp__main { height: min(calc(100svh - var(--nav) - 260px * var(--k)), calc(760px * var(--k))); }
}

/* photos keep their proportions at every width (sections take their content's height now, so no photo needs
   to be sized by the screen); one block per section */
@media (min-width: 1024px) {
  .names__pics .pic { height: auto; aspect-ratio: 2 / 1; }
  .hampers__pic { height: auto; aspect-ratio: 5 / 4; }
  .custom__duo { height: auto; aspect-ratio: 6 / 5; }
  .custom__duo > img { height: 100%; }
  .more__pic { height: auto; aspect-ratio: 16 / 9; }
}
@media (max-width: 1023px) { .pdp__main { aspect-ratio: 1 / 1; } }
