
:root {
  --color-principal: #000000;
  --color-secundario: #ffffff;
  --color-negro: #000000;
  --color-texto: #090909;
  --gris-claro: #f2f2f2;
  --borde-radius: 12px;
  --trans: all 0.3s ease;
  --sombra-suave: 0 4px 12px rgba(0, 0, 0, 0.1);
  --verde: #2eb719;
--verde-hover: #3ddc84;
--gris-hover: #8b99a5;
--fondo-buscador: #eae0e6;
--borde-input: #a3a0a0;
--sombra-botones: 0 6px 18px rgba(255, 255, 255, 0.2);
--color-principal-hover: #0056b3;

}

html {
  scroll-behavior: smooth;
}


/* ===================================
  ocultar descuento extra      borrar para mostrar descuento extra
=================================== */
.descuento-tiempo {
  display: none;
}
.descuento-activa {
  display: block;
}


/* ===================================
   🔄 RESET GENERAL
=================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 6px 0 0 0;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--color-secundario);
  color: #000000dd;
}

body.dark-mode {
  background-color: #121212;
  color: #f0f0f0;
}

/* ===================================
   📐 LAYOUT BASE
=================================== */
#inicio, #quienes-somos, #footer {
  scroll-margin-top: 120px;
  padding-top: 2rem;
}

/* ===================================
   🧭 ENCABEZADO Y NAVEGACIÓN
=================================== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background: black;
  color: white;
  z-index: 1000;
  border-radius: 0 0 20px 20px;
  box-shadow: var(--sombra-suave);
}

header h1 {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  margin: 0;
  line-height: 1;
  text-align: center;
  max-width: 90%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.barra-navegacion {
  position: sticky;
  top: 52px;
  z-index: 999;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.01rem;
  background-color: #f5f3f3;
  padding: 0.8rem 1rem;
  border-bottom: 2px solid #000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.barra-navegacion a {
  color: #000;
  background-color: #ffffff;
  border: 0.5px solid #000;
  padding: 0.1rem 0.2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.8rem;
  text-decoration: none;
  transition: var(--trans);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.barra-navegacion a:hover {
  background-color: #ffffff;
  color: #000;
  border-color: #000000;
}

/* ===================================
   🔍 BUSCADOR
=================================== */
#bloque-buscador {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 80px 0 0.5rem;
}

.contenedor-buscador {
  position: relative;
  width: 90%;
  max-width: 400px;
}

#buscadorProductos {
  width: 100%;
  padding: 0.7rem 1rem 0.7rem 2.5rem;
  font-size: 1rem;
  border-radius: 12px;
  border: 2px solid #000000;
  background-color: #fefefe;
  color: rgb(0, 0, 0);
  outline: none;
}

#buscadorProductos::placeholder {
  color: rgb(85, 84, 84);
}

.icono-lupa {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgb(84, 84, 84);
  font-size: 1rem;
  pointer-events: none;
}


/* ===================================
   🛍 PRODUCTOS
=================================== */
/* 📦 Contenedor de producto */
.producto {
  background-color: #fff;
  border-radius: 20px;
  box-shadow: var(--sombra-suave);
  max-width: 480px;
  padding: 0.8rem;
  margin: 2rem auto;
  text-align: center;
  transition: var(--trans);
}

.producto:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.contenedor-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 12px;
  background-color: #f8f8f8;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%; /* 🔧 importante en móviles */
}

.contenedor-img img.main-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}



@media (max-width: 600px) {
  .contenedor-img {
    width: 100vw;        /* ocupar todo el ancho de pantalla */
    max-width: 100%;
    aspect-ratio: 1 / 1; /* mantiene forma cuadrada */
    margin: 0 auto;
  }
}



/* 🧠 Tipografía y estilos del producto */
.producto h2 {
  font-size: clamp(1.2rem, 2vw, 1.4rem);
  margin: 0.5rem 0;
  color: #000;
  font-weight: bold;
}

.producto p {
  font-size: 1rem;
  color: #090909;
  margin: 0.5rem 0;
}

.producto strong {
  color: #970000;
  font-size: 1.15rem;
}




/* ===================================
   🏷 DESCRIPCIÓN DEL PRODUCTO
   =================================== */

/* Contenedor principal de la descripción */
.descripcion-expandible {
  margin: 0.5rem 0;
}

/* Texto de la descripción oculto por defecto */
.descripcion-texto {
  font-size: 0.9rem;
  line-height: 1.4;
  color: #060606;
  margin-top: 0.5rem;
  display: none;
}

/* Clase que se agrega para mostrar el texto con animación */
.descripcion-texto.mostrar {
  display: block;
  animation: fadeIn 0.3s ease-in-out;
}

/* Botón para mostrar/ocultar descripción */
.btn-ver-descripcion {
  background: none;
  border: none;
  color: #000000;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0;
}

.btn-ver-descripcion:hover {
  text-decoration: underline;
}

/* Animación para mostrar el texto suavemente */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ===================================
   🎨 CARRUSEL DE COLORES Y TALLAS
=================================== */
.carrusel-scroll {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 0.5rem;
  padding: 0.5rem 0;
  justify-content: center;
  -webkit-overflow-scrolling: touch;
}

.carrusel-scroll::-webkit-scrollbar {
  display: none;
}

.carrusel-scroll > * {
  flex: 0 0 calc(100% / 3.2);
  max-width: 100px;
  scroll-snap-align: center;
  transform: scale(0.9);
  transition: transform 0.3s ease, opacity 0.3s ease;
  text-align: center;
}

.carrusel-scroll > *.active {
  background: #fff;
  border: 2px solid #000;
  transform: scale(1.12);
  box-shadow: 0 0 10px #000;
}

.color-item,
.talla-item {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  margin: 0.4rem 0;
  border-radius: 14px;
  font-weight: bold;
  font-size: 1rem;
  color: #000;
  background: linear-gradient(135deg, #e0e0e0, #ffffff);
  border: 2px solid #7d7777;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: var(--trans);
  white-space: nowrap;
}

.color-item:hover,
.talla-item:hover {
  transform: scale(1.12);
  background: linear-gradient(135deg, #d8d8d8, #e6e6e6);
  box-shadow: 0 6px 16px rgba(125, 124, 124, 0.25);
  cursor: pointer;
}

.color-item.active,
.talla-item.active {
  background: #fff;
  border: 2px solid #81fe90;
  transform: scale(1.12);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.3);
}

.imagenes-carrusel {
  display: none;
  height: 0;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}


/* ===================================
   🔘 BOTONES
=================================== */
button,
.btn-verde,
.btn-gris,
.btn-agregar {
  padding: 0.9rem 1.2rem;
  font-size: 1rem;
  font-weight: bold;
  border-radius: 10px;
  border: 2px solid #000;
  transition: var(--trans);
  cursor: pointer;
}

button {
  background-color: var(--color-principal);
  color: #fff;
  width: 100%;
  max-width: 320px;
}

button:hover {
  background-color: var(--color-secundario);
  color: #000;
  transform: scale(1.02);
}

.btn-verde {
  background-color: #2eb719;
  color: #fff;
}

.btn-verde:hover {
  background-color: #3ddc84;
  color: #000;
}

.btn-gris {
  background-color: #6c757d;
  color: #fff;
}

.btn-gris:hover {
  background-color: #8b99a5;
  color: #000;
}

.btn-agregar {
  display: block;
  margin: 1.2rem auto 0;
  background: #000;
  color: #ffffff;  /*blanco*/
  border-radius: var(--borde-radius);

  max-width: 280px;
  box-shadow: 0 6px 18px rgba(255, 255, 255, 0.2);
}

.btn-agregar:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px #fff;
  color: #000000;
}

/* ===================================
   🛒 CARRITO
=================================== */

.icono-carrito-fijo {
  position: fixed;
  top: 56px;
  right: 5px;
  width: 47px;
  height: 47px;
  font-size: 1.6rem;
  background-color: #000000;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1001;
  box-shadow: var(--sombra-suave);
  border: none;
  cursor: pointer;
}

.icono-carrito-fijo.ver-carrito:hover {
  background-color: #313030;
  color: #fff;
}

.icono-carrito-fijo.ocultar-carrito:hover {
  background-color: #76f526;
  color: #131aeb;
}

/* 🧾 Panel del carrito */
#bloqueCarrito.container {
  position: fixed;
  top: 0;
  right: 0;
  width: 320px;
  height: 100vh;
  background-color: #fffcfc;
  padding: 1.5rem;
  z-index: 9999;
  box-shadow: -4px 0 12px rgba(0, 0, 0, 0.2);
  overflow-y: auto;
  transition: transform 0.3s ease;
  transform: translateX(100%); /* Oculto por defecto */
}

/* Mostrar carrito */
#bloqueCarrito.container.mostrar {
  transform: translateX(0);
}

/* Ocultar carrito completamente */
#bloqueCarrito.container.oculto {
  display: none;
}

.cerrar-carrito {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 1.5rem;
  cursor: pointer;
  color: #000;
  z-index: 10000;
}

.cerrar-carrito:hover {
  color: #000;
}

/* Total del carrito */
.total-carrito {
  text-align: right;
  font-size: 1.2rem;
  margin-top: 1rem;
  color: #333;
}

.total-carrito span {
  font-weight: bold;
  color: #28a745;
}

/* Estilos para los items dentro del carrito */
.item-carrito-elegante .info-superior {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.item-carrito-elegante h4 {
  margin: 0;
  font-size: 1.1rem;
}

.item-carrito-elegante p {
  font-size: 1rem;
  max-width: 100%;
  white-space: nowrap;
  overflow: visible;
  text-overflow: unset;
}

.item-carrito-elegante strong {
  display: inline-block;
  font-weight: bold;
  max-width: 100%;
}

/* Corrección para pantallas pequeñas */
@media (max-width: 480px) {
  .item-carrito-elegante p {
    white-space: normal;
    word-break: break-word;
    font-size: 1.1rem;
  }
}

.opciones-cantidad {
  margin: 4px 0;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.opciones-cantidad label {
  font-weight: 500;
  white-space: nowrap;
}

.select-cantidad {
  flex: 1;
  padding: 4px 6px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.85rem;
}


/* ================================
   📋 FORMULARIO DE COMPRA CLIENTE
================================ */
#formularioCliente {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#formularioCliente.formulario-visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

#formularioCliente form {
  background: #fff;
  padding: 2rem;
  border-radius: 12px;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.campo-formulario {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 1rem;
  width: 100%;
}

.campo-formulario label {
  font-weight: bold;
  margin-bottom: 0.4rem;
  color: var(--color-principal);
  font-size: 0.75rem;
}

.campo-formulario input,
.campo-formulario select {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid #ccc;
  border-radius: 10px;
  font-size: 1rem;
  background-color: #fff;
  transition: border-color 0.3s ease;
}

.campo-formulario input:focus,
.campo-formulario select:focus {
  border-color: var(--color-principal);
  outline: none;
}

#formularioCliente .botones {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
  align-items: center;
}

#formularioCliente .botones button {
  padding: 0.9rem 2rem;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#formularioCliente .botones .btn-enviar {
  background-color: var(--color-principal);
  color: white;
}

#formularioCliente .botones .btn-enviar:hover {
  background-color: var(--color-principal-hover, #0056b3);
}

#formularioCliente .botones .btn-cancelar {
  background-color: #ccc;
  color: #333;
}

#formularioCliente .botones .btn-cancelar:hover {
  background-color: #bbb;
}


/* ===================================
   🌙 DARK MODE
=================================== */
body.dark-mode .carrito,
body.dark-mode #formularioCliente form {
  background-color: #1e1e1e;
  color: #fff;
  border: 1px solid #333;
}

body.dark-mode .campo-formulario input,
body.dark-mode .campo-formulario select {
  background-color: #2a2a2a;
  border-color: #444;
  color: #f0f0f0;
}

body.dark-mode .campo-formulario input:focus,
body.dark-mode .campo-formulario select:focus {
  border-color: var(--color-secundario);
  box-shadow: 0 0 0 2px rgba(110, 246, 72, 0.2);
}

body.dark-mode button {
  background-color: #333;
  color: #fff;
}

/* ===================================
   🧰 UTILITARIOS
=================================== */
.oculto {
  display: none !important;
}

.img-mini {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
}

.notificacion {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #414341;
  color: #fff;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.4s ease;
  max-width: 90vw;
}

.notificacion.mostrar {
  opacity: 1;
}

/* ===================================
   📱 MEDIA QUERIES
=================================== */


@media (max-width: 480px) {
  header {
    height: auto;
    padding: 1rem 0;
  }

  header h1 {
    font-size: 1.5rem;
    max-width: 80%;
  }

  .barra-navegacion {
    flex-direction: row; /* ✅ Siempre horizontal */
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.6rem;
  }

  .barra-navegacion a {
    font-size: 0.95rem;
    white-space: nowrap;
  }

  .main-img {
  height: 100%;  /* ✅ Opcional: asegura que ocupe todo el contenedor */

  }

  .talla-item,
  .color-item {
    font-size: 0.85rem;
    padding: 0.5rem 0.8rem;
  }

  .btn-agregar {
    font-size: 1rem;
    padding: 0.85rem 1.2rem;
    max-width: 95%;
  }
}

#quienes-somos {
  max-width: 900px;
  margin: 1rem auto;
  padding: 1rem;
  background-color: var(--gris-claro);
  border-radius: var(--borde-radius);
  box-shadow: var(--sombra-suave);
  color: var(--color-texto);
  font-family: 'Segoe UI', sans-serif;
  line-height: 1.6;
  overflow-wrap: break-word; /* 👉 evita que palabras largas rompan el diseño */
  word-break: break-word;
  box-sizing: border-box;
}

#quienes-somos h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--color-negro);
  text-align: center;
}

#contenido-quienes-somos {
  font-size: 1.1rem;
  text-align: justify;
  white-space: pre-wrap; /* 👉 mantiene saltos de línea y se adapta */
  overflow-wrap: break-word;
  word-break: break-word;
}


@media (max-width: 600px) {
  #quienes-somos {
    padding: 1.2rem;
  }

  #quienes-somos h2 {
    font-size: 1.5rem;
  }

  #contenido-quienes-somos {
    font-size: 1rem;
  }
}

.bloque-carrito,
.bloque-formulario {
  background-color: #ffffff;
  padding: 1.5rem;
  border-radius: 18px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin-top: 1.5rem;
}
.bloque-formulario {
  background-color: #fdfdfd;
  border: 1px solid #ddd;
}


.bloque-carrusel {
  background-color: #fff;
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  max-width: 900px;
  margin: auto;
  overflow: hidden;
}

.carrusel-infinito {
  display: flex;
  gap: 10px;
  animation: scrollInfinite 20s linear infinite;
}

.miniatura {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.miniatura:hover {
  transform: scale(1.08);
}



.descripcion-general {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  padding: 0 1rem;
  color: var(--color-texto);
}


@keyframes scrollInfinite {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ===================================
   🏷 carrusel de descuento
=================================== */

.carrusel-letrero {
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  background: #f2fdf2;
  border-radius: 8px;
  padding: 0.3rem 0;
  margin: 0.5rem 0;
}

.letrero-movimiento {
  display: inline-block;
  white-space: nowrap;
  animation: deslizar 60s linear infinite; /* antes era 15s */
}

.letrero-movimiento span {
  font-size: 1rem;
  font-weight: bold;
  color: #000000;
  display: inline-block;
  white-space: nowrap;
}


@keyframes deslizar {
  0%   { transform: translateX(0%); }
  100% { transform: translateX(-100%); }
}



/* ===================================
   🏷 carrusel de descuento extra*/


#notificacion {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #62fc62;
  color: #000000;
  padding: 1rem 1.1rem;
  border-radius: 8px;
  font-size: 0.6rem;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.4s ease;
  max-width: 90vw;
  pointer-events: none;
}

#notificacion.mostrar {
  opacity: 1;
  pointer-events: auto;
}
