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

:root {
  --sand:    #F5EFE6;
  --sand2:   #EDE4D7;
  --stone:   #C8B8A2;
  --bark:    #7A6652;
  --ink:     #2B2318;
  --cream:   #FAF7F3;
  --rust:    #C4603A;
  --sage:    #7A9B76;
  --slate:   #6B7B8D;
  --dusty:   #B8C4D0;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'Jost', sans-serif;
  --ease-out: cubic-bezier(.16,1,.3,1);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  overflow-x: hidden;
}

/* --- UTILITY --- */
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }

/* --- TOP BAR --- */
.topbar {
  background: var(--ink);
  color: var(--stone);
  text-align: center;
  padding: 10px 20px;
  font-size: .78rem;
  letter-spacing: .08em;
  font-weight: 500;
}
.topbar strong { color: var(--sand); }
.topbar--delivery { letter-spacing: .1em; }

/* --- NAV --- */
nav {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(250,247,243,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--sand2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  height: 64px;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -.03em;
  color: var(--ink);
  text-decoration: none;
}
.nav-logo sup {
  font-size: .55rem;
  font-weight: 300;
  letter-spacing: .1em;
  vertical-align: super;
  color: var(--bark);
  font-family: var(--font-body);
}

.nav-links { display: flex; gap: 32px; }
.nav-links a {
  text-decoration: none;
  color: var(--bark);
  font-size: .85rem;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: color .2s;
}
.nav-links a:hover { color: var(--ink); }

.nav-right { display: flex; align-items: center; gap: 16px; }

.cart-bubble {
  position: relative;
  background: var(--ink);
  color: var(--cream);
  border: none;
  border-radius: 50px;
  padding: 9px 20px;
  font-family: var(--font-body);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .04em;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background .2s;
}
.cart-bubble:hover { background: var(--bark); }
.cart-count {
  background: var(--rust);
  color: #fff;
  width: 18px; height: 18px;
  border-radius: 50%;
  font-size: .68rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- FOOTER --- */
footer {
  background: var(--ink);
  border-top: 1px solid rgba(255,255,255,.07);
  padding: 36px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--sand);
}
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a {
  color: var(--stone);
  text-decoration: none;
  font-size: .82rem;
  transition: color .2s;
}
.footer-links a:hover { color: var(--sand); }
.footer-copy { font-size: .78rem; color: rgba(255,255,255,.25); }
.footer-legal {
  width: 100%;
  font-size: .78rem;
  line-height: 1.5;
  color: rgba(255,255,255,.25);
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.06);
}

/* --- TOAST --- */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: var(--sand);
  padding: 13px 24px;
  border-radius: 50px;
  font-size: .85rem;
  font-weight: 500;
  opacity: 0;
  transition: all .35s var(--ease-out);
  z-index: 300;
  pointer-events: none;
  white-space: nowrap;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* --- CART DRAWER --- */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.drawer-overlay.open { opacity: 1; pointer-events: all; }

.drawer {
  position: fixed;
  right: 0; top: 0; bottom: 0;
  width: min(420px, 100vw);
  background: var(--cream);
  z-index: 201;
  transform: translateX(100%);
  transition: transform .4s var(--ease-out);
  display: flex;
  flex-direction: column;
  box-shadow: -20px 0 60px rgba(0,0,0,.2);
}
.drawer.open { transform: translateX(0); }

.drawer-head {
  padding: 24px 28px;
  border-bottom: 1px solid var(--sand2);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.drawer-head h3 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; }
.drawer-close {
  background: var(--sand2);
  border: none;
  width: 36px; height: 36px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  transition: background .2s;
}
.drawer-close:hover { background: var(--stone); }

.drawer-items {
  flex: 1;
  overflow-y: auto;
  padding: 20px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.drawer-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--stone);
  gap: 12px;
  font-size: .9rem;
}
.drawer-empty .empty-icon { font-size: 3rem; }

.cart-item {
  display: flex;
  gap: 14px;
  padding: 16px;
  background: var(--sand);
  border-radius: 16px;
  animation: slideIn .3s var(--ease-out);
}
@keyframes slideIn {
  from { opacity:0; transform: translateX(20px); }
  to   { opacity:1; transform: translateX(0); }
}
.cart-item-visual {
  width: 64px; height: 64px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
}
.cart-item-info { flex: 1; }
.cart-item-name { font-size: .88rem; font-weight: 600; margin-bottom: 4px; }
.cart-item-sub { font-size: .78rem; color: var(--stone); }
.cart-item-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.cart-item-price { font-family: var(--font-display); font-weight: 700; font-size: 1rem; }
.cart-item-remove { background: none; border: none; color: var(--stone); font-size: .75rem; cursor: pointer; text-decoration: underline; }
.cart-item-remove:hover { color: var(--rust); }

.drawer-foot {
  padding: 20px 28px 28px;
  border-top: 1px solid var(--sand2);
}
.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
}
.cart-total-label { font-size: .82rem; color: var(--bark); font-weight: 500; text-transform: uppercase; letter-spacing: .08em; }
.cart-total-price { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; }
.btn-checkout {
  width: 100%;
  background: var(--ink);
  color: var(--cream);
  border: none;
  border-radius: 14px;
  padding: 16px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .04em;
  cursor: pointer;
  transition: background .2s;
}
.btn-checkout:hover { background: var(--bark); }

/* --- SIZE MODAL --- */
.size-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.size-modal-overlay.open { display: flex; }
.size-modal {
  background: var(--cream);
  border-radius: 24px;
  padding: 36px;
  max-width: 520px;
  width: 100%;
  animation: popUp .35s var(--ease-out);
}
@keyframes popUp {
  from { transform: scale(.9) translateY(20px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}
.size-modal h3 { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; margin-bottom: 20px; }
.size-modal table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.size-modal th { text-align: left; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--bark); padding-bottom: 10px; border-bottom: 2px solid var(--sand2); }
.size-modal td { padding: 12px 0; border-bottom: 1px solid var(--sand2); font-weight: 300; }
.size-modal td:first-child { font-weight: 700; }
.size-modal-close { margin-top: 24px; width: 100%; background: var(--ink); color: var(--cream); border: none; border-radius: 12px; padding: 13px; font-family: var(--font-body); font-size: .9rem; font-weight: 600; cursor: pointer; }

/* --- COOKIE BAR --- */
.cookie-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 500;
  background: var(--ink);
  color: var(--sand);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 18px 32px;
  transform: translateY(100%);
  transition: transform .4s var(--ease-out);
}
.cookie-bar.show { transform: translateY(0); }
.cookie-text {
  font-size: .85rem;
  line-height: 1.45;
  max-width: 600px;
}
.cookie-text a {
  color: var(--sand);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cookie-text a:hover { color: #fff; }
.cookie-accept {
  flex-shrink: 0;
  background: var(--sand);
  color: var(--ink);
  border: none;
  border-radius: 50px;
  padding: 10px 28px;
  font-family: var(--font-body);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}
.cookie-accept:hover { background: #fff; }

/* --- RESPONSIVE BASE --- */

/* Tablet <= 900px */
@media (max-width: 900px) {
  nav { padding: 0 20px; }
  .nav-links { display: none; }
  footer { padding: 28px 20px; flex-direction: column; align-items: flex-start; gap: 14px; }
}

/* Mobile <= 600px */
@media (max-width: 600px) {
  .topbar { font-size: .72rem; letter-spacing: 0; padding: 9px 16px; }
  nav { padding: 0 16px; height: 56px; }
  .nav-logo { font-size: 1.25rem; }
  .cart-bubble { padding: 8px 14px; font-size: .78rem; gap: 7px; }

  footer { padding: 24px 16px; align-items: center; text-align: center; }
  .footer-links { justify-content: center; gap: 16px; }

  .drawer { width: 100vw; padding-bottom: env(safe-area-inset-bottom, 16px); }
  .drawer-head { padding: 20px; }
  .drawer-items { padding: 16px; }
  .drawer-foot { padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px)); }

  .toast { white-space: normal; text-align: center; max-width: calc(100vw - 40px); }

  .size-modal { padding: 24px 20px; border-radius: 20px; }
  .size-modal h3 { font-size: 1.2rem; }
  .size-modal table { font-size: .82rem; }

  .cookie-bar { flex-direction: column; gap: 14px; padding: 20px 20px calc(20px + env(safe-area-inset-bottom, 0px)); text-align: center; }
  .cookie-accept { width: 100%; }
}
