:root {
  --bg: #f7f4ef;
  --surface: #ffffff;
  --ink: #1c1814;
  --ink-soft: #6b6258;
  --accent: #4a2c2a;
  --accent-soft: #c4805a;
  --border: #e8e2d6;
  --green: #5a6f3d;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Manrope', sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 32px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 30;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 32px;
  gap: 32px;
}
.brand {
  font-size: 22px; font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--accent);
}
.nav-links {
  display: flex; gap: 32px; flex: 1;
  justify-content: center;
}
.nav-links a {
  font-size: 14px; font-weight: 500;
  color: var(--ink-soft);
  transition: color .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-actions { display: flex; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  transition: all .2s;
}
.icon-btn:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.cart-btn { width: auto; padding: 0 16px; gap: 6px; border-radius: 100px; }
.cart-count {
  background: var(--accent-soft);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 100px;
  min-width: 20px;
  display: inline-block;
  text-align: center;
}

/* Hero */
.hero { padding: 60px 0 80px; }
.hero-inner {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 80px; align-items: center;
}
.kicker {
  display: inline-block;
  font-size: 12px; font-weight: 600;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--accent-soft);
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -2px;
  color: var(--accent);
  margin-bottom: 24px;
}
.hero p {
  font-size: 17px;
  color: var(--ink-soft);
  margin-bottom: 32px;
  max-width: 440px;
}
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px;
  background: var(--ink); color: var(--bg);
  border: none; border-radius: 100px;
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.btn:hover { background: var(--accent); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0,0,0,.15); }
.btn-block { width: 100%; justify-content: center; padding: 16px; }

.hero-img {
  aspect-ratio: 4/5;
  background:
    linear-gradient(135deg, rgba(74,44,42,.1), rgba(196,128,90,.2)),
    url('https://images.unsplash.com/photo-1495474472287-4d71bcdd2085?w=900&q=80') center/cover;
  border-radius: 8px;
}

/* Products */
.products { padding: 60px 0 120px; }
.products-head {
  display: flex; justify-content: space-between; align-items: end;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.products-head h2 {
  font-size: 36px; font-weight: 800;
  letter-spacing: -1px;
  color: var(--accent);
}
.sort label {
  font-size: 13px; color: var(--ink-soft);
  display: flex; gap: 8px; align-items: center;
}
.sort select {
  font-family: inherit; font-size: 13px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
}

.product-filters {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 40px;
}
.pf {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 13px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all .2s;
}
.pf:hover { color: var(--ink); border-color: var(--ink); }
.pf.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px 24px;
}
.product {
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  transition: all .3s;
  display: flex; flex-direction: column;
  border: 1px solid var(--border);
}
.product:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,.08);
}
.product.hide { display: none; }
.product-img {
  aspect-ratio: 1;
  background-size: cover; background-position: center;
  position: relative;
}
.product-badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--green);
  color: white;
  font-size: 11px; font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
  letter-spacing: 0.5px;
}
.product-body { padding: 20px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.product-origin {
  font-size: 11px; font-weight: 600;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--accent-soft);
}
.product h3 {
  font-size: 17px; font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 4px;
}
.product-notes {
  font-size: 13px; color: var(--ink-soft);
  margin-bottom: 16px;
}
.product-foot {
  margin-top: auto;
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px;
}
.product-price {
  font-size: 20px; font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.5px;
}
.add-btn {
  background: var(--ink); color: var(--bg);
  border: none; padding: 10px 16px;
  border-radius: 100px;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.add-btn:hover { background: var(--accent); }
.add-btn.added { background: var(--green); }

/* Footer */
.footer {
  padding: 60px 0 32px;
  background: var(--accent);
  color: var(--bg);
}
.footer-inner {
  display: grid; grid-template-columns: 1fr 2fr;
  gap: 60px;
}
.footer strong { font-size: 22px; display: block; margin-bottom: 8px; }
.footer p { font-size: 14px; opacity: 0.7; }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.footer h5 {
  font-size: 12px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--accent-soft);
  margin-bottom: 14px;
}
.footer a {
  display: block;
  padding: 4px 0;
  font-size: 14px;
  opacity: 0.8;
}
.footer a:hover { opacity: 1; color: var(--accent-soft); }

/* Cart */
.cart-overlay {
  position: fixed; inset: 0;
  background: rgba(28,24,20,.5);
  z-index: 60;
  opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }
.cart {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 420px; max-width: 90vw;
  background: var(--surface);
  z-index: 70;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.2,.7,.3,1);
  box-shadow: -20px 0 60px rgba(0,0,0,.15);
}
.cart.open { transform: translateX(0); }
.cart-head {
  padding: 24px 28px;
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--border);
}
.cart-head h3 { font-size: 22px; font-weight: 800; letter-spacing: -0.5px; }
.cart-body {
  flex: 1; overflow-y: auto;
  padding: 20px 28px;
}
.empty {
  text-align: center;
  color: var(--ink-soft);
  font-size: 15px;
  padding: 60px 0;
}
.empty span { font-size: 13px; opacity: 0.7; }

.cart-item {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.cart-item-img {
  aspect-ratio: 1;
  background-size: cover; background-position: center;
  border-radius: 6px;
}
.cart-item-name { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.cart-item-price { font-size: 13px; color: var(--ink-soft); }
.cart-item-qty {
  display: inline-flex; gap: 4px; align-items: center;
  margin-top: 8px;
  background: var(--bg);
  border-radius: 100px;
  padding: 2px;
}
.cart-item-qty button {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: none;
  background: transparent;
  font-weight: 700;
  cursor: pointer;
}
.cart-item-qty button:hover { background: var(--ink); color: var(--bg); }
.cart-item-qty span { font-size: 12px; min-width: 20px; text-align: center; font-weight: 600; }
.cart-item-remove {
  background: transparent; border: none;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 18px;
  align-self: flex-start;
}
.cart-item-remove:hover { color: var(--accent); }

.cart-foot {
  padding: 24px 28px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.cart-totals {
  display: flex; justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}
.cart-totals span { font-size: 14px; color: var(--ink-soft); }
.cart-totals strong { font-size: 24px; font-weight: 800; color: var(--accent); letter-spacing: -0.5px; }
.ship { font-size: 12px; color: var(--ink-soft); margin-bottom: 16px; }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .nav-links { display: none; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .products-head { flex-direction: column; gap: 16px; align-items: flex-start; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 500px) {
  .product-grid { grid-template-columns: 1fr; }
}

/* Product wishlist toggle */
.wish-toggle {
  position: absolute; top: 12px; right: 12px;
  width: 36px; height: 36px;
  background: rgba(255,255,255,.85);
  border: none; border-radius: 50%;
  font-size: 18px; color: var(--ink-soft);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
  backdrop-filter: blur(8px);
}
.wish-toggle:hover { background: white; color: #e11d48; transform: scale(1.1); }
.wish-toggle.on { color: #e11d48; background: white; }

/* Wishlist nav button */
.wish-btn { width: auto; padding: 0 16px; gap: 6px; border-radius: 100px; }
.wish-count { background: #fce7e9; color: #e11d48; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 100px; min-width: 20px; display: inline-block; text-align: center; }

/* Hamburger */
.hamburger.icon-btn { display: none; flex-direction: column; gap: 4px; padding: 0; }
.hamburger.icon-btn span { display: block; width: 18px; height: 1.5px; background: var(--ink); transition: all .25s; }

/* Clear filters */
.clear-filters { background: var(--accent) !important; color: white !important; border-color: var(--accent) !important; }

/* Product modal */
.prod-modal {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.prod-modal[hidden] { display: none; }
.pm-bg {
  position: absolute; inset: 0;
  background: rgba(28,24,20,.6);
  backdrop-filter: blur(6px);
}
.pm-card {
  position: relative;
  background: var(--surface);
  max-width: 880px; width: 100%;
  border-radius: 12px;
  max-height: 90vh; overflow-y: auto;
  animation: pmIn .3s cubic-bezier(.2,.7,.3,1);
}
@keyframes pmIn { from { opacity: 0; transform: translateY(20px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.pm-close {
  position: absolute; top: 16px; right: 16px;
  z-index: 5;
  width: 36px; height: 36px;
  background: rgba(255,255,255,.85);
  border: none; border-radius: 50%;
  font-size: 22px; color: var(--ink); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px);
}
.pm-close:hover { background: var(--ink); color: white; }
.pm-grid { display: grid; grid-template-columns: 1fr 1fr; }
.pm-img { aspect-ratio: 1; background-size: cover; background-position: center; border-radius: 12px 0 0 12px; }
.pm-info { padding: 40px; }
.pm-info h3 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 8px 0 14px;
}
.pm-price { font-size: 32px; font-weight: 800; color: var(--accent); letter-spacing: -1px; margin-bottom: 20px; }
.pm-desc { font-size: 14px; color: var(--ink-soft); margin-bottom: 24px; line-height: 1.65; }
.pm-notes-box {
  padding: 16px;
  background: var(--bg);
  border-radius: 8px;
  margin-bottom: 18px;
}
.pm-notes-box span { font-size: 11px; letter-spacing: 1.5px; color: var(--ink-soft); text-transform: uppercase; }
.pm-notes-box strong { display: block; font-size: 14px; color: var(--accent); margin-top: 6px; }
.pm-stock { font-size: 13px; color: var(--ink-soft); margin-bottom: 20px; }
.pm-actions { display: flex; gap: 10px; }
.btn-wish {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--ink);
  padding: 14px 20px;
  border-radius: 100px;
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s;
}
.btn-wish:hover { color: #e11d48; border-color: #e11d48; }
.btn-wish.on { background: #fce7e9; color: #e11d48; border-color: #e11d48; }

/* Checkout modal */
.pm-checkout {
  max-width: 580px;
  padding: 40px;
}
.pm-checkout h3 { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 4px; }
.pm-sub { font-size: 14px; color: var(--ink-soft); margin-bottom: 24px; }
.check-form { display: flex; flex-direction: column; gap: 20px; }
.check-section h4 {
  font-size: 13px; font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.check-section { display: flex; flex-direction: column; gap: 10px; }
.check-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check-form label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 12px; font-weight: 600;
  color: var(--ink);
}
.check-form input {
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit; font-size: 14px;
  outline: none;
}
.check-form input:focus { border-color: var(--accent); }
.pay-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pay-opt {
  padding: 0; border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all .2s;
  position: relative;
}
.pay-opt input { position: absolute; opacity: 0; }
.pay-opt span {
  display: block; padding: 14px;
  text-align: center;
}
.pay-opt span strong { display: block; font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.pay-opt span { font-size: 11px; color: var(--ink-soft); }
.pay-opt:has(input:checked) { border-color: var(--accent); background: rgba(196,128,90,.08); }
.check-total {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 16px;
  background: var(--bg);
  border-radius: 8px;
  margin-top: 4px;
}
.check-total span { font-size: 13px; color: var(--ink-soft); }
.check-total strong { font-size: 22px; font-weight: 800; color: var(--accent); }
.check-ok { text-align: center; color: #166534; background: #dcfce7; padding: 14px; border-radius: 8px; font-weight: 500; margin-top: 8px; }

/* Search modal */
.pm-search {
  max-width: 560px;
  padding: 0;
  align-self: flex-start;
  margin-top: 80px;
}
.pm-search input {
  width: 100%;
  padding: 20px 24px;
  border: none; border-bottom: 1px solid var(--border);
  font-family: inherit; font-size: 17px;
  background: transparent;
  outline: none;
}
.pm-results { padding: 8px 0; max-height: 60vh; overflow-y: auto; }
.sm-result {
  display: flex; gap: 14px; align-items: center;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .15s;
}
.sm-result:hover { background: var(--bg); }
.sm-result-img { width: 48px; height: 48px; border-radius: 6px; background-size: cover; background-position: center; flex-shrink: 0; }
.sm-result strong { display: block; font-size: 14px; font-weight: 600; margin: 2px 0; }
.sm-empty { padding: 32px; text-align: center; color: var(--ink-soft); }

.prod-modal { align-items: center; }
.prod-modal:has(.pm-search) { align-items: flex-start; padding-top: 80px; }

@media (max-width: 800px) {
  .pm-grid { grid-template-columns: 1fr; }
  .pm-img { aspect-ratio: 16/10; border-radius: 12px 12px 0 0; }
  .pm-info { padding: 28px; }
  .check-row { grid-template-columns: 1fr; }
  .pay-options { grid-template-columns: 1fr; }
  .pm-checkout { padding: 28px 20px; }
  .pm-actions { flex-direction: column; }
  .btn-wish { width: 100%; text-align: center; }
}
@media (max-width: 600px) {
  .hamburger.icon-btn { display: flex; }
  .nav-actions .icon-btn:not(.wish-btn):not(.cart-btn):not(.hamburger) { display: none; }
}

/* Mobile polish */
.hamburger.icon-btn { display: none; }
.hamburger.icon-btn span { display: block; width: 18px; height: 1.5px; background: var(--ink); transition: all .25s; }
.hamburger.icon-btn.active span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.hamburger.icon-btn.active span:nth-child(2) { opacity: 0; }
.hamburger.icon-btn.active span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-inner { padding: 14px 16px; gap: 8px; }
  .nav-links {
    display: flex !important;
    position: fixed; inset: 0;
    background: var(--bg);
    flex-direction: column !important;
    align-items: center; justify-content: center;
    gap: 28px;
    transform: translateY(-100%);
    opacity: 0;
    transition: transform .35s cubic-bezier(.2,.7,.3,1), opacity .25s;
    z-index: 55;
    flex: none;
    pointer-events: none;
  }
  .nav-links.mobile-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-links a { font-size: 22px; font-weight: 600; color: var(--accent) !important; }
  .hamburger.icon-btn { display: flex !important; flex-direction: column; gap: 4px; padding: 0; flex-shrink: 0; }
  .hamburger.icon-btn:hover { background: transparent; color: var(--ink); border-color: var(--border); }
  .nav-actions { gap: 6px; }
  .nav-actions .icon-btn { width: 38px; height: 38px; font-size: 14px; }
  .wish-btn, .cart-btn { padding: 0 12px; }
  .brand { font-size: 18px; }
  .hero { padding: 32px 0 56px; }
  .hero h1 { font-size: 36px; letter-spacing: -1px; }
  .hero p { font-size: 15px; }
  .products { padding: 32px 0 60px; }
  .products-head h2 { font-size: 28px; }
  .container { padding: 0 16px; }
  .product-filters { gap: 6px; }
  .pf { padding: 7px 13px; font-size: 12px; }
}
@media (max-width: 500px) {
  .product-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .product h3 { font-size: 15px; }
  .product-price { font-size: 17px; }
  .product-body { padding: 14px; }
  .add-btn { padding: 8px 12px; font-size: 11px; }
  .cart { width: 100vw; max-width: 100vw; }
}

/* H-scroll mobile: products */
@media (max-width: 700px) {
  .product-grid {
    display: flex !important;
    gap: 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding: 4px 16px 24px;
    margin: 0 -16px;
    scrollbar-width: none;
  }
  .product-grid::-webkit-scrollbar { display: none; }
  .product {
    flex: 0 0 65vw;
    max-width: 260px;
    scroll-snap-align: start;
  }
  .product-img { aspect-ratio: 4/5; }
}
