/* ── Design tokens ─────────────────────────────────────────────────────────── */
:root {
  --ea-black:    #1C1C1A;
  --ea-charcoal: #3A3A38;
  --ea-warm:     #C9A882;
  --ea-warm-lt:  #E8D5BE;
  --ea-cream:    #FAF7F3;
  --ea-bg:       #FFFFFF;
  --ea-muted:    #888884;
  --ea-border:   #E8E5E0;
  --font-serif:  'Cormorant Garamond', Georgia, serif;
  --font-sans:   'Jost', system-ui, sans-serif;
  --radius:      4px;
  --shadow-sm:   0 2px 12px rgba(0,0,0,.07);
  --shadow-md:   0 6px 24px rgba(0,0,0,.10);
  --transition:  0.22s ease;
}

/* ── Base ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body {
  font-family: var(--font-sans);
  color: var(--ea-charcoal);
  background: var(--ea-bg);
  font-size: 15px;
  line-height: 1.65;
}
h1,h2,h3,h4,h5,h6 { font-family: var(--font-serif); font-weight: 400; color: var(--ea-black); }
a { color: var(--ea-charcoal); text-decoration: none; }
a:hover { color: var(--ea-warm); }
img { max-width: 100%; height: auto; }

/* ── Announcement bar ──────────────────────────────────────────────────────── */
.announcement-bar {
  background: var(--ea-black);
  color: #fff;
  font-size: 12px;
  letter-spacing: .08em;
}

/* ── Header ────────────────────────────────────────────────────────────────── */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--ea-border);
  z-index: 1030;
}
.brand-name {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  font-weight: 400;
  letter-spacing: .05em;
  color: var(--ea-black);
}
.navbar-nav .nav-link {
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 1.4rem .85rem;
  color: var(--ea-charcoal);
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--ea-black);
  border-bottom-color: var(--ea-warm);
}
.header-icon {
  color: var(--ea-charcoal);
  font-size: 1.1rem;
  transition: color var(--transition);
}
.header-icon:hover { color: var(--ea-warm); }
.cart-badge {
  position: absolute;
  top: -6px; right: -8px;
  background: var(--ea-warm);
  color: #fff;
  font-size: 10px;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-sans);
}

/* ── Hero ──────────────────────────────────────────────────────────────────── */
.hero-section {
  background: var(--ea-cream);
  padding: 80px 0;
  overflow: hidden;
}
.hero-section h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1.15;
}
.hero-section p { font-size: 1.1rem; color: var(--ea-muted); }

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn-ea {
  background: var(--ea-black);
  color: #fff;
  border: 1.5px solid var(--ea-black);
  border-radius: var(--radius);
  padding: .7rem 2rem;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  transition: var(--transition);
  font-family: var(--font-sans);
}
.btn-ea:hover {
  background: transparent;
  color: var(--ea-black);
}
.btn-ea-outline {
  background: transparent;
  color: var(--ea-black);
  border: 1.5px solid var(--ea-black);
  border-radius: var(--radius);
  padding: .7rem 2rem;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  transition: var(--transition);
}
.btn-ea-outline:hover { background: var(--ea-black); color: #fff; }
.btn-warm {
  background: var(--ea-warm);
  color: #fff;
  border: 1.5px solid var(--ea-warm);
  border-radius: var(--radius);
  padding: .7rem 2rem;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  transition: var(--transition);
}
.btn-warm:hover { background: #b8936f; border-color: #b8936f; color: #fff; }

/* ── Section headers ───────────────────────────────────────────────────────── */
.section-label {
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ea-warm);
  font-family: var(--font-sans);
}
.section-title { font-size: clamp(1.8rem, 3vw, 2.8rem); }

/* ── Product card ──────────────────────────────────────────────────────────── */
.product-card {
  border: none;
  border-radius: 0;
  background: transparent;
  transition: var(--transition);
}
.product-card-img-wrap {
  position: relative;
  overflow: hidden;
  background: var(--ea-cream);
  aspect-ratio: 4/5;
}
.product-card-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.product-card:hover .product-card-img-wrap img { transform: scale(1.04); }
.product-card-badge {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--ea-warm);
  color: #fff;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 2px;
}
.product-card-badge.badge-new { background: var(--ea-black); }
.product-card-actions {
  position: absolute;
  bottom: -50px;
  left: 0; right: 0;
  padding: 12px;
  transition: bottom .25s ease;
  display: flex;
  gap: 8px;
}
.product-card:hover .product-card-actions { bottom: 0; }
.product-card-body { padding: 14px 2px 4px; }
.product-name {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--ea-black);
  margin-bottom: 4px;
}
.product-price { font-size: .9rem; color: var(--ea-muted); }
.product-price .sale-price { color: #c0392b; font-weight: 500; }
.product-price .original-price { text-decoration: line-through; margin-left: 6px; }

/* ── Category card ─────────────────────────────────────────────────────────── */
.category-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 1;
  display: block;
}
.category-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.category-card:hover img { transform: scale(1.05); }
.category-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(28,28,26,.6) 0%, transparent 60%);
  display: flex; align-items: flex-end;
  padding: 20px;
}
.category-card-title {
  font-family: var(--font-serif);
  color: #fff;
  font-size: 1.5rem;
  text-shadow: 0 1px 3px rgba(0,0,0,.3);
}

/* ── Product detail ────────────────────────────────────────────────────────── */
.product-gallery-main {
  aspect-ratio: 4/5;
  overflow: hidden;
  background: var(--ea-cream);
  border-radius: var(--radius);
}
.product-gallery-main img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.product-gallery-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.product-gallery-thumb {
  width: 72px; height: 90px;
  overflow: hidden;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color var(--transition);
}
.product-gallery-thumb.active,
.product-gallery-thumb:hover { border-color: var(--ea-warm); }
.product-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-detail-title { font-size: clamp(1.6rem, 3vw, 2.4rem); }
.product-detail-price { font-family: var(--font-serif); font-size: 1.7rem; }

/* ── Cart ──────────────────────────────────────────────────────────────────── */
.cart-table { border-collapse: separate; border-spacing: 0; }
.cart-table td,
.cart-table th { vertical-align: middle; padding: 14px 8px; border-bottom: 1px solid var(--ea-border); }
.cart-item-img { width: 70px; height: 88px; object-fit: cover; border-radius: var(--radius); }
.qty-input { width: 60px; text-align: center; border: 1px solid var(--ea-border); border-radius: var(--radius); padding: 4px; }
.cart-summary { background: var(--ea-cream); border-radius: var(--radius); padding: 24px; }
.cart-summary-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: .9rem; }
.cart-summary-total { font-family: var(--font-serif); font-size: 1.3rem; border-top: 1px solid var(--ea-border); padding-top: 12px; margin-top: 4px; }

/* ── Forms ─────────────────────────────────────────────────────────────────── */
.form-control, .form-select {
  border-color: var(--ea-border);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: .9rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--ea-warm);
  box-shadow: 0 0 0 3px rgba(201,168,130,.15);
}
.form-label { font-size: .85rem; letter-spacing: .05em; font-weight: 500; }

/* ── Account ───────────────────────────────────────────────────────────────── */
.account-nav .nav-link {
  color: var(--ea-charcoal);
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: .9rem;
}
.account-nav .nav-link.active,
.account-nav .nav-link:hover { background: var(--ea-cream); color: var(--ea-black); }
.order-card {
  border: 1px solid var(--ea-border);
  border-radius: var(--radius);
  padding: 20px;
}
.order-status-badge {
  font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 20px; font-family: var(--font-sans);
}
.status-paid      { background: #d4edda; color: #155724; }
.status-pending   { background: #fff3cd; color: #856404; }
.status-shipped   { background: #cce5ff; color: #004085; }
.status-delivered { background: #d1ecf1; color: #0c5460; }
.status-cancelled { background: #f8d7da; color: #721c24; }
.status-processing{ background: #e2e3e5; color: #383d41; }

/* ── Footer ────────────────────────────────────────────────────────────────── */
.site-footer { background: var(--ea-cream); }
.footer-brand { font-family: var(--font-serif); font-size: 1.6rem; color: var(--ea-black); }
.footer-heading { font-size: 11px; letter-spacing: .15em; text-transform: uppercase; color: var(--ea-black); margin-bottom: .75rem; }
.footer-links li { margin-bottom: .35rem; }
.footer-links a { font-size: .85rem; color: var(--ea-muted); transition: color var(--transition); }
.footer-links a:hover { color: var(--ea-warm); }
.footer-divider { border-color: var(--ea-border); }
.footer-social { color: var(--ea-muted); font-size: 1.1rem; transition: color var(--transition); }
.footer-social:hover { color: var(--ea-warm); }

/* ── Breadcrumb ────────────────────────────────────────────────────────────── */
.breadcrumb-item a { color: var(--ea-muted); font-size: .85rem; }
.breadcrumb-item.active { font-size: .85rem; color: var(--ea-charcoal); }
.breadcrumb-item + .breadcrumb-item::before { color: var(--ea-muted); }

/* ── HTMX loading indicator ────────────────────────────────────────────────── */
.htmx-indicator { opacity: 0; transition: opacity 200ms ease-in; }
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator { opacity: 1; }

/* ── Utility ───────────────────────────────────────────────────────────────── */
.bg-cream { background: var(--ea-cream) !important; }
.text-muted { color: var(--ea-muted) !important; }
.divider-ornament {
  display: flex; align-items: center; gap: 12px; margin: 2rem 0;
}
.divider-ornament::before, .divider-ornament::after {
  content: ''; flex: 1; height: 1px; background: var(--ea-border);
}
