/* ==========================================================
   MARABUNTA — Paleta real (extraída de la tienda actual)
   Negro + naranja vivo + tipografía bold redondeada
   ========================================================== */
:root {
  --black:        #111111;
  --black-2:      #1a1a1a;
  --orange:       #E8821E;
  --orange-dark:  #C96A12;
  --orange-light: #F2A44E;
  --white:        #ffffff;
  --text:         #171717;
  --muted:        #6b6b6b;
  --border:       #eaeaea;

  --font: 'Poppins', sans-serif;

  --radius: 4px;
  --max-width: 1200px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================
   HEADER
   ========================================================== */
.header-top {
  background: var(--black);
  padding: 16px 0;
}

.header-top-centered {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
}

.header-top-centered .logo { position: static; }

.header-top-centered .cart-toggle {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.logo img { height: 78px; width: auto; }

.search-bar {
  flex: 1;
  display: flex;
  max-width: 640px;
}

.search-bar input {
  flex: 1;
  border: none;
  border-radius: 24px 0 0 24px;
  padding: 12px 20px;
  font-family: var(--font);
  font-size: 14px;
  background: var(--white);
  outline: none;
}

.search-bar button {
  background: var(--orange);
  border: none;
  border-radius: 0 24px 24px 0;
  width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--white);
  white-space: nowrap;
}

.header-actions .account-text {
  font-size: 12.5px;
  line-height: 1.3;
}

.header-actions .account-text strong { display: block; font-weight: 600; }
.header-actions .account-text a { text-decoration: underline; }

.cart-toggle {
  position: relative;
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
}

.cart-toggle svg { width: 24px; height: 24px; }

.cart-count {
  position: absolute;
  top: -6px;
  right: -8px;
  background: var(--orange);
  color: var(--white);
  font-weight: 700;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

/* secondary white nav bar */
.header-nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.header-nav .wrap {
  display: flex;
  align-items: center;
  gap: 32px;
  padding-top: 14px;
  padding-bottom: 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.header-nav a {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
}

.header-nav a:hover { color: var(--orange-dark); }

/* Mega-menú de Productos */
.nav-item-dropdown { position: relative; }

.products-dropdown {
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  background: var(--white);
  box-shadow: 0 12px 28px rgba(0,0,0,0.18);
  border-radius: var(--radius);
  padding: 24px 32px;
  display: none;
  grid-template-columns: repeat(2, auto);
  column-gap: 56px;
  row-gap: 20px;
  min-width: 380px;
  z-index: 60;
}

.products-dropdown.open { display: grid; }

.products-dropdown-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.products-dropdown a.cat-link {
  font-weight: 700;
  color: var(--text);
  text-transform: none;
  font-size: 14px;
  letter-spacing: normal;
}

.products-dropdown a.sub-link {
  font-weight: 400;
  color: var(--muted);
  text-transform: none;
  font-size: 13.5px;
  letter-spacing: normal;
  margin-top: -6px;
}

.products-dropdown a:hover { color: var(--orange-dark); }

/* ==========================================================
   HERO — imagen completa, sin recortes ni altura forzada
   ========================================================== */
.hero {
  width: 100%;
  line-height: 0; /* evita el espacio fantasma debajo de la imagen */
}

.hero-img {
  width: 100%;
  height: auto;
  display: block;
}

.hero-eyebrow {
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--orange-light);
}

.hero h1 {
  font-family: var(--font);
  font-weight: 900;
  font-size: clamp(34px, 5.5vw, 58px);
  line-height: 1.05;
  margin: 0 0 18px;
  max-width: 16ch;
  text-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

.hero p {
  max-width: 46ch;
  font-size: 16px;
  margin: 0 0 26px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}

.btn-primary {
  display: inline-block;
  font-family: var(--font);
  font-weight: 700;
  font-size: 14px;
  background: var(--orange);
  color: var(--white);
  padding: 13px 26px;
  border-radius: 24px;
  transition: background 0.15s ease;
}

.btn-primary:hover { background: var(--orange-dark); }

/* ==========================================================
   CATEGORY TILES BANNER
   ========================================================== */
.category-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 0;
  border-top: 6px solid var(--orange);
}

.category-tile {
  position: relative;
  height: 160px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.category-tile:hover img {
  transform: scale(1.06);
}

.category-tile.no-photo { background: var(--black); }

.category-tile span {
  position: relative;
  z-index: 1;
  font-weight: 900;
  font-size: clamp(26px, 3.2vw, 40px);
  text-transform: uppercase;
  line-height: 1.1;
  padding: 0 16px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.55);
}

.category-tile small {
  display: block;
  font-size: 15px;
  font-weight: 600;
  text-transform: none;
  margin-top: 4px;
}

/* Colores por tile, como en la tienda actual */
.category-tile.tile-botellas span { color: #F4C98A; }
.category-tile.tile-barriles span { color: var(--white); }
.category-tile.tile-copas span { color: #EA5A2B; }

/* ==========================================================
   PRODUCT BAND (fondo naranja, como "Destacados"/"Novedades")
   ========================================================== */
.category-section {
  background: var(--orange);
  padding: 40px 0;
  margin-bottom: 0;
}

.category-heading {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 4px;
}

.category-heading h2 {
  font-family: var(--font);
  font-weight: 900;
  font-size: 28px;
  color: var(--white);
  margin: 0;
}

.category-heading .count {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
}

.category-note {
  font-size: 13.5px;
  color: rgba(255,255,255,0.85);
  margin: 4px 0 26px;
  max-width: 60ch;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 6px;
}

/* ==========================================================
   PRODUCT CARD
   ========================================================== */
.product-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.2s ease;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-6px) scale(1.02);
}

.product-visual {
  aspect-ratio: 1 / 1;
  background: var(--white);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-visual svg { width: 46%; height: 46%; opacity: 0.5; }

.product-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--white);
  margin: 4px 0 0;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

.product-meta {
  font-size: 11px;
  color: rgba(255,255,255,0.75);
  text-transform: uppercase;
  font-weight: 600;
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.price {
  font-size: 18px;
  font-weight: 800;
  color: var(--white);
}

.price-old {
  font-size: 12.5px;
  color: rgba(255,255,255,0.6);
  text-decoration: line-through;
}

.price-from {
  font-size: 11px;
  color: rgba(255,255,255,0.75);
  text-transform: uppercase;
  font-weight: 600;
}

.stock-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  width: fit-content;
}

.stock-badge .cap { width: 14px; height: 14px; flex-shrink: 0; }
.stock-badge.in-stock { color: var(--white); }
.stock-badge.out-stock { color: rgba(255,255,255,0.6); }

.add-btn {
  margin-top: auto;
  font-weight: 700;
  font-size: 12.5px;
  background: var(--black);
  color: var(--white);
  border: none;
  padding: 10px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.add-btn:hover:not(:disabled) { background: var(--black-2); }

.add-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ==========================================================
   CART DRAWER
   ========================================================== */
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(380px, 100vw);
  background: var(--white);
  z-index: 100;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 20px rgba(0,0,0,0.15);
}

.cart-drawer.open { transform: translateX(0); }

.cart-drawer-header {
  padding: 20px;
  background: var(--black);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-drawer-header h3 {
  font-weight: 800;
  font-size: 18px;
  margin: 0;
  color: var(--white);
}

.cart-close {
  background: none;
  border: none;
  color: var(--white);
  font-size: 20px;
  cursor: pointer;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 12px 20px;
}

.cart-empty {
  color: var(--muted);
  font-size: 14px;
  padding: 30px 0;
  text-align: center;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.cart-item-name { font-size: 13px; color: var(--text); }
.cart-item-qty { font-size: 12px; color: var(--muted); }
.cart-item-price { font-size: 13px; font-weight: 700; color: var(--orange-dark); white-space: nowrap; }

.cart-item-remove {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.cart-drawer-footer {
  padding: 20px;
  border-top: 1px solid var(--border);
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  color: var(--text);
  margin-bottom: 16px;
}

.cart-total-row strong { color: var(--orange-dark); font-size: 20px; }

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.cart-overlay.open { opacity: 1; pointer-events: auto; }

/* ==========================================================
   FOOTER
   ========================================================== */
.site-footer {
  padding: 50px 0 30px;
  text-align: center;
  background: var(--black);
  color: var(--white);
}

.site-footer p {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  margin: 14px 0 0;
}

.site-footer a { text-decoration: underline; }

/* ==========================================================
   BOTON FLOTANTE DE WHATSAPP
   ========================================================== */
#whatsapp-float {
  position: fixed;
  bottom: 22px;
  right: 22px;
  width: 56px;
  height: 56px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
  z-index: 500;
  transition: transform 0.15s ease;
}

#whatsapp-float:hover { transform: scale(1.08); }

/* ==========================================================
   REDES EN EL FOOTER
   ========================================================== */
.footer-social {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 14px;
}

.footer-social a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--white);
  font-size: 13px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 20px;
  padding: 8px 16px;
  transition: border-color 0.15s ease;
}

.footer-social a:hover { border-color: var(--white); }

.footer-social svg { width: 18px; height: 18px; }
/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 720px) {
  .header-top .wrap { flex-wrap: wrap; }
  .search-bar { order: 3; max-width: none; width: 100%; }
  .header-actions .account-text { display: none; }
  .category-tiles { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

/* ==========================================================
   MODAL DE PRODUCTO
   ========================================================== */
.product-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.product-modal-overlay.open { display: flex; }

.product-modal {
  background: var(--orange);
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
}

.product-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(0,0,0,0.35);
  border: none;
  color: var(--white);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  z-index: 2;
}

.product-modal-visual {
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}

.product-modal-visual img { width: 100%; height: 100%; object-fit: cover; }

.product-modal-body {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.product-modal-crumb {
  font-size: 12px;
  color: rgba(255,255,255,0.8);
}

.product-modal-title {
  font-family: var(--font);
  font-weight: 800;
  font-size: 24px;
  color: var(--white);
  margin: 0;
}

.product-modal-price {
  font-size: 24px;
  font-weight: 800;
  color: var(--white);
}

.product-modal-price .old {
  font-size: 15px;
  font-weight: 400;
  color: rgba(255,255,255,0.65);
  text-decoration: line-through;
  margin-left: 8px;
}

.product-modal-desc {
  font-size: 14px;
  color: rgba(255,255,255,0.95);
  line-height: 1.6;
}

.product-modal-desc p { margin: 0 0 10px; }

.product-modal-stock {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--white);
}

.product-modal-style-select { margin: 4px 0; }

.style-select-label {
  font-size: 13px;
  color: var(--white);
  margin: 0 0 8px;
}

.style-select-label strong { font-weight: 700; }

.style-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.style-pill {
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 600;
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.6);
  color: var(--white);
  padding: 8px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.style-pill:hover { border-color: var(--white); }

.style-pill.active {
  background: var(--white);
  color: var(--orange-dark);
  border-color: var(--white);
}

.style-pill.unavailable {
  opacity: 0.4;
}

.product-modal-qty-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
}

.qty-stepper {
  display: flex;
  align-items: center;
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 24px;
  overflow: hidden;
}

.qty-stepper button {
  background: none;
  border: none;
  color: var(--white);
  width: 36px;
  height: 36px;
  font-size: 16px;
  cursor: pointer;
}

.qty-stepper span {
  min-width: 28px;
  text-align: center;
  color: var(--white);
  font-weight: 700;
}

.product-modal-add {
  font-family: var(--font);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--black);
  color: var(--white);
  border: none;
  padding: 12px 26px;
  border-radius: 24px;
  cursor: pointer;
  flex: 1;
}

.product-modal-add:hover:not(:disabled) { background: var(--black-2); }
.product-modal-add:disabled { opacity: 0.4; cursor: not-allowed; }

@media (max-width: 640px) {
  .product-modal { grid-template-columns: 1fr; }
  .product-modal-visual { min-height: 220px; }
}
