:root {
  --vino: #16325F;
  --vino-oscuro: #0c1b33;
  --blanco: #ffffff;
  --plata: #dddddd;
  --gris-oscuro: #222222;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  color: var(--gris-oscuro);
  background-color: var(--blanco);
}


.header {
  background-color: var(--vino-oscuro);
  color: var(--blanco);
  padding: 1.5rem 2rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    "menu logo cart"
    "nav nav nav";
  align-items: center;
  position: relative;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.hero {
  position: relative;
  width: 100%;
  height: 60vh; /* controla el alto del hero */
  overflow: hidden;
}

.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* ✅ mejora legibilidad */
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
}

.hero-content {
  color: white;
  z-index: 3;
  max-width: 800px;
}

.hero h1 {
  font-size: 2.8rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.3rem;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .hero {
    height: 50vh;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }
}




.menu-toggle {
  grid-area: menu;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--blanco);
  display: none;
}

a{
  text-decoration: none;
}

.logo {
  grid-area: logo;
  font-weight: 700;
  text-align: center;
}


.logo img {
  height: 9rem;     
  width: auto;
  display: inline-block;
  vertical-align: middle;
  
}


@media (max-width: 768px) {
  .logo img {
    height: 8rem;   
  }
}




.cart {
  grid-area: cart;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.3rem;
}

.menu-links {
  grid-area: nav;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  padding-top: 1rem;
}

.menu-links a {
  color: var(--blanco);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: color 0.3s ease;
}

.menu-links a::after {
  content: '';
  position: absolute;
  width: 0%;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--plata);
  transition: width 0.3s ease;
}

.menu-links a:hover {
  color: var(--plata);
}

.menu-links a:hover::after {
  width: 100%;
}


.cart-count {
  background-color: var(--blanco);
  color: var(--vino);
  font-weight: bold;
  padding: 0.2rem 0.5rem;
  border-radius: 50%;
  font-size: 0.9rem;
}




.btn {
  background-color: var(--blanco);
  color: var(--vino);
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  font-weight: bold;
  border-radius: 4px;
}

.benefits {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  padding: 3rem 1rem;
  background-color: #f7f7f7;
}

.benefit {
  max-width: 300px;
  margin: 1rem;
  text-align: center;
}


.star-product h2 {
  text-align: center;
  margin-bottom: 1.3rem;
  font-size: 2rem;
  color: var(--gris-oscuro);
}

.star-product-card {
  background-color: white;
  border-radius: 16px;
  overflow: hidden;
  max-width: 400px;
  margin: 0 auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;

}

.star-product-card:hover {
  transform: scale(1.03);
}

.star-product-card img {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  display: block;
}


.star-product {
  padding: 1.3rem 1rem;
  background-color: var(--blanco);
}

.star-product .card-info {
  padding: 1.5rem 1rem;
}

.star-product .desc{
  margin-bottom: 15px;
}

.star-product .tags{
  margin-bottom: 1.5rem;
}


.btn-secondary {
  background-color: var(--vino);
  color: var(--blanco);
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  font-weight: bold;
  border-radius: 4px;
}

.footer {
  background-color: var(--vino);
  color: var(--plata);
  text-align: center;
  padding: 2rem;
}

.footer-links a {
  color: var(--plata);
  margin: 0 1rem;
  text-decoration: none;
  font-size: 0.9rem;
}


.reviews {
  background-color: var(--vino-oscuro);
  padding: 3rem 1rem;
  text-align: center;
}

.reviews h2 {
  color: var(--blanco);
  margin-bottom: 2rem;
}
.review-slider {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 1rem;
  cursor: grab;
  user-select: none;
  scrollbar-width: none; /* Firefox */
}

.review-slider::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}

.review-slider.grabbing {
  cursor: grabbing;
}

.review-card {
  min-width: 250px;
  background-color: var(--blanco);
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  scroll-snap-align: start;
  flex-shrink: 0;
  font-size: 0.95rem;
  line-height: 1.4;
  transition: transform 0.3s ease;
}



.mattress-slider-container {
  background-color: #f7f7f7;
  padding: 2rem 0;
}

.mattress-slider-container h2 {
  color: var(--gris-oscuro);
  text-align: center;
  margin-bottom: 1rem;
}


.mattress-slider {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  gap: 1.5rem;
  padding: 0 1rem;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  scrollbar-width: none; /* Firefox */
}

.mattress-slider::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}

.mattress-slider select,
.mattress-slider option {
  pointer-events: auto;
  user-select: text;
}



.mattress-card {
  background-color: white;
  border-radius: 16px;
  overflow: visible;
  flex: 0 0 80%;
  max-width: 80%;
  height: 600px; /* Fija la altura total de la card */
  min-height: 420px;
  scroll-snap-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.mattress-card:hover {
  transform: scale(1.03);
}


.mattress-card img {
  width: 100%;
  height: 280px; /* fija la altura */
  object-fit: cover; /* mantiene proporciones sin deformar */
  display: block;
}


.card-info {
  padding: 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-grow: 1;
}

.card-info h3 {
  margin-bottom: 0.5rem;
  color: var(--gris-oscuro);
}

.card-info .price {
  color: var(--vino);
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.tags {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tags span {
  background-color: var(--plata);
  color: var(--gris-oscuro);
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.8rem;
}

.btn-add {
  background-color: var(--vino);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
}

.btn-add:hover {
  background-color: var(--vino-oscuro);
}



.size-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.size-label {
  font-size: 0.9rem;
  color: var(--gris-oscuro);
  margin: 0;
  white-space: nowrap;
}

.size-select {
  padding: 0.4rem 1.8rem 0.4rem 0.6rem;
  border: 2px solid var(--vino);
  border-radius: 8px;
  font-size: 0.9rem;
  background-color: white;
  color: var(--gris-oscuro);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D'10'%20height%3D'6'%20viewBox%3D'0%200%2010%206'%20fill%3D'none'%20xmlns%3D'http%3A//www.w3.org/2000/svg'%3E%3Cpath%20d%3D'M1%201L5%205L9%201'%20stroke%3D'%23222222'%20stroke-width%3D'2'%20/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 12px;
  cursor: pointer;
  max-width: 200px;
}


.size-select:focus {
  outline: none;
  border-color: var(--vino);
  box-shadow: 0 0 0 3px rgba(215, 38, 56, 0.3);
  background-color: white;
}

.size-select option {
  padding: 0.5rem;
  border-radius: 8px;
  background-color: white;
  color: var(--gris-oscuro);
}


/* Desktop: mostrar hasta 3 cards */
@media (min-width: 768px) {
  .mattress-card {
    flex: 0 0 calc(33.333% - 1rem);
    max-width: calc(33.333% - 1rem);
  }
}




@media (max-width: 768px) {
  .review-slider {
    scroll-snap-type: x mandatory;
    overflow-x: auto;
    display: flex;
  }

  .review-card {
    scroll-snap-align: center;
    flex: 0 0 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Evita desbordes y asegura wrap */
  .review-card p {
    white-space: normal;
    word-break: break-word;
  }
}



/* Responsive */
@media (max-width: 768px) {


  .benefits {
    flex-direction: column;
    align-items: center;
  }
}


@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(40px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.6s ease-out;
}

.animate.visible {
  opacity: 1;
  transform: translateY(0);
}





@media (max-width: 768px) {
  .header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--vino);
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "menu logo cart"
      "nav nav nav";
    row-gap: 1rem;
  }

  .menu-toggle {
    display: block;
  }

  .menu-links {
    background-color: var(--vino-oscuro);
    grid-area: nav;
    width: 100%;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
  }

  .menu-links.show {
    max-height: 300px;
    opacity: 1;
    padding: 1rem 0;
  }

}





@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}




.catalogue-header {
  text-align: center;
  padding: 3rem 1rem;
}

.catalogue-header h1 {
  font-size: 2.5rem;
  color: var(--vino-oscuro);
  margin-bottom: 0.5rem;
}

.catalogue-header .subtitle {
  font-size: 1.1rem;
  color: var(--gris-oscuro);
}

.catalogue-grid {
  display: grid;
  gap: 2rem;
  padding: 2rem 1rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.catalogue-card {
  background-color: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

.catalogue-card:hover {
  transform: scale(1.02);
}

.catalogue-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.catalogue-card .card-info {
  padding: 1rem;
  text-align: center;
}

.catalogue-card h3 {
  font-size: 1.3rem;
  color: var(--gris-oscuro);
  margin-bottom: 0.5rem;
}

.catalogue-card .price {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--vino);
  margin-bottom: 0.5rem;
}

.catalogue-card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.catalogue-card .tags span {
  background-color: var(--plata);
  color: var(--gris-oscuro);
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.8rem;
}

.catalogue-card .size-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.catalogue-card .size-label {
  font-size: 0.9rem;
  color: var(--gris-oscuro);
}

.catalogue-card .size-select {
  padding: 0.4rem 0.6rem;
  border: 2px solid var(--vino);
  border-radius: 8px;
  font-size: 0.9rem;
  background-color: white;
  color: var(--gris-oscuro);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D'10'%20height%3D'6'%20viewBox%3D'0%200%2010%206'%20fill%3D'none'%20xmlns%3D'http://www.w3.org/2000/svg'%3E%3Cpath%20d%3D'M1%201L5%205L9%201'%20stroke%3D'%23222222'%20stroke-width%3D'2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 12px;
}

.catalogue-card .btn-add {
  margin: 0 auto 1rem;
  background-color: var(--vino);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1rem;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.3s ease;
}

.catalogue-card .btn-add:hover {
  background-color: var(--vino-oscuro);
}


.catalogue-header {
  text-align: center;
  padding: 3rem 1rem 2rem;
}

.catalogue-header h1 {
  font-size: 2rem;
  color: var(--gris-oscuro);
}

.catalogue-header p {
  color: var(--gris-oscuro);
  font-size: 1rem;
}

.mattress-slider-section {
  padding: 2rem 1rem;
}

.block-light {
  background-color: #f7f7f7;
}

.block-plain {
  background-color: white;
}

.mattress-slider-section h2 {
  text-align: center;
  color: var(--gris-oscuro);
  margin-bottom: 1rem;
}



#close-chat-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #fff;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: #333;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  box-shadow: 0 1px 4px #0002;
  z-index: 10;
}




#chat-bubble {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9999;
  background: #b51f2f;
  color: white;
  border-radius: 100%;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px #0002;
  cursor: pointer;
  font-size: 2rem;
}

#chat-box {
  display: none;
  position: fixed;
  right: 24px;
  bottom: 100px;
  width: 350px;
  max-width: 90vw;
  background: white;
  border-radius: 20px;
  box-shadow: 0 4px 24px #0003;
  z-index: 9999;
  padding: 0;
  transition: all .2s;
}

#chat-box .close-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #fff;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: #b51f2f;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  box-shadow: 0 1px 4px #0002;
  z-index: 10;
  line-height: 1;
  text-align: center;
}

#chat-box .close-btn:hover {
  background: #ffeff0;
}

#chat-box form {
  display: flex;
  border-top: 1px solid #eee;
}

#chat-box input[type="text"] {
  flex: 1;
  border: none;
  padding: 1em;
  font-size: 1em;
  outline: none;
}

#chat-box button[type="submit"] {
  border: none;
  background: #b51f2f;
  color: #fff;
  padding: 1em 1.5em;
  font-size: 1em;
  cursor: pointer;
}

#chat-box #chat-messages {
  height: 280px;
  overflow-y: auto;
  padding: 1em;
  font-size: 1em;
}

@media (max-width: 600px) {
  #chat-box {
    width: 98vw;
    max-width: 98vw;
    right: 1vw;
    bottom: 76px;
    border-radius: 12px;
    font-size: 0.95em;
  }
  #chat-bubble {
    width: 54px;
    height: 54px;
    font-size: 1.5rem;
    right: 12px;
    bottom: 12px;
  }
  #chat-box #chat-messages {
    height: 180px;
    padding: .8em;
  }
}
/* Burbujas estilo mensajería */
.chat-bubble {
  max-width: 75%;
  padding: 0.7em 1.1em;
  border-radius: 18px;
  margin-bottom: 0.6em;
  display: inline-block;
  font-size: 1em;
  line-height: 1.45;
  word-break: break-word;
  box-shadow: 0 1px 8px #0001;
}

.bubble-user {
  background: #f1f2f7;
  color: #333;
  align-self: flex-end;
  margin-left: 25%;
  text-align: right;
}

.bubble-ai {
  background: #ebecf0;
  color: #20232a;
  align-self: flex-start;
  margin-right: 25%;
  text-align: left;
}

/* Contenedor de mensajes flex */
#chat-messages {
  display: flex;
  flex-direction: column;
}

/* Loader de 3 puntitos (ola) */
.typing-indicator {
  display: inline-block;
  min-width: 36px;
  margin: 0 0 0.5em 0;
  height: 22px;
  vertical-align: middle;
}
.typing-indicator span {
  display: inline-block;
  width: 7px; height: 7px;
  background: #bbb;
  border-radius: 50%;
  margin: 0 1.5px;
  opacity: 0.7;
  animation: bounce 1.2s infinite both;
}
.typing-indicator span:nth-child(2){ animation-delay: .17s;}
.typing-indicator span:nth-child(3){ animation-delay: .34s;}

@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0);}
  40% { transform: translateY(-8px);}
}




.custom-select {
  position: relative;
  width: 200px;
  font-family: Montserrat, sans-serif;
  margin: auto;
}

.select-selected {
  background-color: white;
  border: 2px solid var(--vino);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  position: relative;
}

.select-selected::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 1rem;
  width: 0;
  height: 0;
  border: 6px solid transparent;
  border-color: var(--gris-oscuro) transparent transparent transparent;
  transform: translateY(-50%);
}

.select-items {
  position: absolute;
  top: 110%;
  left: 0;
  right: 0;
  background-color: white;
  border: 2px solid var(--vino);
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(215, 38, 56, 0.3);
  z-index: 10000000;
}

.select-items div {
  padding: 0.5rem 1rem;
  cursor: pointer;
}

.select-items div:hover,
.same-as-selected {
  background-color: rgba(215, 38, 56, 0.1);
}

.select-hide {
  display: none;
}



/* ===== SUPER CARROUSEL COLCHONES.HTML (SELECT + BOTÓN EN LÍNEA) ===== */

.super-carousel {
  --gap: 1.2rem;
  --card-w: clamp(260px, 36vw, 420px);
  --card-h: clamp(360px, 58vh, 560px);
  --edge-fade: 120px;
  position: relative;
  padding: 1.5rem 0 2rem;
  background:
    linear-gradient(90deg, var(--blanco), transparent var(--edge-fade),
                    transparent calc(100% - var(--edge-fade)), var(--blanco));
}

.super-carousel__viewport {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  overflow: visible; /* no recorta dropdown */
}

.super-carousel__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: var(--card-w);
  gap: var(--gap);
  padding: 1rem var(--edge-fade);
  overflow-x: auto;
  overflow-y: visible;  /* importante */
  scroll-snap-type: x mandatory;
  scroll-padding: calc((100% - var(--card-w)) / 2 + var(--edge-fade));
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.super-carousel__track::-webkit-scrollbar { display: none; }

.super-card {
  scroll-snap-align: center;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 12px 32px rgba(0,0,0,.08);
  height: var(--card-h);
  display: grid;
  grid-template-rows: 58% 42%;
  transform: perspective(900px) rotateY(0) translateZ(0);
  transition: transform .3s ease, box-shadow .3s ease;
  position: relative;
  overflow: visible;  /* deja sobresalir el dropdown */
  will-change: transform;
}
.super-card.is-center {
  transform: perspective(900px) translateZ(24px) scale(1.04);
  box-shadow: 0 20px 40px rgba(0,0,0,.12);
}

.super-card__media {
  position: relative;
  overflow: hidden;
  border-radius: 20px 20px 0 0;
  clip-path: inset(0 round 20px 20px 0 0);
  contain: paint;
  isolation: isolate;
}
.super-card__media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transform: scale(1.02);
  transition: transform .28s ease;
}
.super-card:hover .super-card__media img { transform: scale(1.06); }

.super-card__shine { position: absolute; inset: 0;
  background: radial-gradient(600px 200px at 20% -20%, rgba(255,255,255,.35), transparent);
  pointer-events: none;
}
.super-card__badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--vino); color: #fff; font-weight: 700; font-size: .85rem;
  padding: .35rem .6rem; border-radius: 999px; box-shadow: 0 4px 10px rgba(0,0,0,.15);
}

.super-card__body {
  padding: 1rem 1rem 1.2rem;
  display:flex; flex-direction:column; gap:.8rem;
  position: relative; z-index: 2;
}

.super-card__title { margin: 0; color: var(--gris-oscuro); font-size: clamp(1.05rem, 2.5vw, 1.35rem); }
.super-card__price { color: var(--vino); font-weight: 800; font-size: 1.2rem; }

.super-card__tags { display:flex; gap:.4rem; flex-wrap:wrap; }
.super-card__tags span {
  background: var(--plata); color: var(--gris-oscuro);
  border-radius: 999px; padding: .22rem .6rem; font-size: .8rem;
}

/* =================== CONTROLES EN LÍNEA =================== */
.super-card__controls{
  margin-top: auto;
  display:flex;
  align-items: stretch;
  justify-content: center;
  gap:.6rem;
  flex-wrap: nowrap;           /* no se rompe en desktop */
  width: 100%;
}

/* Select ancho (cabe “Matrimonial”) y flexible */
.super-carousel .custom-select{
  position: relative;
  flex: 1 1 260px;            /* base 260px, puede crecer */
  min-width: 240px;           /* nunca menos de 240 */
  max-width: 70%;             /* no invadir el botón */
  margin: 0;                  /* sin margen extra */
}

.super-carousel .select-selected{
  background: #fff;
  border: 2px solid var(--vino);
  border-radius: 8px;
  padding: .6rem 2.2rem .6rem .9rem; /* aire para flecha */
  cursor: pointer;
  position: relative;
}
.super-carousel .select-selected::after{
  content:"";
  position: absolute;
  top:50%; right:.75rem;
  width:0; height:0;
  border:6px solid transparent;
  border-color: var(--gris-oscuro) transparent transparent transparent;
  transform: translateY(-50%);
}

/* Dropdown drop-up ya soportado por tu JS */
.super-carousel .select-items{
  position:absolute; top:110%; left:0; right:0;
  background:#fff; border:2px solid var(--vino); border-radius:8px;
  box-shadow:0 4px 8px rgba(215,38,56,.3);
  z-index:10000000; max-height:none; overflow:visible;
}
.super-carousel .select-items.drop-up{ top:auto; bottom:110%; box-shadow:0 -4px 12px rgba(0,0,0,.12); }
.super-carousel .select-items div{ padding:0 1rem; min-height:44px; display:flex; align-items:center; cursor:pointer; }
.super-carousel .select-items div:hover,
.super-carousel .same-as-selected{ background-color: rgba(215,38,56,.1); }
.super-carousel .select-hide{ display:none; }

/* Botón a la derecha, sin salirse de la card */
.super-card .btn-add{
  flex: 0 0 auto;             /* tamaño natural */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .6rem 1rem;
  border-radius: 8px;
  background: var(--vino);
  color:#fff;
  font-weight: 700;
  text-align:center;
  white-space: nowrap;        /* no partir texto */
  width: auto;                /* ✅ ya no 100% */
  max-width: 30%;             /* reserva ancho para el select */
  overflow: hidden;
  text-overflow: ellipsis;
}
.super-card .btn-add:hover{ background: var(--vino-oscuro); }

/* =================== RESPONSIVE =================== */
@media (max-width: 768px){
  .super-carousel { --card-w: 88vw; --gap: .9rem; --edge-fade: 0px; }
  .super-carousel__viewport { padding: 0 8px; }
  .super-card { height: clamp(420px, 62vh, 560px); }

  /* En móvil mejor en columna para que no “salte” */
  .super-card__controls{ flex-direction: column; align-items: stretch; }
  .super-carousel .custom-select{ max-width: 100%; min-width: 0; flex: 1 1 auto; }
  .super-card .btn-add{ width: 100%; max-width: 100%; }
}


/* ===== Flechas laterales del super carrusel ===== */
.super-carousel__arrow{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: #fff;
  color: var(--vino);
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
  cursor: pointer;
  z-index: 5;                 /* sobre la pista */
  font-size: 1.6rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease, transform .15s ease, box-shadow .2s ease, opacity .2s ease;
}

.super-carousel__arrow--prev{ left: 12px; }
.super-carousel__arrow--next{ right: 12px; }

.super-carousel__arrow:hover{
  background: var(--plata);
  transform: translateY(-50%) scale(1.04);
}

.super-carousel__arrow:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(22,50,95,.25), 0 8px 24px rgba(0,0,0,.18);
}

.super-carousel__arrow[disabled]{
  opacity: .35;
  pointer-events: none;
}

/* Opcional: ocultar/compactar en pantallas muy pequeñas */
@media (max-width: 480px){
  .super-carousel__arrow{
    width: 38px;
    height: 38px;
    font-size: 1.4rem;
  }
  .super-carousel__arrow--prev{ left: 6px; }
  .super-carousel__arrow--next{ right: 6px; }
}


/* ===== Select + botón en línea siempre ===== */
.super-card__controls{
  margin-top: auto;
  display:flex;
  align-items: stretch;
  justify-content: center;
  gap:.6rem;
  flex-wrap: nowrap;
  width: 100%;
}

/* Select ancho (cabe “Matrimonial”) y flexible */
.super-carousel .custom-select{
  position: relative;
  flex: 1 1 260px;
  min-width: 240px;
  max-width: 70%;
  margin: 0;
}
.super-carousel .select-selected{
  background: #fff;
  border: 2px solid var(--vino);
  border-radius: 8px;
  padding: .6rem 2.2rem .6rem .9rem;
  cursor: pointer;
  position: relative;
}
.super-carousel .select-selected::after{
  content:"";
  position: absolute;
  top:50%; right:.75rem;
  width:0; height:0;
  border:6px solid transparent;
  border-color: var(--gris-oscuro) transparent transparent transparent;
  transform: translateY(-50%);
}

/* Botón a la derecha, sin salirse */
.super-card .btn-add{
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .6rem 1rem;
  border-radius: 8px;
  background: var(--vino);
  color:#fff;
  font-weight: 700;
  text-align:center;
  white-space: nowrap;
  width: auto;
  max-width: 30%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.super-card .btn-add:hover{ background: var(--vino-oscuro); }

/* ===== Responsivo: en móvil también en línea ===== */
@media (max-width: 768px){
  .super-card__controls{
    flex-direction: row;       /* <-- línea, no columna */
    align-items: stretch;
  }
  .super-carousel .custom-select{
    min-width: 0;
    max-width: none;
    flex: 1 1 auto;            /* select ocupa lo que necesite */
  }
  .super-card .btn-add{
    flex: 0 0 38%;             /* botón fijo ~38% */
    max-width: none;
  }
}

/* ===== Flechas: ocultar en móvil ===== */
@media (max-width: 768px){
  .super-carousel__arrow{ display: none !important; }
}




/* Modal base */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex; justify-content: center; align-items: center;
  z-index: 9999;
}
.modal-overlay.hidden { display: none; }

.modal-content {
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  max-width: 600px;
  width: 90%;
  position: relative;
  text-align: left;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  animation: fadeIn .3s ease;
}

.modal-content h2 {
  font-size: 1.6rem;
  margin-bottom: .5rem;
  color: var(--vino);
}

.modal-content p {
  margin-bottom: .8rem;
  line-height: 1.4;
}

.modal-content .price {
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--vino);
  margin: 1rem 0;
}

.modal-content .tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: 1rem;
}

.modal-content .tags span {
  background-color: var(--plata);
  padding: .3rem .7rem;
  border-radius: 12px;
  font-size: .8rem;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(.95); }
  to { opacity: 1; transform: scale(1); }
}



.modal-img { max-width: 100%; border-radius: 8px; margin-bottom: 1rem; }
.close-btn {
  position: absolute; top: 10px; right: 10px;
  border: none; background: transparent;
  font-size: 2rem; cursor: pointer;
}

/* Sidebar carrito */
.cart-sidebar {
  position: fixed; right: 0; top: 0; bottom: 0;
  width: 320px; background: #fff;
  box-shadow: -4px 0 12px rgba(0,0,0,0.2);
  padding: 1.5rem; overflow-y: auto;
  z-index: 10000; transition: transform .3s ease;
}
.cart-sidebar.hidden { transform: translateX(100%); }

/* Formulario */
#checkout-form input {
  width: 100%; padding: .7rem; margin: .4rem 0;
  border: 1px solid #ddd; border-radius: 8px;
}




.cart-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .8rem 0;
  border-bottom: 1px solid #eee;
}

.cart-item-info {
  flex: 1;
}

.cart-item-info strong {
  display: block;
  margin-bottom: .2rem;
}

.cart-item-info .price {
  font-size: 0.9rem;
  color: var(--vino);
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.cart {
  cursor: pointer;
}

.qty-btn {
  background: var(--vino);
  color: white;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.qty-btn:hover {
  background: var(--vino-oscuro);
}

.cart-sidebar h3 {
  margin-bottom: 1rem;
  color: var(--vino);
}

.cart-sidebar p {
  margin: .5rem 0;
}






    /* 🔹 Botón flotante de WhatsApp */
    .whatsapp-float {
      position: fixed;
      width: 60px;
      height: 60px;
      bottom: 20px;
      right: 20px;
      background-color: #25d366;
      color: white;
      border-radius: 50%;
      text-align: center;
      font-size: 28px;
      box-shadow: 2px 2px 6px rgba(0,0,0,0.3);
      z-index: 1000;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: transform 0.2s ease-in-out;
    }

    .whatsapp-float:hover {
      transform: scale(1.1);
      background-color: #20ba5a;
    }

    .whatsapp-float img {
      width: 34px;
      height: 34px;
    }

    /* 🔹 Ajustes para móviles */
    @media (max-width: 768px) {
      .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 24px;
        bottom: 15px;
        right: 15px;
      }
      .whatsapp-float img {
        width: 28px;
        height: 28px;
      }
    }



/* MESSAGES */
/* ===== TOASTS (notificaciones flotantes) - MOBILE FIRST ===== */
.toast-stack{
  position: fixed;
  /* respeta notch/status bar en iOS/Android */
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  left: 8px;
  right: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 100000;            /* por encima del carrito/modal */
  pointer-events: none;       /* clicks pasan salvo dentro del toast */
  max-height: 60vh;           /* si hay muchas, que no rompa */
  overflow-y: auto;
}

/* tarjeta */
.toast{
  --bg: #ffffff;
  --bd: #e9eef5;
  --fg: #16325F;              /* vino */
  --accent: #16325F;

  width: 100%;                /* ocupa el ancho útil en móvil */
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--bd);
  border-radius: 12px;
  padding: 12px 12px 10px 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.15);
  pointer-events: auto;
  animation: toast-in .25s ease forwards;
  overflow: hidden;
  backdrop-filter: saturate(140%) blur(2px); /* sutil glassy */
}

/* tipografía y tacto */
.toast .toast-icon{ font-size: 1.05rem; line-height: 1; }
.toast .toast-body{ font-size: .95rem; line-height: 1.35; word-break: break-word; }
.toast .toast-close{
  -webkit-tap-highlight-color: transparent;
  border: 0; background: transparent; color: inherit;
  font-size: 1.4rem; line-height: 1;
  opacity: .7; cursor: pointer;
  padding: 6px;               /* área tactil mayor */
  width: 36px; height: 36px;  /* 44px recomendado ≈ 36px aquí va bien */
  border-radius: 10px;
}
.toast .toast-close:hover{ opacity: 1; background: #f3f5f9; }

.toast .toast-progress{
  grid-column: 1 / -1;
  height: 3px; width: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent));
  transform-origin: left center;
  animation: toast-progress linear forwards;
}

/* variantes */
.toast.success{ --accent:#22c55e; --bd:#c9f2d8; --bg:#f0fff6; }
.toast.error  { --accent:#ef4444; --bd:#ffd3d3; --bg:#fff6f6; }
.toast.warning{ --accent:#f59e0b; --bd:#ffe6b8; --bg:#fffaf0; }
.toast.info,.toast.debug{ --accent:#3b82f6; --bd:#cfe2ff; --bg:#f5f9ff; }

/* animaciones */
@keyframes toast-in{ from{opacity:0;transform:translateY(-8px)} to{opacity:1;transform:translateY(0)} }
@keyframes toast-out{ to{opacity:0;transform:translateY(-8px)} }
@keyframes toast-progress{ from{transform:scaleX(1)} to{transform:scaleX(0)} }

/* ===== Mejoras para pantallas medianas/grandes ===== */
@media (min-width: 641px){
  .toast-stack{
    left: auto;                             /* vuelve a esquina derecha */
    right: 18px;
    top: calc(env(safe-area-inset-top,0px) + 18px);
    max-height: 80vh;
  }
  .toast{
    width: min(92vw, 420px);                /* tarjeta más compacta */
  }
}

/* Respeta safe-areas laterales en iPhone landscape */
@supports (padding: max(0px)){
  .toast-stack{
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
  }
}

/* Accesibilidad: reduce motion */
@media (prefers-reduced-motion: reduce){
  .toast, .toast .toast-progress{ animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}



/* === FIX Súper carrusel en móvil (<=768px) === */
@media (max-width: 768px){
  /* ancho de card cómodo + gap compacto */
  .super-carousel{
    --card-w: 92vw;
    --gap: .75rem;
    --edge-fade: 0;          /* sin “fade” lateral en mobile */
  }

  /* evita desbordes laterales por transform/zoom */
  .super-carousel__viewport{
    overflow: hidden;
    padding: 0;
  }

  /* padding menor en la pista */
  .super-carousel__track{
    padding: .5rem 4vw;      /* en vez de var(--edge-fade) */
  }

  /* cards más fluidas y sin “salirse” por scale */
  .super-card{
    height: auto;            /* deja crecer por contenido */
    grid-template-rows: auto 1fr;
  }
  /* quita el scale/3D del centro en móvil */
  .super-card.is-center{
    transform: none;
    box-shadow: 0 12px 24px rgba(0,0,0,.10);
  }

  /* imagen con alto relativo para no reventar la pantalla */
  .super-card__media{
    height: 48vw;            /* aprox media pantalla */
    max-height: 300px;
  }
  .super-card__body{
    padding: .75rem .75rem 1rem;
  }

  /* tags y espaciados más apretados */
  .super-card__tags{ gap: .35rem; }

  /* controles en COLUMNA para que no brinquen ni se corten */
  .super-card__controls{
    flex-direction: column;
    align-items: stretch;
    gap: .5rem;
  }
  .super-carousel .custom-select{
    min-width: 0;
    max-width: none;
    flex: 1 1 auto;
  }
  .super-card .btn-add{
    width: 100%;
    max-width: 100%;
    flex: 0 0 auto;
  }
}

/* En pantallas táctiles, reduce el zoom al pasar (no hay hover real) */
@media (hover: none){
  .super-card:hover .super-card__media img{ transform: scale(1.02); }
}





/* ===== ¿Por qué elegirnos? ===== */
.why-hero{
  position:relative;
  border-radius: 20px;
  overflow:hidden;
  margin: clamp(12px, 3vw, 20px);
  min-height: 40vh;
  display:grid;
  place-items:center;
  color:#fff;
  text-align:center;
  padding: clamp(18px, 4vw, 36px);
  background:
    linear-gradient(0deg, rgba(12,27,51,.55), rgba(12,27,51,.55)),
    url('/static/img/colchon_hero.jpg') center/cover no-repeat;
}
.why-hero__inner h1{ font-size: clamp(1.6rem, 4.2vw, 2.6rem); margin-bottom:.35rem; }
.why-hero__inner p{ font-size: clamp(.95rem, 2.2vw, 1.15rem); opacity:.95; }

.why-wrapper{ max-width: 1200px; margin: 0 auto; padding: 24px 16px 60px; }

/* Stats */
.why-stats{
  display:grid; gap: 14px; grid-template-columns: repeat(2,1fr);
  background: #f7f9fc; border:1px solid #e9eef5; border-radius: 16px;
  padding: clamp(12px, 2.5vw, 22px); margin: 22px 0 32px;
}
.why-stat{
  text-align:center; background:#fff; border:1px solid #e9eef5;
  border-radius:14px; padding: 16px 10px;
}
.why-stat strong{ display:block; color: var(--vino); font-size: clamp(1.1rem, 3.5vw, 1.6rem); }
.why-stat span{ color:#555; font-size:.95rem; }
@media (min-width: 768px){ .why-stats{ grid-template-columns: repeat(4,1fr);} }

/* Valores */
.why-values{
  display:grid; gap: 14px; grid-template-columns: 1fr; margin-top: 6px;
}
.why-value{
  display:grid; grid-template-columns: auto 1fr; gap: 12px; align-items:flex-start;
  border:1px solid #e9eef5; border-radius: 16px; padding: 16px; background:#fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.04);
}
.why-value__ico{
  font-size: 1.5rem; width: 44px; height: 44px; border-radius: 12px;
  display:grid; place-items:center; background: #f2f6ff; color: var(--vino);
}
.why-value h3{ margin:0 0 4px; color: var(--gris-oscuro); font-size: 1.05rem; }
.why-value p{ margin:0; color:#555; font-size:.95rem; }
@media (min-width: 900px){ .why-values{ grid-template-columns: repeat(3,1fr);} }

/* Diferenciadores */
.why-diff{ display:grid; gap: 14px; grid-template-columns: 1fr; margin-top: 28px; }
.why-diff .card{
  background:#fff; border:1px solid #e9eef5; border-radius:16px; padding:16px 16px 10px;
}
.why-diff h3{ margin:0 0 8px; color: var(--gris-oscuro); }
.why-list{ list-style:none; padding: 0; margin: 6px 0 8px; display:grid; gap: 8px; }
.why-list li{ display:flex; gap: 10px; align-items:flex-start; color:#555; }
.why-list li i{ color:#16a34a; font-style:normal; margin-top: 2px; }

.why-steps{ margin: 6px 0 14px; color:#555; padding-left: 1rem; }
.why-badges{ display:flex; flex-wrap:wrap; gap: 10px; }
.badge{
  border:1px dashed #e9eef5; padding: 8px 12px; border-radius: 999px;
  background:#f8fbff; color:#0f274b; font-weight:600; font-size:.95rem;
}
@media (min-width: 900px){ .why-diff{ grid-template-columns: 1.2fr .8fr; } }

.why-title-center{ text-align:center; color: var(--gris-oscuro); margin: 28px 0 12px; }

/* CTA */
.why-cta{
  margin-top: 36px; text-align:center;
  background: linear-gradient(180deg, #f7fbff, #fff);
  border:1px solid #e9eef5; border-radius: 16px; padding: 22px 16px;
}
.why-cta h3{ margin:0 0 8px; color: var(--gris-oscuro); }
.why-cta p{ margin:0 0 14px; color:#555; }
.btn-why{
  display:inline-block; background: var(--vino); color:#fff;
  padding: .65rem 1.1rem; border-radius: 10px; font-weight:700;
}
.btn-why:hover{ background: var(--vino-oscuro); }




/* ===== Sucursales (match con tu paleta) ===== */
.stores-hero{
  position:relative; border-radius: 20px; overflow:hidden;
  margin: clamp(12px,3vw,20px); min-height: 38vh; display:grid; place-items:center;
  color:#fff; text-align:center; padding: clamp(18px, 4vw, 36px);
  background:
    linear-gradient(0deg, rgba(12,27,51,.55), rgba(12,27,51,.55)),
    url('/static/img/tienda_showroom.jpg') center/cover no-repeat;
}
.stores-hero__inner h1{ font-size: clamp(1.6rem,4.2vw,2.6rem); margin-bottom:.35rem;}
.stores-hero__inner p{ font-size: clamp(.95rem,2.2vw,1.15rem); opacity:.95; }

.stores-wrap{ max-width: 1200px; margin: 0 auto; padding: 12px 16px 60px; }
.stores-grid{ display:grid; gap:16px; grid-template-columns:1fr; align-items:start; }
@media (min-width: 960px){ .stores-grid{ grid-template-columns: 0.9fr 1.1fr; } }

.stores-list{ background:#fff; border:1px solid #e9eef5; border-radius:16px; padding:14px; }
.stores-search input{
  width:100%; border:1px solid #e1e8f0; border-radius:10px; padding:.7rem .9rem;
  font-size:1rem; outline:none;
}
.stores-search input:focus{ border-color: var(--vino); box-shadow: 0 0 0 3px rgba(22,50,95,.12); }

.stores-items{ list-style:none; margin:12px 0 0; padding:0; display:grid; gap:10px; }
.store-card{
  border:1px solid #e9eef5; border-radius:14px; padding:12px; background:#fdfefe;
  transition:border-color .2s, box-shadow .2s;
}
.store-card.is-active{ border-color: var(--vino); box-shadow: 0 8px 22px rgba(0,0,0,.06); }
.store-card__head{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.store-card__head h3{ margin:0; font-size:1.05rem; color:var(--gris-oscuro); }
.store-chip{ background:#f1f6ff; color:var(--vino); border:1px dashed #d7e4ff; border-radius:999px; padding:.2rem .55rem; font-weight:700; font-size:.85rem; }
.store-addr,.store-hours,.store-phone{ margin:.35rem 0; color:#555; font-size:.95rem; }

.store-actions{ display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }
.btn-store{
  background: var(--vino); color:#fff; border:none; border-radius:10px; padding:.5rem .8rem;
  font-weight:700; text-decoration:none; display:inline-block; cursor:pointer;
}
.btn-store:hover{ background: var(--vino-oscuro); }
.btn-outline{ background:#fff; color:var(--vino); border:1px solid var(--vino); }
.btn-ghost{ background:#fff; color:#0f274b; border:1px dashed #cfd9ea; }
.btn-outline:hover, .btn-ghost:hover{ background:#f4f7fc; }

.stores-map{ background:#fff; border:1px solid #e9eef5; border-radius:16px; padding:10px; }
.stores-map iframe{ width:100%; height:min(70vh,560px); border:0; border-radius:12px; }
.map-hint{ margin:.35rem 6px 0; color:#667; font-size:.92rem; }

.store-reviews{ margin-top:8px; }
.store-reviews summary{ cursor:pointer; color:var(--vino); font-weight:700; }
.reviews-fallback{ display:grid; gap:8px; margin-top:8px; }
@media (max-width: 768px){ .stores-map iframe{ height:48vh; } }





/* ===== Header compacto (moderado) en móviles ===== */
@media (max-width: 768px){
  .header{
    padding: .6rem 1rem;          /* ↗ un poco más alto */
    row-gap: .6rem;
  }

  .logo img{
    height: 56px;                 /* antes 44px */
  }

  .menu-toggle{
    font-size: 1.4rem;            /* se lee bien sin ocupar tanto */
    padding: .4rem;
  }
  .cart{
    font-size: 1.25rem;
    padding: .4rem;
  }

  .menu-links{
    max-height: 0;
    opacity: 0;
    padding: 0;
  }
  .menu-links.show{
    padding: .7rem 0;             /* un pelín más de aire */
  }
  .menu-links a{
    display: block;
    padding: .7rem 0;             /* target táctil cómodo */
  }
}

/* Ajuste fino para pantallas muy pequeñas */
@media (max-width: 380px){
  .logo img{ height: 50px; }      /* deja de ser tan chaparro */
  .menu-toggle, .cart{ font-size: 1.3rem; }
}


/* ===== Precio con promo (tachado rojo + opacidad) ===== */
/* Centrar la fila de precio (viejo + nuevo + badge) */
.price{
  display:flex;               /* en vez de inline-flex */
  justify-content:center;     /* centra horizontalmente */
  align-items:baseline;
  gap:.35rem;
  flex-wrap:wrap;
  width:100%;
  text-align:center;          /* por si hay texto suelto */
}

.price .old{
  position: relative;
  opacity:.55;
  font-weight:600;
  color:#444;
}
.price .old::after{
  content:"";
  position:absolute;
  left:-2px; right:-2px;
  top:50%;
  height:2px;
  background:#b51f2f;
  transform: translateY(-50%) rotate(-4deg);
  pointer-events:none;
}
.price .new{
  font-weight:800;
  color:var(--vino);
  font-size:1.12em;           /* ligero destaque */
  line-height:1;
}
.price .badge-off{            /* alinea el badge con la línea base */
  align-self:center;
  font-size:.78rem;
  font-weight:800;
  background:#16a34a;
  color:#fff;
  padding:.15rem .45rem;
  border-radius:999px;
  line-height:1;
}



/* ===== Modal robusto: no se sale y siempre scrolleable ===== */

/* Evita que el contenido del overlay se corte: agrega padding + scroll */
.modal-overlay {
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right))
           max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  overflow: auto;                 /* 👈 el overlay puede hacer scroll si hace falta */
  -webkit-overflow-scrolling: touch;
}

/* Limita la altura del modal y habilita scroll interno si su contenido excede */
.modal-content {
  max-height: min(88dvh, 840px);  /* 👈 nunca más alto que la ventana */
  overflow: auto;                 /* 👈 scrollea dentro del modal */
  -webkit-overflow-scrolling: touch;
  padding: clamp(1rem, 2.5vw, 2rem);
}

/* Imagen del modal: acótala para que no empuje el resto hacia afuera */
.modal-img {
  height: auto;
  max-height: 36dvh;              /* 👈 alto limitado relativo a la pantalla */
  width: 100%;
  object-fit: cover;
  border-radius: 8px;
}

/* Tipografía y bloques del modal: espaciado compacto en móvil */
@media (max-width: 768px) {
  .modal-content h2 { font-size: 1.25rem; }
  .modal-content .price { font-size: 1.2rem; }
  .modal-content p { margin-bottom: .6rem; }
}

/* Cuando el modal/checkout estén abiertos, bloquea el scroll del body */
.no-scroll {
  overflow: hidden !important;    /* 👈 evita que el contenido del fondo se mueva */
  touch-action: none;
}



/* --- Badge "Promo" para cards del carrusel --- */
.card-media-wrap{
  position: relative;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  overflow: hidden;
}
.card-media-wrap img{
  display:block;
  width:100%;
  height: 280px;                /* mismo alto que ya usas en .mattress-card img */
  object-fit: cover;
}

.promo-badge{
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--vino);
  color: #fff;
  font-weight: 800;
  font-size: .85rem;
  padding: .35rem .6rem;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
  letter-spacing: .2px;
}


/* FORMULARIOS */
/* ==== Compat layer: hace que Muebles se vea como el creador de Colchones ==== */

/* Contenedor y título (equivalentes a .admin-wrap / .admin-title) */
.why-wrapper{
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 16px 48px;
}
.why-title-center{
  text-align:center;
  color: var(--gris-oscuro);
  margin: 8px 0 16px;
}

/* 1er bloque (proveedor + etiqueta) con grilla de 2 col como .admin-grid */
.why-wrapper > .why-diff:first-of-type{
  display:grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 980px){
  .why-wrapper > .why-diff:first-of-type{
    grid-template-columns: 1fr 1fr;  /* dos columnas como en colchones */
  }
}

/* Tarjeta visual (equivalente a .form-card) */
.why-diff .card{
  background:#fff;
  border:1px solid #e9eef5;
  border-radius:16px;
  box-shadow: 0 8px 24px rgba(0,0,0,.05);
  padding: 14px 14px 18px;
}
.why-diff .card h3{
  margin:0 0 4px;
  color: var(--vino);
}

/* Fieldset bonito (equivalente a .fs) */
.why-diff fieldset{
  border:1px solid #e9eef5;
  border-radius:12px;
  padding: 12px;
  margin: 10px 0;
  background: linear-gradient(180deg, #fbfdff, #fff);
}
.why-diff fieldset legend{
  padding: 0 .5rem;
  font-weight: 700;
  color: var(--gris-oscuro);
}

/* Grilla de inputs (equivalente a .form-grid) */
.why-diff .card .grid{
  display:grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 768px){
  .why-diff .card .grid{ grid-template-columns: 1fr; }
}

/* Inputs/Selects/Textareas con el mismo tacto */
.why-diff .card input[type="text"],
.why-diff .card input[type="number"],
.why-diff .card input[type="file"],
.why-diff .card select,
.why-diff .card textarea{
  width:100%;
  font: inherit;
  border:1px solid #dde4ee;
  border-radius:10px;
  padding:.6rem .75rem;
  outline: none;
  background:#fff;
  transition: box-shadow .15s, border-color .15s, transform .02s;
}
.why-diff .card select[multiple]{ min-height: 180px; }
.why-diff .card input:focus,
.why-diff .card select:focus,
.why-diff .card textarea:focus{
  border-color: var(--vino);
  box-shadow: 0 0 0 3px rgba(22,50,95,.12);
}

/* Checkboxes alineados (equivalente a .chk) */
.why-diff .card label{ color:#374151; }
.why-diff .card label > input[type="checkbox"]{
  margin-right: 8px;
  transform: translateY(1px);
}

/* Botón principal: que .btn-why luzca como .btn-primary */
.btn-why{
  background: var(--vino);
  color:#fff;
  border: none;
  padding: .65rem 1.1rem;
  border-radius: 10px;
  font-weight: 800;
  cursor:pointer;
  transition: background .15s, transform .02s;
}
.btn-why:hover{ background: var(--vino-oscuro); }
.btn-why:active{ transform: scale(.99); }

/* Tabla de variantes (mismo look que .table-wrap + .tbl) */
.variants-table{
  width:100%;
  overflow:auto;
  border:1px solid #e9eef5;
  border-radius:12px;
}
.variants-table table{
  width:100%;
  border-collapse: collapse;
  background:#fff;
}
.variants-table thead th{
  text-align:left; font-weight:700; color:#111827;
  background:#f7f9fc; border-bottom:1px solid #e9eef5;
  padding:.6rem .75rem;
  position: sticky; top: 0; z-index: 1;
}
.variants-table tbody td{
  border-bottom:1px solid #f2f4f8;
  padding:.55rem .75rem; vertical-align: middle;
}
.variants-table tbody tr:hover{ background:#fbfcff; }

/* Subtítulos de tamaño (como .td-title / .td-sub) */
.variants-table .td-title{ font-weight:700; color:#111827; }
.variants-table .td-sub{ color:#6b7280; font-size:.9rem; margin-top:2px; }

/* Ajuste del texto “(único)” */
.variants-table td span{
  font-size: .86rem;
  color: #667;
}

/* Acciones/espaciado como en el admin */
.why-diff .card form{ margin-top: 8px; }



/* Switch igual al del creador de colchones */
.switch{
  position:relative; display:inline-block; width: 44px; height: 26px;
}
.switch input{ display:none; }
.switch span{
  position:absolute; inset:0; background:#e5e7eb; border-radius:999px; transition:.2s;
}
.switch span::after{
  content:""; position:absolute; left:3px; top:3px;
  width:20px; height:20px; background:#fff; border-radius:50%;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
  transition: transform .2s;
}
.switch input:checked + span{ background:#16a34a; }
.switch input:checked + span::after{ transform: translateX(18px); }



/* Píldora mini para la cláusula */
.promo-clause{
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  margin-top: 0;              /* ya no empuja hacia abajo */
  padding: .12rem .45rem;     /* compacta */
  font-size: .72rem;          /* casi como el badge */
  line-height: 1;             
  color: #166534;             /* verde sobrio */
  background: #ecfdf5;        /* verde muy claro */
  border: 1px solid #86efac;  /* borde suave */
  border-radius: 999px;       /* pastilla */
  vertical-align: middle;     /* alinea con textos y badge */
}

/* Si aparece dentro de la fila de precio, que se alinee a la mitad */
.price .promo-clause{
  align-self: center;
}



/* BUEN FIN */
/* ===== Banner Buen Fin ===== */
.bf-banner{
  padding: clamp(12px, 2vw, 18px);
  background: #f7f7f7;
}
.bf-card{
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(14px, 2.5vw, 22px);
  border-radius: 20px;
  overflow: hidden;
  text-decoration: none;
  background:
    linear-gradient(135deg, rgba(22,50,95,.95), rgba(12,27,51,.94));
  box-shadow: 0 12px 28px rgba(0,0,0,.12);
  transition: transform .25s ease, box-shadow .25s ease;
}
.bf-card:hover{ transform: translateY(-2px); box-shadow: 0 18px 42px rgba(0,0,0,.16); }

.bf-media{ position: relative; min-height: 260px; }
.bf-media picture, .bf-media img{ display:block; width:100%; height:100%; object-fit: cover; }
.bf-badge{
  position: absolute; top: 12px; left: 12px;
  background: var(--blanco); color: var(--vino);
  font-weight: 800; font-size: .9rem; padding: .35rem .6rem; border-radius: 999px;
  box-shadow: 0 8px 20px rgba(0,0,0,.18);
}

.bf-body{
  display: flex; flex-direction: column; justify-content: center;
  gap: .6rem; padding: clamp(14px, 3vw, 26px);
  color: var(--blanco); text-align: left;
}
.bf-body h2{ font-size: clamp(1.2rem, 3vw, 2rem); line-height: 1.15; margin: 0; }
.bf-body p{ opacity: .95; }

.bf-cta-row{ display:flex; align-items:center; gap:.6rem; margin-top:.2rem; }
.chip{
  background: #f1f6ff; color: var(--vino);
  border: 1px dashed #d7e4ff; border-radius: 999px; padding: .28rem .6rem; font-weight: 700;
}
.btn-bf{
  background: var(--blanco); color: var(--vino);
  border: none; border-radius: 10px; padding: .6rem 1rem; font-weight: 800; cursor: pointer;
  transition: background .2s ease, transform .02s;
}
.btn-bf:hover{ background: #f3f5f9; }
.btn-bf:active{ transform: scale(.99); }

.bf-countdown{
  display:flex; gap:.6rem; margin-top: .2rem;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18);
  border-radius: 12px; padding: .4rem .6rem;
}
.bf-countdown span{
  display:inline-flex; align-items: baseline; gap:.25rem;
}
.bf-countdown strong{ font-size: 1.25rem; line-height: 1; }
.bf-countdown small{ opacity: .85; }

.bf-note{ opacity: .8; }

@media (max-width: 900px){
  .bf-card{ grid-template-columns: 1fr; }
  .bf-media{ min-height: 200px; }
}



.buenfin-badge{
  position:absolute; top:10px; left:10px;
  background:#b51f2f; color:#fff; font-weight:800; font-size:.85rem;
  padding:.35rem .6rem; border-radius:999px; box-shadow:0 6px 18px rgba(0,0,0,.18);
}


/* Píldora “Buen Fin” igual a la de concepto pero en rojo */
.bf-clause{
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .12rem .45rem;
  font-size: .72rem;
  line-height: 1;
  color: #b91c1c;        /* rojo texto */
  background: #fef2f2;   /* rojo muy claro */
  border: 1px solid #fecaca;
  border-radius: 999px;
  vertical-align: middle;
}
.price .bf-clause{ align-self: center; }
