/* =========================================================
   Mariel Store — stylesheet
   ---------------------------------------------------------
   Sections (search by header text to jump):
     1.  Variables / tokens (:root)
     2.  Reset + base
     3.  Layout helpers
     4.  Typography
     5.  Buttons
     6.  Header / Nav
     7.  Hero / Page header
     8.  Cards / Split / Categories
     9.  Products grid + Product detail
     10. Contact / CTA / Footer
     11. Auth + Account
     12. Cart drawer + Mobile menu + Toast
     13. Reveal on scroll
     14. Checkout              — checkout.html
     15. Orders                — orders.html
     16. Saved addresses        — account.html
     17. Responsive / Media queries (all consolidated here)
   Naming: state classes use plain words (.open, .active, .hidden,
   .on, .ok, .bad). Use --brand / --ink / --line / --bg tokens
   instead of raw hex values when editing.
   ========================================================= */

/* =========================================================
   Font definitions
   ========================================================= */
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("./fonts/pjs-400.ttf") format("truetype"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("./fonts/pjs-500.ttf") format("truetype"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("./fonts/pjs-600.ttf") format("truetype"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("./fonts/pjs-700.ttf") format("truetype"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 800; font-display: swap; src: url("./fonts/pjs-800.ttf") format("truetype"); }

/* =========================================================
   1. Variables / tokens
   ========================================================= */
:root {
  /* Brand */
  --brand:        #b91c1c;
  --brand-dark:   #7f1010;
  --brand-soft:   #fff1f1;
  --brand-border: #ffd9d3;   /* border for brand-tinted panels */

  /* Ink / text */
  --ink:   #111418;
  --ink-2: #2a2f36;
  --muted: #6b7280;

  /* Surfaces */
  --line: #e6e8eb;
  --bg:   #f7f7f8;
  --card: #ffffff;

  /* Status */
  --ok:   #15803d;
  --warn: #b45309;

  /* Danger — used by delete buttons */
  --danger:      #c0392b;
  --danger-dark: #a83224;

  /* Address accent (warm gold) */
  --addr-accent:     #cdb38b;
  --addr-soft:       #fbf6ec;
  --addr-label-bg:   #f3eee5;
  --addr-label-text: #6b5a3a;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(17, 20, 24, .06);
  --shadow:    0 6px 20px rgba(17, 20, 24, .08);
  --shadow-lg: 0 20px 60px rgba(17, 20, 24, .18);

  /* Shape */
  --radius:    12px;
  --radius-sm: 8px;
  --radius-lg: 20px;

  /* Layout */
  --container: 1180px;
  --header-h:  72px;

  /* Transitions */
  --t: .2s ease;
}

/* =========================================================
   2. Reset + base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }

/* =========================================================
   3. Layout helpers
   ========================================================= */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.section { padding: 72px 0; }
.section-tight { padding: 48px 0; }
.section-white { background: #fff; }
.section-soft { background: var(--brand-soft); }
.center { text-align: center; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.hidden { display: none !important; }
.spacer { flex: 1; }
.muted { color: var(--muted); }

/* =========================================================
   4. Typography
   ========================================================= */
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4vw + 1rem, 3.5rem); }
h2 { font-size: clamp(1.5rem, 2vw + 1rem, 2.25rem); }
h3 { font-size: 1.15rem; }
h4 { font-size: .95rem; }
p { color: var(--ink-2); }
em { color: inherit; font-style: normal; }
.eyebrow {
  display: inline-block; font-size: .75rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--brand); background: var(--brand-soft);
  padding: 6px 12px; border-radius: 999px;
}
.lead { font-size: 1.05rem; color: var(--muted); max-width: 60ch; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 40px; }
.section-head .lead { margin-inline: auto; }

/* =========================================================
   5. Buttons
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: .95rem;
  transition: transform var(--t), background var(--t), color var(--t), box-shadow var(--t);
  white-space: nowrap;
  background: var(--brand); color: #fff;
}
.btn:hover { background: var(--brand-dark); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-outline {
  background: transparent; color: var(--ink);
  border: 1.5px solid var(--line);
}
.btn-outline:hover { border-color: var(--ink); background: var(--ink); color: #fff; }
.btn-ghost {
  background: transparent; color: var(--ink);
}
.btn-ghost:hover { background: var(--brand-soft); color: var(--brand); }
.btn-light {
  background: #fff; color: var(--brand);
}
.btn-light:hover { background: var(--ink); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: .82rem; }
.btn-block { width: 100%; }
.btn-danger {
  background: var(--danger); color: #fff; border: 1px solid var(--danger);
}
.btn-danger:hover { background: var(--danger-dark); border-color: var(--danger-dark); }
.btn-icon {
  width: 40px; height: 40px; padding: 0; border-radius: 999px;
  display: inline-grid; place-items: center; position: relative;
  background: transparent; color: var(--ink);
}
.btn-icon:hover { background: var(--brand-soft); color: var(--brand); }
.btn-icon .badge {
  position: absolute; top: 2px; right: 2px;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--brand); color: #fff;
  font-size: .7rem; font-weight: 700; border-radius: 999px;
  display: grid; place-items: center;
}

/* =========================================================
   6. Header / Nav
   ========================================================= */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; gap: 24px;
  height: var(--header-h);
}
.nav .brand { display: flex; align-items: center; gap: 10px; }
.nav .brand img { height: 42px; width: auto; }
.nav .brand span { font-weight: 800; letter-spacing: -.02em; font-size: 1.05rem; }
.nav-links {
  display: flex; align-items: center; gap: 4px; flex: 1;
}
.nav-links a {
  padding: 8px 14px; border-radius: 999px;
  font-size: .9rem; font-weight: 500; color: var(--ink-2);
  transition: background var(--t), color var(--t);
}
.nav-links a:hover { background: var(--brand-soft); color: var(--brand); }
.nav-links a.active { background: var(--ink); color: #fff; }
.nav-actions { display: flex; align-items: center; gap: 6px; }
.nav-actions .auth-text {
  font-size: .85rem; color: var(--muted); padding: 8px 12px;
}
.nav-actions .auth-text a { color: var(--ink); font-weight: 600; }
.nav-actions .auth-text a:hover { color: var(--brand); }

/* User account dropdown */
.user-menu { position: relative; }
.user-trigger {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 6px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand);
  font-weight: 600; font-size: .85rem;
}
.user-trigger .avatar {
  width: 28px; height: 28px; border-radius: 999px;
  background: var(--brand); color: #fff;
  display: grid; place-items: center; font-size: .8rem; font-weight: 700;
}
/* Fades in on hover or when a child receives keyboard focus */
.user-dropdown {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  min-width: 200px; padding: 6px; opacity: 0; visibility: hidden;
  transform: translateY(-4px); transition: var(--t);
}
.user-menu:hover .user-dropdown,
.user-menu:focus-within .user-dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.user-dropdown a, .user-dropdown button {
  display: block; padding: 10px 12px; border-radius: var(--radius-sm);
  font-size: .9rem; color: var(--ink-2); width: 100%; text-align: left;
}
.user-dropdown a:hover, .user-dropdown button:hover {
  background: var(--brand-soft); color: var(--brand);
}

/* Hidden on desktop; shown via hamburger on mobile */
.menu-toggle { display: none; }

/* =========================================================
   7. Hero / Page header
   ========================================================= */
.hero {
  position: relative;
  background:
    linear-gradient(135deg, rgba(17,20,24,.78), rgba(127,16,16,.6)),
    url("./images/hero-img.webp") center/cover no-repeat;
  color: #fff;
  padding: clamp(72px, 12vw, 140px) 0;
  overflow: hidden;
}
.hero .container { max-width: 820px; text-align: center; }
.hero .eyebrow { background: rgba(255,255,255,.15); color: #fff; }
.hero h1 { color: #fff; margin: 18px 0 16px; }
.hero h1 em { color: inherit; }
.hero p { color: rgba(255,255,255,.88); font-size: 1.1rem; max-width: 60ch; margin: 0 auto 28px; }
.hero .row { justify-content: center; }

/* Dark banner used on all inner pages */
.page-header {
  background: linear-gradient(135deg, var(--ink) 0%, #1f2329 100%);
  color: #fff; padding: 64px 0 56px; text-align: center;
}
.page-header h1 { color: #fff; margin-bottom: 10px; }
.page-header h1 em { color: inherit; }
.page-header p { color: rgba(255,255,255,.75); max-width: 60ch; margin-inline: auto; }

/* =========================================================
   8. Cards / Split / Categories
   ========================================================= */

/* Feature / value cards */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px;
  transition: var(--t);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; }
.card .icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; font-size: 1.4rem; margin-bottom: 16px;
}
.card h3 { margin-bottom: 6px; }
.card p { font-size: .95rem; color: var(--muted); }

/* Numbered step cards */
.step { position: relative; padding-top: 48px; }
.step .num {
  position: absolute; top: 28px; right: 28px;
  font-size: 2rem; font-weight: 800; color: var(--brand-soft);
}

/* Two-column image + text block */
.split {
  display: grid; gap: 40px;
  grid-template-columns: 1fr;
  align-items: center;
}
.split img { width: 100%; height: 100%; max-height: 460px; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.split .stack { gap: 20px; }
.split ul { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.split ul li {
  padding-left: 28px; position: relative; color: var(--ink-2);
}
.split ul li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  width: 20px; height: 20px; border-radius: 999px;
  background: var(--brand); color: #fff;
  display: grid; place-items: center; font-size: .7rem; font-weight: 700;
}

/* Category image tiles — isolation prevents ::after overlay from bleeding */
.cats { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.cat {
  position: relative; aspect-ratio: 4/3; border-radius: var(--radius);
  overflow: hidden; cursor: pointer; isolation: isolate;
}
.cat img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.cat::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.05) 0%, rgba(0,0,0,.7) 100%);
}
.cat span {
  position: absolute; left: 16px; bottom: 14px; z-index: 1;
  color: #fff; font-weight: 700; font-size: 1.05rem;
}
.cat:hover img { transform: scale(1.06); }

/* =========================================================
   9. Products grid + Product detail
   ========================================================= */
.toolbar {
  display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px;
  align-items: center;
}
.toolbar .search {
  flex: 1; min-width: 220px; position: relative;
}
.toolbar .search input {
  width: 100%; padding: 12px 14px 12px 40px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  outline: none; transition: border var(--t), box-shadow var(--t);
}
.toolbar .search input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.toolbar .search::before {
  content: "🔍"; position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  font-size: .9rem; opacity: .6;
}
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 8px 14px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line);
  font-size: .85rem; color: var(--ink-2); transition: var(--t);
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.products { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.product {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: var(--t); display: flex; flex-direction: column;
  position: relative;
}
.product:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.product .media {
  display: block; text-decoration: none;
  position: relative; aspect-ratio: 1/1; overflow: hidden; background: var(--bg);
}
.product .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.product:hover .media img { transform: scale(1.05); }
.product .tag {
  position: absolute; top: 10px; left: 10px;
  background: var(--brand); color: #fff; font-size: .7rem; font-weight: 700;
  padding: 4px 10px; border-radius: 999px; letter-spacing: .03em;
}
.product .info { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product .cat-label { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.product h3 { font-size: 1rem; font-weight: 600; }
.product h3 a { color: inherit; text-decoration: none; }
.product h3 a:hover { color: var(--brand); }
.product .price { font-size: 1.15rem; font-weight: 700; color: var(--brand); margin-top: auto; }
.product .actions { display: flex; gap: 8px; padding: 0 16px 16px; }
.product .actions .btn { flex: 1; }

/* Empty / no-results state */
.empty {
  text-align: center; padding: 60px 20px; color: var(--muted);
}
.empty .icon { font-size: 2.5rem; margin-bottom: 10px; }

/* Breadcrumb — product.html */
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 24px; }
.crumbs a { color: var(--muted); text-decoration: none; text-transform: capitalize; }
.crumbs a:hover { color: var(--brand); }
.crumbs span { color: var(--ink); text-transform: capitalize; }

/* Product detail layout — product.html */
.product-detail {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start;
}
.pd-media {
  position: relative; aspect-ratio: 1/1; background: var(--bg);
  border-radius: var(--radius); overflow: hidden;
}
.pd-media img { width: 100%; height: 100%; object-fit: cover; }
.pd-media .tag {
  position: absolute; top: 14px; left: 14px;
  background: var(--ink); color: #fff; padding: 5px 12px;
  border-radius: 999px; font-size: .75rem; font-weight: 600;
}
.pd-info h1 { font-size: 2rem; margin: 8px 0 12px; }
.pd-price { font-size: 1.75rem; font-weight: 800; color: var(--brand); margin-bottom: 16px; }
.stock-pill {
  display: inline-block; vertical-align: middle;
  margin-left: 10px; padding: 3px 10px; border-radius: 999px;
  color: #fff; font-size: .75rem; font-weight: 600;
}
.stock-pill.in  { background: var(--ok); }
.stock-pill.out { background: var(--brand); }
.pd-desc { color: var(--muted); line-height: 1.6; margin-bottom: 20px; }
.pd-meta {
  list-style: none; padding: 16px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  margin-bottom: 20px; display: grid; gap: 8px; font-size: .9rem;
}
.pd-meta strong { color: var(--ink); margin-right: 6px; }
.pd-qty { margin-bottom: 20px; }
.pd-qty label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 8px; font-weight: 600; }
.qty-box { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.qty-box button { width: 40px; height: 44px; border: 0; background: transparent; cursor: pointer; font-size: 1.1rem; }
.qty-box button:hover { background: var(--bg); }
.qty-box input { width: 56px; height: 44px; border: 0; text-align: center; font-size: 1rem; font-family: inherit; -moz-appearance: textfield; }
.qty-box input::-webkit-outer-spin-button,
.qty-box input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pd-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.pd-actions .btn { flex: 1; min-width: 180px; }

/* =========================================================
   10. Contact / CTA / Footer
   ========================================================= */
.info-box {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px;
}
.info-item {
  display: flex; gap: 14px; padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.info-item:last-child { border-bottom: 0; }
.info-icon {
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; font-size: 1.1rem; flex-shrink: 0;
}
.info-item h4 { margin-bottom: 2px; }
.info-item p { font-size: .9rem; color: var(--muted); }

.cta {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff; padding: 56px 0;
}
.cta .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.cta h2 { color: #fff; margin-bottom: 4px; }
.cta p { color: rgba(255,255,255,.85); }

.site-footer {
  background: var(--ink); color: rgba(255,255,255,.7);
  padding: 56px 0 24px; margin-top: 0;
}
.footer-grid {
  display: grid; gap: 32px;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,.1);
}
.site-footer .brand img { height: 42px; }
.site-footer .brand { color: #fff; font-weight: 800; font-size: 1.05rem; display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.site-footer p { color: rgba(255,255,255,.6); font-size: .9rem; max-width: 36ch; }
.footer-col h4 {
  color: #fff; font-size: .8rem; text-transform: uppercase;
  letter-spacing: .12em; margin-bottom: 16px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: .9rem; color: rgba(255,255,255,.65); transition: color var(--t); }
.footer-col a:hover { color: #fff; }
.footer-col p { font-size: .9rem; margin-bottom: 6px; }
.footer-col p strong { color: #fff; font-weight: 600; }
.footer-bottom {
  text-align: center; font-size: .8rem; color: rgba(255,255,255,.4);
  padding-top: 20px;
}

/* =========================================================
   11. Auth forms + Account — login.html / register.html / account.html
   ========================================================= */
.auth-card {
  max-width: 440px; margin: 0 auto;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 36px;
  box-shadow: var(--shadow);
}
.auth-card h2 { margin-bottom: 6px; }
.auth-card .lead { margin-bottom: 24px; font-size: .95rem; }

/* Shared form field (used across auth, account, checkout, addresses) */
.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 6px; font-weight: 600; font-size: .85rem; }
.field input,
.field select,
.field textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: #fff;
  transition: border var(--t), box-shadow var(--t);
  box-sizing: border-box;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 36px;
  cursor: pointer;
}
.field select:disabled {
  background-color: #f5f5f5;
  color: #aaa;
  cursor: not-allowed;
  border-color: #e0e0e0;
}
.field textarea {
  resize: vertical;
  min-height: 80px;
}

/* Show / hide password toggle button */
.password-wrap { position: relative; }
.password-wrap input { padding-right: 64px; width: 100%; }
.password-toggle {
  position: absolute; top: 50%; right: 8px; transform: translateY(-50%);
  background: transparent; border: 0; padding: 4px 8px;
  font-size: .8rem; font-weight: 600; color: var(--brand);
  cursor: pointer; border-radius: 6px;
}
.password-toggle:hover { background: rgba(0,0,0,.04); }
.password-toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }

.hint { margin-top: 6px; font-size: .8rem; color: var(--muted); }
.hint.ok { color: var(--ok); }
.hint.bad { color: var(--brand); }
.form-msg { margin-top: 14px; font-size: .9rem; min-height: 1em; color: var(--brand); }
.form-msg.ok { color: var(--ok); }
.divider {
  display: flex; align-items: center; gap: 12px;
  margin: 22px 0; font-size: .8rem; color: var(--muted);
}
.divider::before, .divider::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}
.social-row { display: flex; gap: 10px; justify-content: center; }
.social-btn {
  width: 48px; height: 48px; border-radius: 12px;
  border: 1px solid var(--line); background: #fff;
  display: grid; place-items: center; transition: var(--t);
}
.social-btn:hover { border-color: var(--brand); transform: translateY(-2px); }
.social-btn svg { width: 22px; height: 22px; }
.auth-switch { text-align: center; margin-top: 18px; font-size: .9rem; color: var(--muted); }
.auth-switch a { color: var(--brand); font-weight: 600; }

/* Account info card — account.html */
.account-card {
  max-width: 600px; margin: 0 auto;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 36px;
}
.account-card h2 { margin-bottom: 24px; }
.account-row {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
  font-size: .95rem;
}
.account-row:last-child { border: 0; }
.account-row .k { color: var(--muted); font-weight: 500; }
.account-row .v { color: var(--ink); font-weight: 600; text-align: right; }
.account-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.account-head h2 { margin: 0; }
.account-card .row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.link-btn { background: none; border: 0; color: var(--brand); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; }
.link-btn:hover { opacity: .8; }

/* =========================================================
   12. Cart drawer + Mobile menu + Toast
   ========================================================= */
.scrim {
  position: fixed; inset: 0; background: rgba(17,20,24,.5);
  opacity: 0; visibility: hidden; transition: var(--t); z-index: 90;
}
.scrim.open { opacity: 1; visibility: visible; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100dvh; width: min(420px, 92vw);
  background: #fff; box-shadow: var(--shadow-lg); z-index: 100;
  transform: translateX(100%); transition: transform .3s ease;
  display: flex; flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--line);
}
.drawer-head h3 { font-size: 1.1rem; }
.drawer-head .close {
  width: 36px; height: 36px; border-radius: 999px;
  display: grid; place-items: center;
}
.drawer-head .close:hover { background: var(--bg); }
.drawer-body { flex: 1; overflow: auto; padding: 14px 22px; }
.drawer-foot {
  border-top: 1px solid var(--line); padding: 18px 22px;
  display: flex; flex-direction: column; gap: 12px;
}
.drawer-foot .total {
  display: flex; justify-content: space-between; font-weight: 600;
}
.drawer-foot .total .amt { color: var(--brand); font-size: 1.2rem; }

.cart-item {
  display: grid; grid-template-columns: 60px 1fr auto; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.cart-item img {
  width: 60px; height: 60px; object-fit: cover; border-radius: var(--radius-sm);
}
.cart-item .name { font-weight: 600; font-size: .9rem; margin-bottom: 4px; }
.cart-item .price { color: var(--brand); font-size: .85rem; font-weight: 600; }
.cart-item .qty {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 6px;
  border: 1px solid var(--line); border-radius: 999px; padding: 2px;
}
.cart-item .qty button {
  width: 24px; height: 24px; border-radius: 999px;
  display: grid; place-items: center; font-weight: 700;
  background: var(--bg);
}
.cart-item .qty button:hover { background: var(--brand); color: #fff; }
.cart-item .qty span { font-weight: 600; min-width: 20px; text-align: center; font-size: .85rem; }
.cart-item .remove { color: var(--muted); font-size: .75rem; }
.cart-item .remove:hover { color: var(--brand); }

.mobile-nav {
  position: fixed; top: 0; left: 0; height: 100dvh; width: min(320px, 86vw);
  background: #fff; z-index: 100; padding: 20px;
  transform: translateX(-100%); transition: transform .3s ease;
  display: flex; flex-direction: column; gap: 4px;
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav .top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.mobile-nav a {
  padding: 12px 14px; border-radius: var(--radius-sm);
  font-weight: 500; color: var(--ink-2);
}
.mobile-nav a:hover, .mobile-nav a.active {
  background: var(--brand-soft); color: var(--brand);
}
.mobile-nav-auth {
  margin-top: auto; padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 8px;
}
.mobile-nav-auth .btn { padding: 12px 14px; }
.mobile-nav-auth .btn:hover { background: var(--brand); color: #fff; }
.mobile-nav-auth #mobile-user-menu { display: flex; flex-direction: column; gap: 4px; }
.mobile-nav-auth #mobile-logout-btn {
  text-align: left; padding: 12px 14px;
  border-radius: var(--radius-sm); font-weight: 600;
  color: var(--brand); background: transparent; border: 0; cursor: pointer;
}
.mobile-nav-auth #mobile-logout-btn:hover { background: var(--brand-soft); }

.toast-stack {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 10px;
  z-index: 200; pointer-events: none;
}
.toast {
  background: var(--ink); color: #fff;
  padding: 12px 18px; border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: .9rem; font-weight: 500;
  display: flex; align-items: center; gap: 10px;
  animation: toastIn .25s ease, toastOut .25s ease 2.6s forwards;
  pointer-events: auto;
}
.toast.ok  { background: var(--ok); }
.toast.bad { background: var(--brand); }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateY(8px); }
}

/* =========================================================
   13. Reveal on scroll
   ========================================================= */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* =========================================================
   14. Checkout — checkout.html
   ========================================================= */
.checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.checkout-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  margin-top: 8px;
}
.checkout-fields .co-full { grid-column: 1 / -1; }

.pay-options { display: grid; gap: 10px; margin-top: 8px; }
.pay-opt {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.pay-opt:hover { border-color: #bbb; }
.pay-opt input[type="radio"] { margin-top: 4px; }
/* :has() highlights the selected payment option row */
.pay-opt:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.pay-title { font-weight: 600; }

.checkout-summary .co-item {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
}
.checkout-summary .co-item:last-child { border-bottom: 0; }
.co-item img { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; }
.co-item-name { font-weight: 600; font-size: .93rem; }
.co-item-total { font-weight: 600; }

.co-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: .95rem;
}
.co-row.co-total {
  font-weight: 700;
  font-size: 1.1rem;
  border-top: 1px solid var(--line);
  margin-top: 6px;
  padding-top: 12px;
}

/* =========================================================
   15. Orders — orders.html
   ========================================================= */
.thank-banner {
  display: flex;
  gap: 16px;
  align-items: center;
  background: linear-gradient(135deg, var(--brand-soft), #fff);
  border: 1px solid var(--brand-border);
  border-radius: 14px;
  padding: 18px 22px;
  margin-bottom: 18px;
}
.thank-banner .icon { font-size: 2rem; }

.orders-list { display: grid; gap: 12px; }
.order-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  transition: border-color .15s, transform .15s;
}
.order-card:hover { border-color: var(--brand); transform: translateY(-1px); }
.order-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.order-id { font-weight: 700; }
.order-card-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  font-size: .93rem;
  color: var(--muted);
}
.order-card-body strong { color: var(--ink-2); font-size: 1.05rem; }

.order-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.order-items .co-item:first-child { padding-top: 0; }

/* Order status badge colours */
.status-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .02em;
}
.status-pending   { background: #fff4d9; color: #8a6100; }
.status-packed    { background: #e0ecff; color: #1c4ea1; }
.status-shipped   { background: #e6f3e6; color: #1f7a32; }
.status-delivered { background: #dff5e1; color: #15692a; }
.status-cancelled { background: #fde0e0; color: #a31919; }

/* =========================================================
   16. Saved addresses — account.html
   ========================================================= */
.addr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.addr-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.addr-card.is-default {
  border-color: var(--addr-accent);
  box-shadow: 0 0 0 2px rgba(205,179,139,.15);
}
.addr-card-head { display: flex; justify-content: space-between; align-items: center; }
.addr-label-pill {
  background: var(--addr-label-bg); color: var(--addr-label-text);
  font-size: .75rem; font-weight: 600;
  padding: 3px 10px; border-radius: 999px; letter-spacing: .03em;
}
.addr-default-pill {
  background: var(--ok); color: #fff;
  font-size: .7rem; font-weight: 600;
  padding: 3px 9px; border-radius: 999px;
}
.addr-card-body { font-size: .92rem; line-height: 1.45; }
.addr-card-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }

/* Address picker inside checkout page */
.addr-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.addr-pick-card {
  text-align: left;
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color .15s, background .15s;
  display: flex; flex-direction: column; gap: 6px;
}
.addr-pick-card:hover { border-color: var(--addr-accent); }
.addr-pick-card.active {
  border-color: var(--addr-accent);
  background: var(--addr-soft);
}
.addr-pick-head { display: flex; justify-content: space-between; align-items: center; }
.addr-pick-new {
  align-items: center; justify-content: center; text-align: center;
  border-style: dashed; color: var(--muted);
}
.check-row { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.check-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-width: 20px;
  margin-top: 2px;
  accent-color: var(--brand);
  cursor: pointer;
  border-radius: 4px;
}

/* =========================================================
   17. Responsive / Media queries
   ========================================================= */

/* Split block: single-column by default, 2-column above 800px */
@media (min-width: 800px) {
  .split { grid-template-columns: 1fr 1fr; gap: 60px; }
  .split.flip > :first-child { order: 2; }
}

/* Tablet / small desktop */
@media (max-width: 880px) {
  .nav-links,
  .nav-actions .auth-text,
  .nav-actions .user-menu { display: none; }
  .menu-toggle {
    display: inline-grid; place-items: center;
    width: 40px; height: 40px; border-radius: 999px;
  }
  .menu-toggle:hover { background: var(--brand-soft); color: var(--brand); }
  .nav { gap: 12px; }
  .nav .brand span { display: none; }
  .section { padding: 56px 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .checkout-grid { grid-template-columns: 1fr; }
  .order-detail  { grid-template-columns: 1fr; }
}

/* Product detail stacks vertically on tablet */
@media (max-width: 760px) {
  .product-detail { grid-template-columns: 1fr; gap: 28px; }
  .pd-info h1 { font-size: 1.5rem; }
  .pd-price   { font-size: 1.4rem; }
}

/* Checkout fields: single column on narrow screens */
@media (max-width: 640px) {
  .checkout-fields { grid-template-columns: 1fr; }
}

/* Mobile */
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 24px; }
  .cta .container { text-align: center; justify-content: center; }
}
