/* ¡Ay Mija! storefront — colors from Branding/ (logo + brand image). Mobile-first. */
:root {
  --magenta: #cb1c64;
  --magenta-dark: #a3134f;
  --plum: #560f3a;
  --orange: #f05a24;
  --orange-btn: #d6461a; /* darker orange so white button text is readable */
  --gold: #f9ab1f;
  --cream: #f6e6c6; /* exact cream from the logo (Branding/Tagline.svg) */
  --paper: #fffaf1;
  --ink: #2b0b1d;
  --muted: #6e5560;
  --line: #ecdcc8;
  --card: #ffffff;
  --ok-bg: #e5f4e8;
  --ok-text: #1d6b33;
  --tagline-font: "Courgette", cursive;
  --font: "Nunito", system-ui, -apple-system, sans-serif;
  --radius: 14px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 var(--font); }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(26px, 5vw, 38px); font-weight: 900; }
h2 { font-size: clamp(21px, 3.6vw, 28px); font-weight: 900; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- top banner + header ---------- */
.banner { background: var(--plum); color: var(--cream); text-align: center; font-size: 14px; font-weight: 700; padding: 8px 16px; }
.banner a { color: var(--gold); }
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; gap: 12px; height: 64px; }
.logo img { height: 42px; width: auto; }
.nav { display: none; gap: 20px; margin-left: 24px; font-weight: 800; font-size: 15px; }
.nav a { text-decoration: none; }
.nav a:hover { color: var(--magenta); }
.header-spacer { flex: 1; }
.cart-link { position: relative; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-weight: 800;
  background: var(--magenta); color: #fff; border-radius: 99px; padding: 8px 14px; }
.cart-count { background: var(--gold); color: var(--plum); border-radius: 99px; min-width: 22px; height: 22px;
  display: inline-grid; place-items: center; font-size: 13px; padding: 0 6px; }
.menu-btn { background: none; border: 0; font: inherit; font-weight: 800; padding: 8px; cursor: pointer; color: var(--ink); }
.mobile-nav { display: none; border-top: 1px solid var(--line); padding: 8px 16px 16px; }
.mobile-nav.open { display: grid; gap: 4px; }
.mobile-nav a { text-decoration: none; font-weight: 800; padding: 10px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 860px) {
  .nav { display: flex; }
  .menu-btn, .mobile-nav, .mobile-nav.open { display: none; }
  .logo img { height: 48px; }
}

/* ---------- hero ---------- */
.hero { background: var(--magenta); color: var(--cream); text-align: center; padding: 36px 0 44px; overflow: hidden; }
.hero .logo-big { width: min(560px, 88%); height: auto; margin: 0 auto; filter: drop-shadow(0 6px 0 rgba(86, 15, 58, .35)); }
.tagline { font-family: var(--tagline-font); font-size: clamp(22px, 4.4vw, 34px); color: var(--cream); margin: 14px 0 6px; }
.hero p.lead { max-width: 560px; margin: 10px auto 22px; font-size: 17px; color: #ffeef4; }

.btn { display: inline-block; border: 0; cursor: pointer; font: inherit; font-weight: 900; text-decoration: none;
  border-radius: 99px; padding: 14px 26px; font-size: 19px; transition: transform .1s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--orange-btn); color: #fff; box-shadow: 0 4px 0 var(--plum); }
.btn-primary:hover { background: #c23c12; }
.btn-primary:disabled { background: #c9b6ae; box-shadow: none; cursor: not-allowed; }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-pink { background: var(--magenta); color: #fff; box-shadow: 0 4px 0 var(--plum); }
.btn-pink:hover, .btn-pink:focus-visible { background: var(--plum); color: #fff; }

/* ---------- sections ---------- */
section.block { padding: 36px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-head a { font-weight: 800; color: var(--magenta); }

.themes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 860px) { .themes { grid-template-columns: repeat(4, 1fr); gap: 16px; } }
.theme-card { position: relative; border-radius: var(--radius); overflow: hidden; text-decoration: none; background: var(--plum); aspect-ratio: 1; }
.theme-card img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.theme-card span { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 12px 12px; color: #fff; font-weight: 900;
  font-size: 17px; background: linear-gradient(transparent, rgba(43, 11, 29, .85)); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { text-decoration: none; font-weight: 800; border: 2px solid var(--plum); color: var(--plum); border-radius: 99px; padding: 8px 16px; background: #fff; }
.chip:hover, .chip[aria-current="page"] { background: var(--plum); color: var(--cream); }

/* ---------- product grid ---------- */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(4, 1fr); gap: 18px; } }
.card { text-decoration: none; background: var(--card); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  display: flex; flex-direction: column; }
.card img { aspect-ratio: 1; object-fit: cover; width: 100%; height: auto; background: #f3eee7; }
.card .info { padding: 10px 12px 14px; display: grid; gap: 2px; }
.card .title { font-weight: 800; font-size: 15px; line-height: 1.3; }
.card .price { color: var(--magenta-dark); font-weight: 900; }
.badge { display: inline-block; font-size: 12px; font-weight: 800; background: var(--ok-bg); color: var(--ok-text); border-radius: 99px; padding: 2px 9px; }
.card .badge { justify-self: start; margin-top: 4px; }

/* ---------- product page ---------- */
.crumbs { font-size: 14px; color: var(--muted); margin: 16px 0; }
.crumbs a { color: var(--muted); }
.pdp { display: grid; gap: 22px; padding-bottom: 40px; }
.pdp > * { min-width: 0; } /* lets the thumbnail strip scroll instead of widening the page */
@media (min-width: 900px) { .pdp { grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: start; } }
.gallery .main { display: block; position: relative; width: 100%; padding: 0; border: 0; font: inherit; cursor: zoom-in;
  border-radius: var(--radius); overflow: hidden; background: #f3eee7; aspect-ratio: 1; }
.gallery .main img { width: 100%; height: 100%; object-fit: cover; }
.gallery .main:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.zoom-hint { position: absolute; right: 10px; bottom: 10px; background: rgba(43, 11, 29, .72); color: #fff; font-size: 13px;
  font-weight: 800; padding: 5px 10px; border-radius: 99px; pointer-events: none; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 4px; scrollbar-width: thin; }
.thumbs button { flex: 0 0 64px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; cursor: pointer; background: #f3eee7; }
.thumbs button[aria-current="true"] { border-color: var(--magenta); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.buybox h1 { margin-bottom: 4px; }
.buybox .price { font-size: 26px; font-weight: 900; color: var(--magenta-dark); margin: 6px 0 10px; }
.option { margin: 18px 0; border: 0; padding: 0; }
.option legend { font-weight: 900; margin-bottom: 8px; }
.option legend span { font-weight: 600; color: var(--muted); }
.values { display: flex; flex-wrap: wrap; gap: 8px; }
.values label { cursor: pointer; }
.values input { position: absolute; opacity: 0; pointer-events: none; }
.pill { display: inline-block; min-width: 48px; text-align: center; border: 2px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 12px; font-weight: 800; }
.values input:checked + .pill { border-color: var(--plum); background: var(--plum); color: var(--cream); }
.values input:focus-visible + .pill, .values input:focus-visible + .swatch { outline: 3px solid var(--gold); outline-offset: 2px; }
.values input:disabled + .pill { opacity: .35; text-decoration: line-through; }
.swatch { display: inline-block; width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--line); box-shadow: inset 0 0 0 3px #fff; }
.values input:checked + .swatch { border-color: var(--plum); box-shadow: inset 0 0 0 3px #fff, 0 0 0 2px var(--plum); }
.note { font-size: 14px; color: var(--muted); margin: 10px 0; }
.details { margin: 22px 0 0; padding-left: 20px; }
.details li { margin: 4px 0; }
.added { display: none; margin-top: 10px; font-weight: 800; color: var(--ok-text); }
.added.show { display: block; }

/* ---------- text pages ---------- */
.prose { max-width: 720px; padding: 28px 0 48px; }
.prose h2 { font-size: 21px; margin-top: 1.6em; }
.prose a { color: var(--magenta-dark); font-weight: 800; }
.prose a.btn { color: #fff; } /* buttons inside text pages keep white text */

/* ---------- footer ---------- */
.site-footer { background: var(--plum); color: var(--cream); padding: 36px 0 28px; margin-top: 20px; }
.site-footer .tagline { font-size: 24px; margin: 0 0 16px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 0 0 18px; padding: 0; list-style: none; font-weight: 800; }
.footer-links a { color: var(--cream); text-decoration: none; }
.footer-links a:hover { color: var(--gold); }
.site-footer small { color: #d9b9c8; }

/* ---------- cart ---------- */
.cart-page { padding: 24px 16px 48px; }
.cart-grid { display: grid; gap: 22px; }
@media (min-width: 900px) { .cart-grid { grid-template-columns: 1.6fr 1fr; align-items: start; gap: 36px; } }
.cart-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.cart-line { display: grid; grid-template-columns: 88px 1fr; gap: 12px; align-items: start;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.cart-line img { width: 88px; height: 88px; object-fit: cover; border-radius: 10px; background: #f3eee7; }
.cart-info { display: grid; gap: 2px; min-width: 0; }
.cart-info .note { margin: 0; }
.cart-title { font-weight: 800; text-decoration: none; }
.cart-price { font-weight: 900; margin-left: auto; }
.cart-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 8px; }
.qty { display: inline-flex; align-items: center; border: 2px solid var(--line); border-radius: 99px; background: #fff; }
.qty button { width: 38px; height: 38px; border: 0; background: none; font: inherit; font-size: 20px; font-weight: 900; cursor: pointer; color: var(--plum); }
.qty button:disabled { opacity: .3; cursor: not-allowed; }
.qty span { min-width: 26px; text-align: center; font-weight: 900; }
.link-btn { border: 0; background: none; font: inherit; color: var(--magenta-dark); text-decoration: underline; cursor: pointer; padding: 6px 0; font-weight: 700; }
.cart-summary { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 10px; }
.sum-row { display: flex; justify-content: space-between; gap: 12px; }
.sum-row.total { font-weight: 900; font-size: 19px; border-top: 1px solid var(--line); padding-top: 10px; }
.ship-msg { margin: 0; font-weight: 800; color: var(--plum); }
.ship-msg.ok { color: var(--ok-text); }
.ship-bar { height: 10px; background: #f3e6d6; border-radius: 99px; overflow: hidden; }
.ship-bar span { display: block; height: 100%; background: var(--orange); border-radius: 99px; }

/* Original tagline lettering (image). Live-text fallback uses .tagline with the Courgette font. */
.tagline-img img { display: block; height: auto; margin: 0 auto; }
.tagline-img.hero img { width: min(600px, 96%); }
.tagline-img.hero { margin: 18px 0 8px; }
.tagline-img.footer { margin: 0 0 18px; }
.tagline-img.footer img { width: min(380px, 100%); margin: 0; }

/* ---------- photo zoom (full-screen viewer) ---------- */
html.zoom-open { overflow: hidden; }
.zoom { position: fixed; inset: 0; z-index: 100; background: rgba(20, 6, 14, .94); }
.zoom[hidden] { display: none; }
.zoom-stage { position: absolute; inset: 0; overflow: auto; display: flex; align-items: center; justify-content: center;
  overscroll-behavior: contain; touch-action: pan-x pan-y pinch-zoom; }
.zoom-stage img { max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-in; user-select: none; -webkit-user-drag: none; }
.zoom.zoomed .zoom-stage { display: block; cursor: grab; }
.zoom.zoomed .zoom-stage img { max-width: none; max-height: none; width: 250%; cursor: zoom-out; }
@media (min-width: 900px) { .zoom.zoomed .zoom-stage img { width: auto; } } /* full 1600 px detail on computers */
.zoom-btn { position: absolute; border: 0; background: rgba(255, 255, 255, .92); color: var(--plum); font: inherit;
  font-weight: 900; width: 46px; height: 46px; border-radius: 50%; cursor: pointer; display: grid; place-items: center;
  font-size: 22px; box-shadow: 0 2px 10px rgba(0, 0, 0, .3); }
.zoom-btn[hidden] { display: none; }
.zoom-close { top: 14px; right: 14px; }
.zoom-prev, .zoom-next { top: 50%; transform: translateY(-50%); font-size: 32px; line-height: 1; }
.zoom-prev { left: 12px; } .zoom-next { right: 12px; }
.zoom.zoomed .zoom-prev, .zoom.zoomed .zoom-next, .zoom.zoomed .zoom-tip { display: none; }
.zoom-tip, .zoom-count { position: absolute; left: 0; right: 0; margin: 0; text-align: center; color: #f6e6c6; font-size: 14px; font-weight: 700; pointer-events: none; }
.zoom-tip { bottom: 18px; } .zoom-count { top: 26px; }
.zoom-btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.cart-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cart-head a { font-weight: 800; color: var(--magenta-dark); }
.just-added { margin-bottom: 12px; }
.cart-left { display: grid; gap: 16px; align-content: start; }
.keep-shopping { margin-top: 4px; }
