@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,500&family=Work+Sans:wght@300;400;500;600&display=swap');

:root {
  --ink: #14100F;
  --bone: #F4EEE3;
  --merlot: #6E1423;
  --gold: #B08D57;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Work Sans', sans-serif;
  background: var(--bone);
  color: var(--ink);
  font-weight: 400;
}

.display { font-family: 'Playfair Display', serif; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
::selection { background: var(--gold); color: var(--ink); }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* HEADER */
header.site {
  position: sticky; top: 0; z-index: 40;
  background: rgba(244,238,227,0.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(20,16,15,0.1);
}
.header-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 20px;
  height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--gold);
  display: flex; align-items: center; justify-content: center; font-size: 13px;
}
.brand-name { font-size: 22px; letter-spacing: 0.02em; }

nav.cats { display: none; gap: 28px; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; }
nav.cats button {
  background: none; border: none; padding-bottom: 4px; border-bottom: 1px solid transparent; color: var(--ink);
}
nav.cats button.active { border-color: var(--merlot); color: var(--merlot); }
@media (min-width: 860px) { nav.cats { display: flex; } .menu-toggle { display: none; } }

.header-actions { display: flex; align-items: center; gap: 12px; }
.search-box { display: none; align-items: center; border-bottom: 1px solid rgba(20,16,15,0.3); padding: 4px 0; }
.search-box input { border: none; background: none; outline: none; font-size: 14px; width: 140px; margin-left: 6px; font-family: inherit; }
@media (min-width: 640px) { .search-box { display: flex; } }
.icon-btn { background: none; border: none; padding: 8px; position: relative; color: var(--ink); }
.icon-btn:hover { color: var(--merlot); }
.cart-count {
  position: absolute; top: 0; right: 0; background: var(--merlot); color: var(--bone);
  font-size: 10px; width: 16px; height: 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.menu-toggle { background: none; border: none; padding: 8px; margin-left: -8px; }

/* MOBILE MENU */
.mobile-menu {
  position: fixed; inset: 0; z-index: 50; background: rgba(20,16,15,0.5); display: none;
}
.mobile-menu.open { display: block; }
.mobile-menu-panel {
  width: 280px; height: 100%; background: var(--bone); padding: 24px; display: flex; flex-direction: column; gap: 20px;
}
.mobile-menu-panel button.cat-link { background: none; border: none; text-align: left; font-family: 'Playfair Display', serif; font-size: 24px; }
.mobile-menu-close { align-self: flex-end; background: none; border: none; }

/* HERO */
.hero { position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1fr; min-height: 60vh; }
@media (min-width: 860px) { .hero-grid { grid-template-columns: 1fr 1fr; min-height: 72vh; } }
.hero-copy {
  background: var(--merlot); color: var(--bone); display: flex; flex-direction: column; justify-content: center;
  padding: 60px 24px; position: relative; z-index: 10;
}
@media (min-width: 860px) { .hero-copy { padding: 60px 60px; } }
.eyebrow { font-size: 11px; letter-spacing: 0.35em; text-transform: uppercase; color: var(--gold); margin-bottom: 16px; }
.hero-copy h1 { font-size: 44px; line-height: 1.05; margin: 0 0 24px; }
.hero-copy h1 em { font-style: italic; color: var(--gold); }
@media (min-width: 860px) { .hero-copy h1 { font-size: 64px; } }
.hero-copy p { max-width: 380px; font-size: 15px; color: rgba(244,238,227,0.8); margin-bottom: 32px; }
.btn-outline-gold {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--gold); background: none; color: var(--bone);
  padding: 12px 24px; font-size: 13px; letter-spacing: 0.15em; text-transform: uppercase; width: fit-content;
  transition: background .2s, color .2s;
}
.btn-outline-gold:hover { background: var(--gold); color: var(--ink); }
.hero-image { position: relative; min-height: 320px; }
.hero-image img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.brushstroke { display: none; position: absolute; top: 0; left: 50%; transform: translateX(-50%); height: 100%; width: 96px; z-index: 20; pointer-events: none; }
@media (min-width: 860px) { .brushstroke { display: block; } }

/* SECTION HEADINGS */
section { padding: 60px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 32px; flex-wrap: wrap; }
.section-head h2 { font-size: 30px; margin: 0; }
@media (min-width: 860px) { .section-head h2 { font-size: 36px; } }
.muted { opacity: 0.6; font-size: 13px; }

/* CATEGORY TILES */
.cat-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 860px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
.cat-tile {
  position: relative; height: 320px; overflow: hidden; border: none; padding: 0; text-align: left; background: none;
}
.cat-tile img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; transition: transform .6s; }
.cat-tile:hover img { transform: scale(1.05); }
.cat-tile::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(20,16,15,0.85), rgba(20,16,15,0.1) 60%, transparent);
}
.cat-tile-text { position: absolute; bottom: 0; left: 0; padding: 22px; color: var(--bone); z-index: 2; }
.cat-tile-text h3 { font-size: 24px; margin: 0 0 4px; }
.cat-tile-text p { font-size: 13px; color: rgba(244,238,227,0.8); margin: 0; }

/* PRODUCT GRID */
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (min-width: 700px) { .product-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.card-image { position: relative; aspect-ratio: 3/4; overflow: hidden; background: #e8e0d0; margin-bottom: 10px; }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.product-card:hover .card-image img { transform: scale(1.05); }
.badge-sale {
  position: absolute; top: 10px; left: 10px; background: var(--merlot); color: var(--bone);
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; padding: 4px 8px;
}
.product-card { background: none; border: none; padding: 0; text-align: left; width: 100%; }
.product-name { font-size: 15px; margin: 0 0 4px; line-height: 1.3; }
@media (min-width: 700px) { .product-name { font-size: 18px; } }
.price-row { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.price-strike { text-decoration: line-through; opacity: 0.4; font-size: 12px; }
.add-btn {
  margin-top: 8px; width: 100%; font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase;
  border: 1px solid rgba(20,16,15,0.2); background: none; padding: 10px 0; transition: border-color .2s, color .2s;
}
.add-btn:hover { border-color: var(--merlot); color: var(--merlot); }
.empty-state { text-align: center; padding: 80px 0; opacity: 0.6; }
.empty-state h3 { font-size: 20px; margin-bottom: 8px; }

/* BRAND STORY */
.story { background: var(--ink); color: var(--bone); text-align: center; }
.story .wrap { max-width: 700px; }
.story .eyebrow { color: var(--gold); }
.story h2 { font-style: italic; font-size: 28px; margin: 16px 0 24px; }
@media (min-width: 860px) { .story h2 { font-size: 36px; } }
.story p { color: rgba(244,238,227,0.7); line-height: 1.7; font-size: 15px; }

/* NEWSLETTER */
.newsletter { max-width: 480px; margin: 0 auto; text-align: center; padding: 80px 20px; }
.newsletter h2 { font-size: 26px; margin-bottom: 10px; }
.newsletter p { opacity: 0.7; font-size: 14px; margin-bottom: 22px; }
.newsletter form { display: flex; gap: 8px; }
.newsletter input {
  flex: 1; border: none; border-bottom: 1px solid rgba(20,16,15,0.3); background: none; padding: 8px 6px;
  font-size: 14px; outline: none; font-family: inherit;
}
.newsletter input:focus { border-color: var(--merlot); }
.newsletter button {
  border: 1px solid var(--ink); background: none; padding: 0 18px; font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase;
  transition: background .2s, color .2s;
}
.newsletter button:hover { background: var(--ink); color: var(--bone); }

/* FOOTER */
footer.site { border-top: 1px solid rgba(20,16,15,0.1); padding: 40px 0; font-size: 13px; opacity: 0.7; }
footer.site .wrap { display: flex; flex-direction: column; gap: 12px; justify-content: space-between; }
@media (min-width: 700px) { footer.site .wrap { flex-direction: row; align-items: center; } }

/* MODAL (ficha producto) */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(20,16,15,0.6); display: none; align-items: center; justify-content: center; }
.overlay.open { display: flex; }
.modal {
  background: var(--bone); width: 100%; max-height: 92vh; overflow-y: auto;
  display: grid; grid-template-columns: 1fr;
}
@media (min-width: 860px) { .modal { max-width: 780px; margin: 16px; grid-template-columns: 1fr 1fr; } }
.modal-image { position: relative; aspect-ratio: 3/4; }
.modal-image img { width: 100%; height: 100%; object-fit: cover; }
.modal-close {
  position: absolute; top: 12px; right: 12px; background: var(--bone); width: 32px; height: 32px; border-radius: 50%;
  border: none; display: flex; align-items: center; justify-content: center;
}
.modal-body { padding: 28px; display: flex; flex-direction: column; }
.modal-sku { font-size: 11px; letter-spacing: 0.25em; text-transform: uppercase; color: var(--merlot); margin-bottom: 8px; }
.modal-body h2 { font-size: 26px; margin: 0 0 8px; }
.modal-desc { font-size: 14px; line-height: 1.6; opacity: 0.8; margin-bottom: 24px; }
.qty-row { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.qty-btn { width: 32px; height: 32px; border: 1px solid rgba(20,16,15,0.2); background: none; display: flex; align-items: center; justify-content: center; }
.btn-dark {
  width: 100%; background: var(--ink); color: var(--bone); border: none; padding: 14px 0;
  font-size: 12px; letter-spacing: 0.15em; text-transform: uppercase; transition: background .2s; margin-top: auto;
}
.btn-dark:hover { background: var(--merlot); }

/* CART DRAWER */
.drawer-overlay { position: fixed; inset: 0; z-index: 55; background: rgba(20,16,15,0.5); display: none; }
.drawer-overlay.open { display: block; }
.drawer {
  position: absolute; right: 0; top: 0; height: 100%; width: 100%; max-width: 380px; background: var(--bone);
  display: flex; flex-direction: column;
}
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid rgba(20,16,15,0.1); }
.drawer-head button { background: none; border: none; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.cart-line { display: flex; gap: 12px; margin-bottom: 20px; }
.cart-line img { width: 64px; height: 80px; object-fit: cover; }
.cart-line-name { font-size: 14px; margin: 0 0 2px; }
.cart-line-price { font-size: 12px; opacity: 0.6; margin-bottom: 8px; }
.qty-control { display: flex; align-items: center; gap: 8px; }
.qty-control button { width: 24px; height: 24px; border: 1px solid rgba(20,16,15,0.2); background: none; display: flex; align-items: center; justify-content: center; font-size: 13px; }
.remove-line { margin-left: auto; background: none; border: none; opacity: 0.5; }
.remove-line:hover { opacity: 1; color: var(--merlot); }
.drawer-footer { border-top: 1px solid rgba(20,16,15,0.1); padding: 20px; }
.subtotal-row { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 16px; }
.subtotal-row strong { font-family: 'Playfair Display', serif; font-size: 20px; font-weight: 600; }

/* TOAST */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 60;
  background: var(--ink); color: var(--bone); font-size: 14px; padding: 12px 20px; box-shadow: 0 6px 18px rgba(0,0,0,0.2);
  display: none;
}
.toast.show { display: block; }

/* ADMIN LINK (footer) */
.admin-link { font-size: 12px; opacity: 0.5; }
.admin-link:hover { opacity: 1; }
