/* =========================
   RESET + BASE
========================= */
html, body{
  margin:0;
  padding:0;
  min-height:100%;
}

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

body{
  font-family:"Poppins", Arial, sans-serif;
  color:#fff;
  overflow-x:hidden;

  background:
    linear-gradient(rgba(0,0,0,.72), rgba(0,0,0,.72)),
    url("fotos/headerDecantcias.png") no-repeat center center / cover;

  background-attachment: fixed;

  /* espacio para footer fijo */
  padding-bottom: 86px;
}

/* utilidad */
.hidden{ display:none !important; }

/* Logo grande de fondo (no empuja layout) */
.bg-logo{
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:0;

  background: url("fotos/logo-footer.png") no-repeat;
  background-size: min(820px, 55vw);
  background-position: 22% 55%;
  opacity:.22;
  filter:
    drop-shadow(0 0 10px rgba(245, 209, 122, .35))
    drop-shadow(0 0 22px rgba(201, 164, 59, .25));
}

/* Todo el contenido por arriba del bg */
.hero, #brands, #brandView, #products, .cart-bar{
  position:relative;
  z-index:2;
}

/* =========================
   HERO (COMPACTO)
========================= */
.hero{
  width:100%;
  padding:18px 20px 6px;
}

.hero-overlay{
  display:flex;
  justify-content:center;
  text-align:center;
  padding:0;
  background:none;
}

.hero-content h1{
  margin:0 0 10px 0;
  font-size:32px;
  font-weight:800;
  letter-spacing:1.2px;
  color:#f5d17a;
  text-transform:uppercase;
  text-shadow:0 10px 24px rgba(0,0,0,.55);
}

/* Si usás logo en vez de texto */
.hero-logo{
  max-width: 420px;
  width: 90%;
  height: auto;
  display: block;
  margin: 0 auto 14px;
  filter:
    drop-shadow(0 0 8px rgba(245, 209, 122, .6))
    drop-shadow(0 0 18px rgba(201, 164, 59, .35));
}
@media (max-width: 768px){
  .hero-logo{ max-width: 280px; }
}

/* =========================
   BRANDS GRID
========================= */
.brands-grid{
  max-width:1100px;
  margin:0 auto;
  display:grid;
  grid-template-columns:repeat(3, minmax(260px, 1fr));
  gap:18px;
  padding:10px 20px 0;
  align-items:start;
}

@media (max-width: 980px){
  .brands-grid{ grid-template-columns:repeat(2, minmax(260px, 1fr)); }
}
@media (max-width: 640px){
  .brands-grid{ grid-template-columns:1fr; }
}

/* =========================
   BRAND VIEW
========================= */
.brand-view{
  max-width:1100px;
  margin:0 auto;
  padding:6px 20px 0;
}

.brand-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:6px 0 10px;
}

.back-btn{
  border:1px solid rgba(255,255,255,.25);
  background:rgba(0,0,0,.55);
  color:#fff;
  padding:8px 12px;
  border-radius:999px;
  cursor:pointer;
  font-weight:700;
}

#brandTitle{
  margin:0;
  font-size:20px;
  font-weight:800;
  color:#f5d17a;
}

/* =========================
   PRODUCTS GRID
========================= */
.products-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(260px, 1fr));
  gap:18px;
  padding:18px 20px 40px;
  max-width:1100px;
  margin:0 auto;
}

/* =========================
   CARD
========================= */
.product{
  position:relative;
  cursor:pointer;
  background:#fff;
  color:#111;
  border-radius:16px;
  padding:14px;
  box-shadow:0 10px 28px rgba(0,0,0,.25);
  transition:transform .18s ease, box-shadow .18s ease;
}

.product::after{
  content:"";
  position:absolute;
  inset:-6px;
  border-radius:22px;
  pointer-events:none;
  opacity:0;
  transform:scale(.985);
  transition:opacity .18s ease, transform .18s ease;
  box-shadow:
    0 0 0 2px #c9a43b,
    0 0 0 4px #000,
    0 0 0 6px rgba(201,164,59,.25);
} /* <- ESTA llave te faltaba */

.product:hover{
  transform:translateY(-6px);
  box-shadow:0 16px 36px rgba(0,0,0,.45);
}
.product:hover::after{
  opacity:1;
  transform:scale(1);
}

.product-card{
  display:flex;
  gap:12px;
  align-items:center;
}

.card-thumb{
  width:70px;
  height:70px;
  border-radius:16px;
  overflow:hidden;
  background:#000;
  border:2px solid #c9a43b;
  flex:0 0 auto;
}

.card-thumb img{
  width:100%;
  height:100%;
  object-fit:contain;
  background:#fff;
  display:block;
}

.card-info{
  min-width:0;
}

.card-info .title{
  margin:0;
  font-size:16px;
  font-weight:700;
}

.card-info .sub{
  margin:6px 0 0;
  font-size:13px;
  opacity:.7;
}

/* Logo marca dentro de productos */
.brand-logo{
  width:34px;
  height:34px;
  border-radius:10px;
  overflow:hidden;
  background:#fff;
  border:1px solid rgba(0,0,0,.12);
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom:6px;
}
.brand-logo img{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
}

/* =========================
   CART BADGE
========================= */
.cart-bar{
  position:fixed;
  right:20px;
  bottom:100px;
  z-index:9000;
}

.cart-btn{
  border:none;
  background:#25D366; /* verde estilo WhatsApp */
  color:#111;
  padding:16px 22px;
  border-radius:999px;
  cursor:pointer;
  font-weight:900;
  font-size:18px;
  box-shadow:0 8px 24px rgba(0,0,0,.45);
  transition:all .2s ease;
}

.cart-btn:hover{
  transform:translateY(-3px);
  box-shadow:0 12px 32px rgba(0,0,0,.6);
}

#cartCount{
  margin-left:6px;
  font-weight:900;
}


/* =========================
   MODALS (BASE)
========================= */
.modal{
  position:fixed;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  background:rgba(0,0,0,.65);
  z-index:20000;
}

/* caja default (carrito usa esto) */
.modal-box{
  width: min(560px, 92vw);
  max-height: 85vh;
  overflow:auto;
  background:#fff;
  color:#111;
  border-radius:22px;
  padding:22px;
  position:relative;
  box-shadow:0 25px 60px rgba(0,0,0,.55);
}

.modal-close{
  position:absolute;
  top:10px;
  right:10px;
  border:none;
  background:#eee;
  border-radius:12px;
  padding:8px 12px;
  cursor:pointer;
  font-weight:800;
}

/* =========================
   MODAL PRODUCTO (2 columnas)
   SOLO #modalOverlay
========================= */
#modalOverlay .modal-box{
  width: min(980px, 92vw);
  max-height: 85vh;
  overflow:hidden;

  display:grid;
  grid-template-columns: 1.1fr .9fr;
  column-gap:22px;
  row-gap:10px;
}

/* izquierda: galería */
#modalOverlay .modal-gallery{
  grid-column:1;
  grid-row:1 / span 30;
  display:flex;
  flex-direction:column;
  gap:12px;
  min-width:0;
}

#modalOverlay .modal-main-img{
  width:100%;
  height:320px;
  object-fit:contain;
  border-radius:16px;
  border:2px solid #c9a43b;
  background:#fff;
}

#modalOverlay .modal-thumbs{
  display:flex;
  gap:10px;
  overflow-x:auto;
  padding-bottom:4px;
}

#modalOverlay .thumb{
  width:62px;
  height:62px;
  border-radius:12px;
  overflow:hidden;
  background:#000;
  border:2px solid #c9a43b;
  flex:0 0 auto;
  cursor:pointer;
}

#modalOverlay .thumb.active{
  box-shadow:0 0 0 2px #000, 0 0 0 4px #c9a43b;
}

#modalOverlay .thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* derecha: textos + controles */
#modalOverlay #modalTitle,
#modalOverlay #modalDesc,
#modalOverlay #modalPrice,
#modalOverlay .qty-row,
#modalOverlay .decant-row,
#modalOverlay .btn-cart{
  grid-column:2;
  min-width:0;
}

#modalOverlay #modalTitle{
  margin:2px 0 6px;
  font-size:20px;
  font-weight:900;
}

#modalOverlay #modalDesc{
  margin:0 0 8px;
  opacity:.85;
  max-height:220px;
  overflow:auto;
  padding-right:6px;
}

#modalOverlay #modalPrice{
  font-weight:900;
  margin:6px 0 6px;
}

/* qty rows */
.qty-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin:6px 0;
}

.qty-controls{
  display:flex;
  align-items:center;
  gap:10px;
}

.qty-row button{
  width:34px;
  height:32px;
  border:none;
  border-radius:10px;
  background:#f3f3f3;
  cursor:pointer;
  font-weight:800;
}

/* decant row */
.decant-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:6px 0;
  padding:10px 12px;
  border-radius:14px;
  background:#f7f7f7;
}

.decant-left{
  display:flex;
  align-items:center;
  gap:10px;
}
.decant-right{
  font-weight:800;
}

/* switch */
.switch{
  position:relative;
  display:inline-block;
  width:44px;
  height:24px;
}
.switch input{
  opacity:0;
  width:0;
  height:0;
}
.slider{
  position:absolute;
  inset:0;
  background:#ccc;
  border-radius:999px;
  transition:.2s;
}
.slider:before{
  content:"";
  position:absolute;
  height:18px;
  width:18px;
  left:3px;
  top:3px;
  background:#fff;
  border-radius:50%;
  transition:.2s;
}
.switch input:checked + .slider{ background:#111; }
.switch input:checked + .slider:before{ transform:translateX(20px); }

/* botón add */
.btn-cart{
  width:100%;
  margin-top:8px;
  background:#111;
  color:#fff;
  border:none;
  border-radius:14px;
  padding:14px;
  font-weight:900;
  cursor:pointer;
}
.btn-cart:hover{ background:#000; }

/* responsive modal producto */
@media (max-width: 900px){
  #modalOverlay .modal-box{
    grid-template-columns:1fr;
    max-height:90vh;
    overflow:auto;
  }
  #modalOverlay .modal-gallery{
    grid-column:1;
    grid-row:auto;
  }
  #modalOverlay #modalTitle,
  #modalOverlay #modalDesc,
  #modalOverlay #modalPrice,
  #modalOverlay .qty-row,
  #modalOverlay .decant-row,
  #modalOverlay .btn-cart{
    grid-column:1;
  }
  #modalOverlay .modal-main-img{ height:280px; }
  #modalOverlay #modalDesc{ max-height:160px; }
}

/* =========================
   CART MODAL CONTENT
========================= */
.cart-items{
  margin:10px 0 14px;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.cart-item{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border-radius:14px;
  background:#f7f7f7;
}

.cart-mini-btn{
  border:none;
  background:#fff;
  border-radius:10px;
  padding:6px 10px;
  cursor:pointer;
  font-weight:800;
}

.qtyline{
  display:flex;
  align-items:center;
  gap:8px;
}

.cart-total{
  margin:10px 0 12px;
  font-weight:800;
}

.btn-whatsapp{
  width:100%;
  background:#25D366;
  color:#111;
  border:none;
  border-radius:14px;
  padding:12px;
  font-weight:900;
  cursor:pointer;
}

.btn-clear{
  width:100%;
  margin-top:10px;
  background:#eee;
  color:#111;
  border:none;
  border-radius:14px;
  padding:12px;
  font-weight:800;
  cursor:pointer;
}

/* =========================
   FOOTER (FIJO ABAJO)
========================= */
.footer-bar{
  position:fixed;
  left:0; right:0; bottom:0;
  z-index:9999;
  height:64px;
  display:flex;
  align-items:center;
  overflow:hidden;

  background:rgba(0,0,0,.72);
  backdrop-filter: blur(10px);
  border-top:1px solid rgba(255,255,255,.08);
}

.footer-inner{
  max-width:1100px;
  margin:0 auto;
  padding:0 18px;
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}

.footer-left{
  color:#ddd;
  font-size:13px;
  opacity:.95;
  line-height:1.2;
}

.footer-right{
  display:flex;
  gap:10px;
  flex:0 0 auto;
}

.footer-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 14px;
  border-radius:999px;
  font-weight:800;
  font-size:13px;
  text-decoration:none;
  cursor:pointer;
  white-space:nowrap;
}

.footer-btn.primary{
  background:#f5d17a;
  color:#111;
}

.footer-btn.ghost{
  background:rgba(255,255,255,.10);
  color:#fff;
  border:1px solid rgba(255,255,255,.16);
}

.footer-deco{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  height:44px;
  width:auto;
  pointer-events:none;
  opacity:.90;
  animation: footerGlow 3s ease-in-out infinite alternate;
}

.footer-deco-left{ left:14px; }
.footer-deco-right{ right:14px; }

@keyframes footerGlow{
  from{
    filter:
      drop-shadow(0 0 4px rgba(245, 209, 122, .55))
      drop-shadow(0 0 10px rgba(201, 164, 59, .30));
  }
  to{
    filter:
      drop-shadow(0 0 6px rgba(245, 209, 122, .95))
      drop-shadow(0 0 16px rgba(201, 164, 59, .70))
      drop-shadow(0 0 26px rgba(201, 164, 59, .45));
  }
}

@media (max-width: 768px){
  .footer-deco{ display:none; }
  .footer-bar{ height:auto; padding:10px 0; }
  body{ padding-bottom:96px; }

  .footer-inner{
    flex-direction:column;
    align-items:stretch;
    gap:10px;
    padding:0 14px;
  }
  .footer-right{ justify-content:center; }
}
.hero-logo{
  display:block !important;
  margin: 0 auto !important;
  max-width: 420px !important;
  width: 90% !important;
  height: auto !important;
}
/* Redes en el footer */
.footer-right{
  display:flex;
  align-items:center;
  gap:12px;
}

.footer-social{
  display:flex;
  align-items:center;
  gap:10px;
  margin-left:6px;
}

/* Reuso del estilo de botones sociales */
.footer-social .social-btn{
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(0,0,0,.45);
  border: 1px solid rgba(255,255,255,.16);
  color: #F6AD55;
  transition: .2s ease;
}

.footer-social .social-btn svg{
  width: 20px;
  height: 20px;
}

.footer-social .social-btn:hover{
  transform: translateY(-2px);
  background: rgba(0,0,0,.6);
  border-color: rgba(246,173,85,.55);
}
/* Quitar focus violeta en redes */
.footer-social .social-btn:focus,
.footer-social .social-btn:active{
  outline: none;
  box-shadow: none;
}

/* Si querés mantener accesibilidad pero con estilo propio */
.footer-social .social-btn:focus-visible{
  outline: 2px solid #F6AD55;
  outline-offset: 2px;
}
/* =========================
   Floating Search
========================= */

.floating-search {
  position: fixed;
  top: 18px;
  right: 18px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  z-index: 9999;
  transition: all 0.25s ease;
}

/* input oculto por defecto */
.floating-search input {
  width: 0;
  opacity: 0;
  padding: 0;
  border: none;
  outline: none;
  background: transparent;
  color: #fff;
  font-family: "Poppins", Arial, sans-serif;
  font-size: 14px;
  transition: width .25s ease, opacity .2s ease, padding .25s ease;
}
/* expandido */
.floating-search.active input {
  width: 220px;
  opacity: 1;
  padding: 0 10px;
}

/* botón */
.floating-search button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: #F6AD55;
  color: #111;
  font-size: 16px;
  display: grid;
  place-items: center;
  transition: transform .15s ease, background .15s ease;
}

@media (max-width: 480px) {
  .floating-search {
    top: 12px;
    right: 12px;
  }

  .floating-search.active input {
    width: 160px;
  }

  .floating-search button {
    width: 36px;
    height: 36px;
  }
}

.stock-line{
  font-size:12px;
  margin-top:6px;
  opacity:.85;
}

.badge-decant{
  margin-top:8px;
  display:inline-block;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:600;
  background: rgba(246,173,85,0.18);
  border: 1px solid rgba(246,173,85,0.6);
  color:#FBD38D;
}

.floating-search button:hover {
  transform: scale(1.05);
  background: #FBD38D;
}

.modal-stock-line{
  margin-top:8px;
  font-size:13px;
  font-weight:600;
  opacity:.9;
}

.badge-decant-inline{
  display:inline-block;
  padding:4px 8px;
  border-radius:999px;
  font-size:12px;
  background: rgba(246,173,85,0.18);
  border: 1px solid rgba(246,173,85,0.6);
  color:#FBD38D;
  margin-left:6px;
}

button:disabled{
  opacity:.45;
  cursor:not-allowed;
}

/* =========================
   DECANT BLOQUEADO
========================= */

.decant-disabled{
  opacity:0.58;
}

.decant-disabled .switch{
  pointer-events:none;
}

.decant-disabled .slider{
  cursor:not-allowed;
}

.decant-disabled span,
.decant-disabled label{
  color:#8a8a8a !important;
}

.decant-unavailable-text{
  font-size:12px;
  font-weight:500;
  color:#8a8a8a;
  display:inline-block;
  line-height:1.1;
}
}
.stock-last-unit{
  color:#FBD38D;
  font-weight:700;
}
.solo-decant-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  margin: 2px 0 8px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2px;
  color: #FBD38D;
  background: rgba(246,173,85,0.14);
  border: 1px solid rgba(246,173,85,0.55);
  box-shadow: 0 0 0 rgba(246,173,85,0.0);
  animation: soloDecantPulse 1.8s ease-in-out infinite;
}

.solo-decant-badge::before{
  content:"";
  width:7px;
  height:7px;
  border-radius:50%;
  background:#F6AD55;
  box-shadow:0 0 10px rgba(246,173,85,.75);
}

@keyframes soloDecantPulse{
  0%{
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(246,173,85,0.18);
  }
  50%{
    transform: scale(1.03);
    box-shadow: 0 0 0 6px rgba(246,173,85,0.00);
  }
  100%{
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(246,173,85,0.00);
  }
}
