/* ============================================================
   DESIGN SYSTEM
   ============================================================ */
:root {
  --bg:          #FAFAF7;
  --surface:     #FFFFFF;
  --surface-2:   #F4F1EC;
  --border:      #E8E3DA;
  --text:        #1A1A18;
  --text-2:      #6B6560;
  --text-3:      #9E9890;
  --accent:      #B85C38;
  --accent-dk:   #9A4A2A;
  --accent-lt:   #F5E8E2;
  --sage:        #6B7F5E;
  --sage-lt:     #EBF0E6;
  --gold:        #C49A3C;
  --radius-sm:   6px;
  --radius:      12px;
  --radius-lg:   20px;
  --shadow-sm:   0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:      0 4px 16px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.05);
  --shadow-lg:   0 16px 48px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.06);
  --trans:       .22s cubic-bezier(.4,0,.2,1);
  --header-h:    68px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
  min-height: 100vh;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font: inherit; border: none; background: none; }
input, textarea, select { font: inherit; }
ul { list-style: none; }

/* ---- Typography ---- */
.serif { font-family: 'Playfair Display', Georgia, serif; }
h1, h2, h3 { font-family: 'Playfair Display', Georgia, serif; line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }

/* ---- Layout ---- */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.container--sm { max-width: 860px; }
.container--lg { max-width: 1440px; }

/* ============================================================
   HEADER
   ============================================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(250,250,247,.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
}
.header__inner {
  display: flex;
  align-items: center;
  gap: 32px;
  width: 100%;
}
.logo {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.02em;
  flex-shrink: 0;
}
.logo span { color: var(--accent); }
.nav {
  display: flex;
  gap: 4px;
  margin-left: 12px;
}
.nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: color var(--trans), background var(--trans);
}
.nav a:hover, .nav a.active { color: var(--text); background: var(--surface-2); }
.header__spacer { flex: 1; }
.header__search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 8px 16px;
  width: 220px;
  transition: width var(--trans), box-shadow var(--trans);
}
.header__search:focus-within {
  width: 280px;
  box-shadow: 0 0 0 3px rgba(184,92,56,.15);
  border-color: var(--accent);
}
.header__search input {
  border: none;
  background: none;
  outline: none;
  font-size: 14px;
  color: var(--text);
  width: 100%;
}
.header__search input::placeholder { color: var(--text-3); }
.header__actions { display: flex; align-items: center; gap: 4px; }
.icon-btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  transition: color var(--trans), background var(--trans);
  position: relative;
}
.icon-btn:hover { color: var(--text); background: var(--surface-2); }
.icon-btn svg { width: 20px; height: 20px; }
.cart-badge {
  position: absolute;
  top: 5px; right: 5px;
  width: 16px; height: 16px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 99px;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}

/* Mobile menu toggle */
.menu-toggle { display: none; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: all var(--trans);
  white-space: nowrap;
}
.btn--primary {
  background: var(--accent);
  color: #fff;
}
.btn--primary:hover { background: var(--accent-dk); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(184,92,56,.35); }
.btn--primary:active { transform: translateY(0); }
.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn--outline:hover { border-color: var(--text); background: var(--surface-2); }
.btn--ghost {
  background: transparent;
  color: var(--text-2);
}
.btn--ghost:hover { color: var(--text); background: var(--surface-2); }
.btn--lg { padding: 16px 32px; font-size: 15px; border-radius: var(--radius-sm); }
.btn--sm { padding: 8px 16px; font-size: 13px; }
.btn--full { width: 100%; }
.btn--sage { background: var(--sage); color: #fff; }
.btn--sage:hover { background: #5a6c4f; }

/* ============================================================
   BADGE / TAG
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
}
.badge--accent { background: var(--accent-lt); color: var(--accent); }
.badge--sage   { background: var(--sage-lt); color: var(--sage); }
.badge--new    { background: #E8F4E8; color: #3A7A3A; }
.badge--sale   { background: #FFF0EE; color: var(--accent); }

/* ============================================================
   PRODUCT CARD
   ============================================================ */
.product-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform var(--trans), box-shadow var(--trans);
  position: relative;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.product-card__img-wrap {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--surface-2);
  position: relative;
}
.product-card__img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s cubic-bezier(.4,0,.2,1);
}
.product-card:hover .product-card__img-wrap img { transform: scale(1.06); }
.product-card__badges {
  position: absolute;
  top: 12px; left: 12px;
  display: flex; gap: 6px; flex-wrap: wrap;
}
.product-card__wishlist {
  position: absolute;
  top: 10px; right: 10px;
  width: 34px; height: 34px;
  background: rgba(255,255,255,.9);
  border-radius: 99px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3);
  transition: all var(--trans);
  opacity: 0;
}
.product-card:hover .product-card__wishlist { opacity: 1; }
.product-card__wishlist:hover { color: var(--accent); background: #fff; }
.product-card__wishlist svg { width: 16px; height: 16px; }
.product-card__body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.product-card__cat { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); }
.product-card__name { font-size: 15px; font-weight: 600; color: var(--text); line-height: 1.35; }
.product-card__rating { display: flex; align-items: center; gap: 5px; }
.stars { color: var(--gold); font-size: 13px; letter-spacing: 1px; }
.rating-count { font-size: 12px; color: var(--text-3); }
.product-card__footer { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.product-card__price { font-size: 17px; font-weight: 700; color: var(--text); }
.product-card__price-old { font-size: 13px; color: var(--text-3); text-decoration: line-through; margin-left: 6px; }
.product-card__add {
  width: 36px; height: 36px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--trans);
}
.product-card__add:hover { background: var(--accent-dk); transform: scale(1.08); }
.product-card__add svg { width: 18px; height: 18px; }

/* ============================================================
   SECTION HEADER
   ============================================================ */
.section-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 40px; }
.section-header__text { }
.section-header__eyebrow {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--accent);
  margin-bottom: 8px;
}
.section-header h2 { }
.section-header p { color: var(--text-2); margin-top: 8px; max-width: 420px; }

/* ============================================================
   GRID LAYOUTS
   ============================================================ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}
.product-grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--text);
  color: rgba(255,255,255,.7);
  padding: 64px 0 32px;
  margin-top: 96px;
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer__brand .logo { color: #fff; margin-bottom: 16px; display: inline-block; }
.footer__brand .logo span { color: #E8A07A; }
.footer__brand p { font-size: 14px; line-height: 1.7; max-width: 280px; }
.footer__col h4 { color: #fff; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 16px; }
.footer__col ul { display: flex; flex-direction: column; gap: 10px; }
.footer__col a { font-size: 14px; transition: color var(--trans); }
.footer__col a:hover { color: #fff; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 28px; display: flex; justify-content: space-between; align-items: center; }
.footer__bottom p { font-size: 13px; }
.social-links { display: flex; gap: 12px; }
.social-link {
  width: 36px; height: 36px;
  background: rgba(255,255,255,.08);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--trans);
  color: rgba(255,255,255,.7);
}
.social-link:hover { background: var(--accent); color: #fff; }
.social-link svg { width: 16px; height: 16px; }
.payment-icons { display: flex; gap: 8px; align-items: center; }
.payment-icon {
  background: rgba(255,255,255,.1);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,.6);
  letter-spacing: .04em;
}

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.form-input {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  transition: border-color var(--trans), box-shadow var(--trans);
  outline: none;
  width: 100%;
}
.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(184,92,56,.12);
}
.form-input::placeholder { color: var(--text-3); }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B6560' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row--3 { grid-template-columns: 1fr 1fr 1fr; }

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-3); padding: 20px 0; }
.breadcrumb a { color: var(--text-3); transition: color var(--trans); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { color: var(--text); font-weight: 500; }

/* ============================================================
   QUANTITY CONTROL
   ============================================================ */
.qty-control {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  width: fit-content;
}
.qty-btn {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2);
  transition: all var(--trans);
  font-size: 18px;
  font-weight: 300;
}
.qty-btn:hover { background: var(--surface-2); color: var(--text); }
.qty-value {
  width: 44px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  font-weight: 600;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

/* ============================================================
   TOAST NOTIFICATION
   ============================================================ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: var(--text);
  color: #fff;
  padding: 14px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  animation: toastIn .3s ease;
  max-width: 320px;
}
.toast--success { border-left: 3px solid #4CAF50; }
.toast svg { width: 18px; height: 18px; flex-shrink: 0; color: #4CAF50; }
@keyframes toastIn {
  from { transform: translateX(110%); opacity: 0; }
  to   { transform: translateX(0);   opacity: 1; }
}
@keyframes toastOut {
  to { transform: translateX(110%); opacity: 0; }
}

/* ============================================================
   NEWSLETTER STRIP
   ============================================================ */
.newsletter {
  background: var(--accent);
  color: #fff;
  padding: 60px 0;
  text-align: center;
}
.newsletter h2 { color: #fff; margin-bottom: 8px; }
.newsletter p { color: rgba(255,255,255,.8); margin-bottom: 28px; font-size: 15px; }
.newsletter__form { display: flex; max-width: 480px; margin: 0 auto; gap: 10px; }
.newsletter__form input {
  flex: 1;
  background: rgba(255,255,255,.15);
  border: 1.5px solid rgba(255,255,255,.3);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 13px 18px;
  font-size: 14px;
}
.newsletter__form input::placeholder { color: rgba(255,255,255,.6); }
.newsletter__form input:focus { outline: none; border-color: rgba(255,255,255,.7); background: rgba(255,255,255,.2); }
.newsletter__form button {
  background: #fff;
  color: var(--accent);
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 14px;
  transition: all var(--trans);
  flex-shrink: 0;
}
.newsletter__form button:hover { background: var(--accent-lt); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .product-grid--4 { grid-template-columns: repeat(3, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 768px) {
  .nav, .header__search { display: none; }
  .menu-toggle { display: flex; }
  .product-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; gap: 16px; text-align: center; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .form-row, .form-row--3 { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .container { padding: 0 16px; }
}
