/* ============================================================
   Stitched Beyond — storefront styles
   Palette: ivory canvas, deep espresso ink, antique gold accent
   ============================================================ */

:root {
  --ivory: #faf7f2;
  --cream: #f3ede3;
  --ink: #241f1a;
  --ink-soft: #6b6259;
  --gold: #a8834b;
  --gold-dark: #8c6c3a;
  --blush: #e8d5c8;
  --line: #e5dccd;
  --white: #ffffff;
  --danger: #b3423f;
  --success: #4a7a55;
  --radius: 4px;
  --shadow: 0 10px 40px rgba(36, 31, 26, 0.08);
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Jost', 'Segoe UI', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--ink);
  background: var(--ivory);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 1rem; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }
.container.narrow { max-width: 720px; }

.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 0.6rem;
}

.muted { color: var(--ink-soft); font-size: 0.92rem; }
.text-gold { color: var(--gold); }
.text-danger { color: var(--danger); }

/* ---------- Announcement bar ---------- */
.announce {
  background: var(--ink);
  color: #d9c9a8;
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.45rem 1rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 247, 242, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 68px;
}

.brand { display: flex; align-items: center; gap: 0.6rem; }
.brand-mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--gold);
  font-size: 0.95rem;
  letter-spacing: 0.05em;
}
.brand-name {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.brand-name em { color: var(--gold); font-style: italic; }
.brand-logo { height: 56px; width: auto; max-width: 160px; object-fit: contain; }

.main-nav { display: flex; gap: 1.4rem; margin-left: auto; }
.main-nav a {
  font-size: 0.86rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 0.3rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.main-nav a:hover { color: var(--ink); border-color: var(--gold); }

.header-actions { display: flex; align-items: center; gap: 0.9rem; margin-left: auto; }
.main-nav + .header-actions { margin-left: 0; }

.search-form {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  padding: 0.15rem 0.3rem 0.15rem 0.9rem;
}
.search-form input {
  border: none; outline: none; background: transparent;
  width: 150px; font-size: 0.88rem;
}
.search-form button {
  border: none; background: transparent; color: var(--ink-soft);
  display: grid; place-items: center; padding: 0.35rem;
}

.icon-link { position: relative; color: var(--ink); display: grid; place-items: center; padding: 0.3rem; }
.icon-link:hover { color: var(--gold); }
.cart-badge {
  position: absolute; top: -4px; right: -6px;
  background: var(--gold); color: var(--white);
  font-size: 0.65rem; font-weight: 600;
  min-width: 17px; height: 17px;
  border-radius: 999px;
  display: grid; place-items: center;
  padding: 0 4px;
}

.nav-toggle { display: none; }

/* ---------- Messages ---------- */
.messages { margin-top: 1rem; }
.message {
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
  font-size: 0.92rem;
  margin-bottom: 0.5rem;
  border: 1px solid transparent;
}
.message-success { background: #eef5ef; color: var(--success); border-color: #cfe3d3; }
.message-info, .message-warning { background: #f7f2e7; color: #7a6435; border-color: #e8dcc0; }
.message-error { background: #f9ecec; color: var(--danger); border-color: #ecd2d1; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: all 0.25s;
  text-align: center;
  background: var(--cream);
  color: var(--ink);
}
.btn-primary { background: var(--ink); color: var(--ivory); }
.btn-primary:hover { background: var(--gold-dark); }
.btn-outline { background: transparent; border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--ivory); }
.btn-ghost { background: transparent; color: var(--ink-soft); text-decoration: underline; text-underline-offset: 4px; }
.btn-ghost:hover { color: var(--gold); }
.btn-block { display: block; width: 100%; }
.btn-sm { padding: 0.45rem 1rem; font-size: 0.75rem; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(ellipse at 80% 20%, rgba(168, 131, 75, 0.16), transparent 55%),
    radial-gradient(ellipse at 15% 85%, rgba(232, 213, 200, 0.5), transparent 60%),
    linear-gradient(160deg, var(--cream), var(--ivory) 70%);
  border-bottom: 1px solid var(--line);
}
.hero-inner { padding: clamp(4rem, 9vw, 8rem) 1.25rem; }
.hero-content { max-width: 620px; }
.hero h1 { margin-bottom: 1.2rem; }
.hero h1 em { color: var(--gold); font-style: italic; }
.hero p { font-size: 1.08rem; color: var(--ink-soft); margin-bottom: 2rem; max-width: 480px; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ---------- Sections ---------- */
.section { padding: clamp(3rem, 6vw, 5rem) 0; }
.section-flush { padding-top: 1.5rem; }
.section-tinted { background: var(--cream); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { text-align: center; margin-bottom: 2.5rem; }
.section-cta { text-align: center; margin-top: 2.5rem; }
.sub-heading { margin-bottom: 1.5rem; }

.page-head {
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  padding: clamp(2rem, 5vw, 3.5rem) 0;
  text-align: center;
}
.page-sub { color: var(--ink-soft); max-width: 560px; margin: 0.5rem auto 0; }

/* ---------- Category cards ---------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.2rem;
}
.category-card {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--blush);
}
.category-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s ease;
}
.category-card:hover img { transform: scale(1.06); }
.category-card-overlay {
  position: absolute; inset: auto 0 0 0;
  padding: 1.2rem;
  background: linear-gradient(transparent, rgba(36, 31, 26, 0.78));
  color: var(--ivory);
}
.category-card-overlay h3 { font-size: 1.4rem; }
.category-card-overlay span {
  font-size: 0.78rem; letter-spacing: 0.15em; text-transform: uppercase;
  color: #d9c9a8;
  opacity: 0;
  transform: translateY(4px);
  transition: all 0.3s;
  display: inline-block;
}
.category-card:hover .category-card-overlay span { opacity: 1; transform: none; }

/* ---------- Product cards ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.6rem;
}
.product-card { display: flex; flex-direction: column; }
.product-card-media {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--cream);
}
.product-card-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.55s ease;
}
.product-card:hover .product-card-media img { transform: scale(1.05); }

.product-card-placeholder {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: 2rem; color: var(--gold);
  background: linear-gradient(150deg, var(--cream), var(--blush));
}
.product-card-placeholder.large { aspect-ratio: 3 / 4; font-size: 4rem; }

.badge {
  position: absolute; top: 0.7rem; left: 0.7rem;
  font-size: 0.7rem; font-weight: 500;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}
.badge-sale { background: var(--gold); color: var(--white); }
.badge-out { background: var(--ink); color: var(--ivory); left: auto; right: 0.7rem; }

.product-card-body { padding: 0.9rem 0.2rem 0; }
.product-card-category {
  font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold);
}
.product-card-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0.15rem 0 0.3rem;
  transition: color 0.2s;
}
.product-card:hover .product-card-name { color: var(--gold-dark); }
.product-card-price { display: flex; align-items: baseline; gap: 0.6rem; }
.price { font-weight: 500; }
.price-lg { font-size: 1.5rem; }
.price-compare { color: var(--ink-soft); text-decoration: line-through; font-size: 0.88rem; }
.save-note { color: var(--gold); font-size: 0.85rem; }

/* ---------- Perks ---------- */
.perks { background: var(--ink); color: var(--ivory); padding: 3rem 0; }
.perks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 2rem;
}
.perk h3 { font-size: 1.15rem; margin-bottom: 0.4rem; font-family: var(--font-body); font-weight: 500; }
.perk p { color: #b5aa9c; font-size: 0.9rem; }
.about-perks .perk { text-align: center; }
.about-perks .perk h3 { font-family: var(--font-display); font-size: 2.2rem; color: var(--gold); }
.about-perks .perk p { color: var(--ink-soft); }

/* ---------- Shop toolbar ---------- */
.shop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.filter-pills { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.pill {
  padding: 0.4rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  background: var(--white);
  transition: all 0.2s;
}
.pill:hover { border-color: var(--gold); color: var(--gold-dark); }
.pill.active { background: var(--ink); color: var(--ivory); border-color: var(--ink); }

.sort-form { display: flex; align-items: center; gap: 0.6rem; font-size: 0.88rem; color: var(--ink-soft); }
.sort-form select {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.45rem 0.7rem;
  background: var(--white);
}

.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 1.5rem; margin-top: 3rem;
  font-size: 0.9rem; color: var(--ink-soft);
}
.pagination a { color: var(--gold-dark); letter-spacing: 0.08em; }

.empty-state { text-align: center; padding: 4rem 1rem; }
.empty-state h3 { font-size: 1.6rem; margin-bottom: 0.5rem; }
.empty-state p { color: var(--ink-soft); margin-bottom: 1.5rem; }

/* ---------- Error pages (404 / 403 / 400) ---------- */
.error-page {
  padding: clamp(4rem, 10vw, 7rem) 0;
  background:
    radial-gradient(ellipse at 80% 15%, rgba(168, 131, 75, 0.14), transparent 55%),
    radial-gradient(ellipse at 10% 90%, rgba(232, 213, 200, 0.45), transparent 60%);
}
.error-page-inner { max-width: 560px; margin: 0 auto; text-align: center; }
.error-icon {
  width: 60px; height: 60px;
  margin: 0 auto 1.2rem;
  display: grid; place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold);
}
.error-title { margin-bottom: 0.9rem; }
.error-message { color: var(--ink-soft); font-size: 1.05rem; margin-bottom: 2rem; }
.error-search { justify-content: center; max-width: 360px; margin: 0 auto 1.8rem; }
.error-search input { width: 100%; }
.error-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 2rem; }
.breadcrumb a:hover { color: var(--gold); }

/* ---------- Product detail ---------- */
.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
}
.gallery-main {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--cream);
}
.gallery-main img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 0.6rem; margin-top: 0.8rem; }
.thumb {
  width: 72px; height: 90px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: none; padding: 0;
  opacity: 0.7;
  transition: all 0.2s;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.active, .thumb:hover { opacity: 1; border-color: var(--gold); }

.product-info h1 { margin: 0.2rem 0 0.8rem; }
.product-price-row { display: flex; align-items: baseline; gap: 0.8rem; margin-bottom: 1.2rem; }
.product-desc { color: var(--ink-soft); margin-bottom: 1.8rem; max-width: 52ch; }

.field-label {
  font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase;
  font-weight: 500; margin-bottom: 0.6rem;
}
.qty-row { margin-bottom: 1.6rem; }
.qty-control {
  display: inline-flex; align-items: center;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--white);
}
.qty-control input {
  width: 52px; text-align: center; border: none; outline: none;
  font-size: 1rem; background: transparent;
  -moz-appearance: textfield;
  appearance: textfield;
}
.qty-control input::-webkit-outer-spin-button,
.qty-control input::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty-btn {
  width: 40px; height: 42px;
  border: none; background: transparent;
  font-size: 1.2rem; color: var(--ink-soft);
}
.qty-btn:hover { color: var(--gold-dark); }
.qty-sm .qty-btn { width: 32px; height: 34px; }
.qty-sm input { width: 40px; }

.buy-form { max-width: 420px; }
.cod-note { font-size: 0.85rem; color: var(--ink-soft); margin-top: 0.8rem; text-align: center; }
.soldout-note {
  background: var(--cream); border: 1px solid var(--line);
  padding: 1rem 1.2rem; border-radius: var(--radius);
  color: var(--ink-soft); margin-bottom: 1.5rem;
}

.product-meta { margin-top: 2rem; border-top: 1px solid var(--line); }
.product-meta > div {
  display: grid; grid-template-columns: 110px 1fr;
  gap: 1rem; padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}
.product-meta dt { color: var(--ink-soft); text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.12em; padding-top: 2px; }

/* ---------- Cart ---------- */
.cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 1fr);
  gap: 2rem;
  align-items: start;
}
.cart-item {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 1.1rem;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.cart-item-media { border-radius: var(--radius); overflow: hidden; background: var(--cream); }
.cart-item-media img { aspect-ratio: 3 / 4; object-fit: cover; }
.cart-item-body { display: flex; flex-direction: column; gap: 0.2rem; }
.cart-item-name { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; }
.cart-item-name:hover { color: var(--gold-dark); }
.cart-item-price { font-size: 0.85rem; color: var(--ink-soft); }
.cart-item-controls { display: flex; flex-direction: column; align-items: flex-end; gap: 0.5rem; }
.cart-item-total { font-weight: 500; }
.link-danger {
  background: none; border: none; color: var(--danger);
  font-size: 0.82rem; text-decoration: underline; text-underline-offset: 3px;
}

.cart-summary, .card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow);
}
.cart-summary h3 { margin-bottom: 1rem; }
.summary-row {
  display: flex; justify-content: space-between;
  padding: 0.55rem 0; font-size: 0.95rem;
  border-bottom: 1px solid var(--line);
}
.summary-row.muted { color: var(--ink-soft); font-size: 0.85rem; }
.summary-row.total { font-weight: 600; font-size: 1.05rem; border-bottom: none; }
.summary-item {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.45rem 0; font-size: 0.9rem;
}
.summary-item small { color: var(--ink-soft); }
.free-delivery-note {
  background: #f4efe3; color: var(--gold-dark);
  font-size: 0.88rem;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius);
  margin: 0.9rem 0;
  text-align: center;
}
.free-delivery-note.subtle { background: var(--cream); color: var(--ink-soft); }
.cart-summary .btn + .btn { margin-top: 0.6rem; }

/* ---------- Forms ---------- */
.form-field { margin-bottom: 1.1rem; }
.form-field label {
  display: block;
  font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 500; margin-bottom: 0.4rem;
}
.form-field input, .form-field textarea, .form-field select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ivory);
  outline: none;
  transition: border-color 0.2s;
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  border-color: var(--gold);
  background: var(--white);
}
.form-field.has-error input, .form-field.has-error textarea { border-color: var(--danger); }
.required-star { color: var(--danger); margin-left: 0.2rem; }
.field-error { color: var(--danger); font-size: 0.82rem; display: block; margin-top: 0.25rem; }
.field-help { color: var(--ink-soft); font-size: 0.8rem; display: block; margin-top: 0.25rem; }
.field-help ul { padding-left: 1.1rem; }

.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
  gap: 2rem;
  align-items: start;
}
.checkout-form h3 { margin-bottom: 1.2rem; }

.shipping-box { margin: 1.5rem 0; }
.shipping-box h4 {
  font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 500; margin-bottom: 0.6rem;
}
.shipping-options { display: flex; flex-direction: column; gap: 0.6rem; }
.shipping-option {
  display: flex; align-items: center; gap: 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.shipping-option:hover { border-color: var(--gold); }
.shipping-option:has(input:checked) { border-color: var(--gold); background: #faf6ee; }
.shipping-option input { accent-color: var(--gold); width: 18px; height: 18px; flex-shrink: 0; }
.shipping-option-body { display: flex; flex-direction: column; flex: 1; }
.shipping-option-name { font-weight: 500; }
.shipping-option-desc { font-size: 0.82rem; color: var(--ink-soft); }
.shipping-option-price { font-weight: 500; white-space: nowrap; }

.payment-box { margin: 1.5rem 0; }
.payment-box h4 {
  font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 500; margin-bottom: 0.6rem;
}
.payment-option {
  display: flex; gap: 0.8rem; align-items: center;
  border: 1px solid var(--gold);
  background: #faf6ee;
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
}
.payment-option span { display: block; font-size: 0.85rem; color: var(--ink-soft); }

/* ---------- Success page ---------- */
.success-card { text-align: center; padding: 2.5rem 2rem; }
.success-icon {
  width: 64px; height: 64px;
  margin: 0 auto 1.2rem;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--success); color: var(--white);
  font-size: 1.8rem;
}
.success-sub { color: var(--ink-soft); margin: 0.6rem 0 1.6rem; }
.order-number-box {
  background: var(--cream);
  border: 1px dashed var(--gold);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1.6rem;
}
.order-number-box span, .order-number-box small { display: block; font-size: 0.8rem; color: var(--ink-soft); }
.order-number-box strong { font-size: 1.5rem; letter-spacing: 0.12em; font-family: var(--font-display); }
.order-review { text-align: left; margin-bottom: 1.6rem; }
.success-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Track order ---------- */
.track-form { margin-bottom: 2rem; }
.track-result { margin-top: 1.5rem; }
.track-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.4rem; flex-wrap: wrap; gap: 0.6rem; }

.status-chip {
  font-size: 0.74rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  white-space: nowrap;
}
.status-pending { background: #f7f2e7; color: #7a6435; }
.status-confirmed { background: #eef5ef; color: var(--success); }
.status-shipped { background: #e9eef7; color: #3d5a8f; }
.status-delivered { background: var(--ink); color: var(--ivory); }
.status-cancelled { background: #f9ecec; color: var(--danger); }

.track-steps {
  display: flex;
  list-style: none;
  margin: 1rem 0 1.8rem;
  counter-reset: step;
}
.track-steps li {
  flex: 1;
  text-align: center;
  font-size: 0.8rem;
  color: var(--ink-soft);
  position: relative;
  padding-top: 28px;
}
.track-steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 22px; height: 22px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 0.7rem;
  background: var(--cream);
  border: 1px solid var(--line);
}
.track-steps li::after {
  content: '';
  position: absolute;
  top: 11px; left: calc(-50% + 12px);
  width: calc(100% - 24px); height: 1px;
  background: var(--line);
}
.track-steps li:first-child::after { display: none; }
.track-steps li.done { color: var(--ink); }
.track-steps li.done::before {
  font-family: "bootstrap-icons";
  content: "\f633";
  background: var(--success); color: var(--white); border-color: var(--success);
}
.track-steps li.current { color: var(--ink); font-weight: 500; }
.track-steps li.current::before { background: var(--gold); color: var(--white); border-color: var(--gold); }

/* ---------- Auth & account ---------- */
.auth-card { max-width: 460px; margin: 0 auto; }
.auth-card h1 { margin-bottom: 1rem; }
.auth-switch { margin-top: 1.2rem; font-size: 0.9rem; color: var(--ink-soft); text-align: center; }
.auth-switch a { color: var(--gold-dark); text-decoration: underline; text-underline-offset: 3px; }
.inline-form { display: inline; }

.order-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.2rem; }
.order-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.3rem; }
.order-card-items { list-style: none; margin: 0.6rem 0; font-size: 0.9rem; color: var(--ink-soft); }
.order-card a { color: var(--gold-dark); font-size: 0.88rem; }

/* ---------- About ---------- */
.about-body .lead { font-size: 1.2rem; font-family: var(--font-display); margin-bottom: 1.2rem; }
.about-body p { margin-bottom: 1rem; color: var(--ink-soft); }
.about-body .lead { color: var(--ink); }
.about-perks { margin: 2.5rem 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #b5aa9c; margin-top: 3rem; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 2.5rem;
  padding: 3.5rem 1.25rem 2.5rem;
}
.footer-brand .brand-name { color: var(--ivory); font-size: 1.6rem; }
.footer-brand p { font-size: 0.9rem; margin-top: 0.8rem; max-width: 34ch; }
.site-footer h4 {
  color: var(--ivory);
  font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase;
  margin-bottom: 0.9rem; font-weight: 500;
}
.site-footer a { display: block; font-size: 0.9rem; padding: 0.22rem 0; transition: color 0.2s; }
.site-footer a:hover { color: var(--gold); }
.site-footer p { font-size: 0.9rem; }
.footer-pay { margin-top: 0.8rem; color: #d9c9a8; }
.footer-social { display: flex; gap: 0.7rem; margin-top: 1.1rem; }
.footer-social a {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(217, 201, 168, 0.35);
  color: #d9c9a8;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.footer-social a:hover {
  color: var(--ink);
  background: var(--gold);
  border-color: var(--gold);
}

/* ---------- Rich content pages (privacy, terms) ---------- */
.rich-content h2, .rich-content h3 {
  font-family: var(--font-display);
  margin: 1.8rem 0 0.7rem;
}
.rich-content p { margin-bottom: 1rem; color: var(--ink-soft); }
.rich-content ul, .rich-content ol { margin: 0 0 1rem 1.4rem; color: var(--ink-soft); }
.rich-content li { margin-bottom: 0.35rem; }
.rich-content blockquote {
  border-left: 3px solid var(--gold);
  padding: 0.4rem 0 0.4rem 1.2rem;
  margin: 1.2rem 0;
  color: var(--ink-soft);
  font-style: italic;
}
.rich-content a { color: var(--gold-dark); text-decoration: underline; text-underline-offset: 3px; }
.rich-content table { border-collapse: collapse; margin: 1.2rem 0; width: 100%; }
.rich-content td, .rich-content th { border: 1px solid var(--line); padding: 0.5rem 0.8rem; text-align: left; }
.rich-content hr { border: none; border-top: 1px solid var(--line); margin: 1.8rem 0; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.1rem 0;
  font-size: 0.8rem;
  text-align: center;
}

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 90;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: var(--ink);
  color: var(--ivory);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s, transform 0.3s, background 0.25s, visibility 0.3s;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { background: var(--gold-dark); border-color: var(--gold-dark); }

@media (max-width: 720px) {
  .back-to-top { right: 1rem; bottom: 1rem; width: 42px; height: 42px; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .product-layout, .cart-layout, .checkout-layout { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .search-form input { width: 110px; }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px; height: 40px;
    background: none; border: none;
    padding: 8px;
  }
  .nav-toggle span {
    display: block; height: 1.5px; width: 100%;
    background: var(--ink);
    transition: all 0.25s;
  }
  .nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

  .header-inner { gap: 0.6rem; }
  .brand-name { font-size: 1.2rem; }

  .main-nav {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: min(78vw, 320px);
    background: var(--ivory);
    flex-direction: column;
    gap: 0;
    padding: 5rem 1.6rem 2rem;
    box-shadow: var(--shadow);
    transform: translateX(-105%);
    transition: transform 0.3s ease;
    z-index: 90;
    margin-left: 0;
  }
  .main-nav.open { transform: none; }
  .main-nav a {
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.95rem;
  }

  .search-form input { width: 0; padding: 0; transition: width 0.25s; }
  .search-form:focus-within input, .search-form input:not(:placeholder-shown) { width: 130px; }

  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .cart-item { grid-template-columns: 72px 1fr; }
  .cart-item-controls { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .hero p { font-size: 1rem; }
}

@media (max-width: 380px) {
  .product-grid { grid-template-columns: 1fr; }
}
