/* =========================
   ESTILOS GENERALES
========================= */
body {
  margin: 0;
  padding: 0;
  background-color: #ffffff;;
  font-family: 'Montserrat', sans-serif;
  color: #1e1e1e;
}

a {
  text-decoration: none;
  color: inherit;
}

/* =========================
   BOTÓN VOLVER
========================= */
.volver {
  background-color: #ffffff;;
  padding: 15px 30px;
  font-size: 0.95rem;
  font-weight: bold;
}

.volver a {
  color: #8b5e3c;
}

/* =========================
   LAYOUT CATÁLOGO
========================= */
.catalogo-arabe {
  display: grid;
  grid-template-columns: 280px 1fr; /* 🧱 columna izquierda fija y derecha flexible */
  gap: 35px;
  align-items: start;
  padding: 40px;
  max-width: 1600px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* =========================
   FILTROS
========================= */
.filtros {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 20px;
  background-color: #cabcb9;
  border-radius: 10px;
  color: #fff;
}

.filtros h3 {
  margin-bottom: 10px;
  font-family: 'Cinzel', serif;
  font-size: 1.2rem;
  border-bottom: 1px solid #5a2c2c;
  padding-bottom: 5px;
}

.filtros label {
  display: block; /* 👈 Esto fuerza cada marca a ir en una línea distinta */
  margin: 5px 0;
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
}

.filtros input[type="checkbox"] {
  margin-right: 8px;
}


/* =========================
   PRODUCTOS
========================= */
.productos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); /* ✅ se adapta perfectamente */
  gap: 32px;
  width: 100%;
}

.tarjeta {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 14px;
  padding: 18px 14px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
}

.tarjeta:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.tarjeta img {
  width: 100%;
  height: 240px;
  object-fit: contain;
  margin-bottom: 12px;
  border-radius: 10px;
}

/* Info del producto */
.info {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.info h4 {
  font-family: "Cinzel", serif;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 5px;
}

.marca {
  font-size: 0.9rem;
  color: #777;
}

.precio {
  font-size: 1.1rem;
  font-weight: 700;
  color: #5b2414;
  margin: 8px 0 12px;
}

/* Botones */
.botones-producto {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.btn {
  background-color: #c5a17d;
  color: #fff;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn:hover {
  background-color: #b48c64;
  transform: scale(1.03);
}

.btn-vermas {
  background-color: #8a6f4d;
}

.btn-vermas:hover {
  background-color: #a0845d;
}

.etiqueta {
  background-color: #ad9671;
  color: white;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: bold;
  border-radius: 0 0 6px 0;
  position: absolute;
  top: 0;
  left: 0;
}


/* =========================
   RESPONSIVE
========================= */
@media (max-width: 1024px) {
  .productos {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .catalogo-arabe {
    grid-template-columns: 1fr;
  }

  .productos {
    grid-template-columns: repeat(2, 1fr);
  }

  .filtros {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .productos {
    grid-template-columns: 1fr;
  }
}

.btn-filtros {
  width: 100%;
  padding: 10px;
  background-color: #e0d3c1;
  color: #5a3928;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  margin-top: 15px;
  cursor: not-allowed;
  opacity: 0.6;
}
.encabezado-catalogo {
  background-image: url('img/fondo-arabes.jpg');
  background-size: cover;
  background-position: center;
  padding: 80px 20px;
  text-align: center;
  position: relative;
  box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

.encabezado-catalogo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(40, 20, 20, 0.6);
  z-index: 0;
}

.encabezado-catalogo h1 {
  position: relative;
  font-family: 'Cinzel', serif;
  font-size: 2.8rem;
  color: #fff8f3;
  text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
  letter-spacing: 2px;
  text-transform: uppercase;
  z-index: 1;
}
.producto {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.producto.visible {
  opacity: 1;
  transform: translateY(0);
}
#limpiar-filtros {
  width: 100%;
  padding: 10px;
  background-color: #caa886;
  color: #2e1c11;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  margin-top: 10px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#limpiar-filtros:hover {
  background-color: #b68d6c;
}

#contador-perfumes {

margin-top: 15px;
font-size: 0.95rem;
color: #201308;
font-weight: bold;
text-align: center;
}

.resultado-filtros {
  text-align: center;
  font-family: 'Cinzel', serif;
  font-size: 15px;
  color: #3a2a2a;
  margin-top: 12px;
  font-weight: 600;
}
/* 🛒 CARRITO DE COMPRAS */
/* 🛒 PANEL CARRITO */
.carrito {
  position: fixed;
  top: 0;
  right: -380px; /* oculto inicialmente */
  width: 360px;
  height: 100vh;
  background: #fff;
  box-shadow: -6px 0 14px rgba(0,0,0,0.25);
  transition: right 0.4s ease;
  z-index: 9998; /* debajo del botón flotante */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
  border-left: 3px solid #b88c4a;
}

.carrito.abierto {
  right: 0; /* se desliza */
}


#contador-carrito {
  background: #b88c4a;
  color: white;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 0.85rem;
  font-weight: 700;
}

/* 🧾 CONTENIDO DEL CARRITO */
.carrito-contenido {
  padding: 20px;
  overflow-y: auto;
}

.carrito-contenido h2 {
  font-family: 'Cinzel', serif;
  text-align: center;
  margin-bottom: 20px;
  color: #2c2c2c;
}

#carrito-lista {
  list-style: none;
  padding: 0;
}

#carrito-lista li {
  border-bottom: 1px solid #e0e0e0;
  padding: 10px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#carrito-total {
  font-weight: bold;
  text-align: right;
  margin-top: 15px;
  color: #333;
}

/* 🧠 BOTONES INTERNOS DEL CARRITO */
.btn-carrito {
  width: 100%;
  background: #c4a484;
  border: none;
  padding: 12px;
  margin-top: 10px;
  color: white;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-carrito:hover {
  background: #a68a6e;
}

.btn-finalizar {
  background: #3a2a2a;
}

.btn-finalizar:hover {
  background: #5a3a3a;
}

.btn-cerrar {
  position: absolute;
  top: 10px;
  right: 10px;
  border: none;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
}


/* ==== BOTONES EN TARJETAS ==== */
.botones-producto {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.btn {
  background-color: #c5a17d;
  color: #fff;
  text-decoration: none;
  padding: 8px 18px;
  border-radius: 6px;
  font-weight: 600;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn:hover {
  background-color: #b48c64;
  transform: scale(1.03);
}

.btn-vermas {
  background-color: #8a6f4d;
}

.btn-vermas:hover {
  background-color: #a0845d;
}

/* 🛒 BOTÓN FLOTANTE DEFINITIVO (PROBADO Y FUNCIONAL) */
.carrito-flotante {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #4a1f1f;
  border: none;
  border-radius: 50%;
  width: 55px;
  height: 55px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20000;
  box-shadow: 0 3px 10px rgba(0,0,0,0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.carrito-flotante:hover {
  transform: scale(1.07);
  box-shadow: 0 5px 14px rgba(0,0,0,0.4);
}

/* 🛍️ Icono dentro del botón */
.icono-carrito {
  width: 28px;
  height: 28px;
  filter: brightness(0) invert(1);
  pointer-events: none; /* evita que bloquee el clic */
}

/* 🔢 Contador arriba a la derecha */
#contador-carrito {
  position: absolute;
  top: -6px;
  right: -6px;
  background-color: #ffffff;
  color: #4a1f1f;
  font-weight: bold;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 0.8rem;
  min-width: 20px;
  text-align: center;
  pointer-events: none;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
/* 🔍 Barra buscador */
/* Ajusta el bloque blanco del catálogo */
main {
  margin-top: -40px; /* sube el catálogo un poco */
}

/* 🔍 Ajuste de posición y estilo del buscador */
.buscador-catalogo {
  position: relative;
  z-index: 20;
  margin: 0 auto;
  max-width: 500px;
  transform: translateY(-20px); /* ahora queda más centrado entre el bordó y el blanco */
  text-align: center;
}

/* 🔍 Input del buscador */
.buscador-catalogo input {
  background: #3c1f20;
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 30px;
  width: 100%;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  font-size: 1rem;
  outline: none;
  transition: all 0.3s ease;
}

.buscador-catalogo input:focus {
  box-shadow: 0 0 12px rgba(184,140,74,0.6);
}

/* 🔲 Bloque blanco principal (reduce altura visual arriba) */
main {
  margin-top: -30px; /* achica el bloque blanco para que no se meta tan arriba */
}

/* (opcional) si hay padding extra arriba del main o header, podés agregar también: */
body {
  padding-top: 0;
}


.resultados-busqueda {
  position: absolute;
  top: 110%;
  left: 0;
  width: 100%;
  background: #1c1212;
  border: 1px solid #b88c4a;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  z-index: 1000;
  display: none;
  max-height: 300px;
  overflow-y: auto;
}

.resultado-item {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.resultado-item:hover {
  background: rgba(184,140,74,0.15);
}

.resultado-item img {
  width: 45px;
  height: 45px;
  object-fit: cover;
  border-radius: 6px;
  margin-right: 12px;
}

.resultado-item span {
  color: #fff;
  font-size: 0.95rem;
}

/* ==========================================================
   🌙 OPTIMIZACIÓN MOBILE - ESTILO ESENZZIA (CATÁLOGO ÁRABE)
   Solo para pantallas menores a 768px
========================================================== */
@media (max-width: 768px) {

  /* --- RESETEO GENERAL --- */
  html, body {
    width: 100%;
    overflow-x: hidden !important;
    margin: 0;
    padding: 0;
    background-color: #ffffff;
  }

  /* --- ENCABEZADO DEL CATÁLOGO --- */
  .encabezado-catalogo {
    background-image: url('img/fondo-arabes.jpg');
    background-color: #ffffff;
    padding: 50px 15px 30px;
    text-align: center;
    box-shadow: none;
  }

  .encabezado-catalogo h1 {
    font-size: 2rem;
    color: #ffffff;
    text-transform: uppercase;
    text-shadow: none;
  }

  /* --- BUSCADOR --- */
  .buscador-container {
    width: 100%;
    padding: 10px 15px;
    text-align: center;
  }

  .buscador-container input {
    width: 100%;
    border: none;
    border-radius: 25px;
    background-color: #8b5e3c;
    color: #fff;
    font-size: 1rem;
    padding: 12px 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  }

  .buscador-container input::placeholder {
    color: #f5e9d7;
  }

  /* --- CONTENEDOR PRINCIPAL --- */
  .catalogo-layout {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0 10px;
  }

  /* --- FILTROS --- CAJA */
  .filtros {
    background-color: #dec2aa;
    color: #fff;
    border-radius: 15px;
    padding: 20px;
    margin: 20px 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  }

  .filtros h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    font-family: 'Cinzel', serif;
  }

  .filtros label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    margin: 6px 0;
  }

  .filtros input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #c59d5f;
  }

  /* --- GRILLA DE PRODUCTOS (2 columnas) --- */
  .productos-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 10px;
  }

  .tarjeta {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.2s ease;
    position: relative;
  }

  .tarjeta:hover {
    transform: scale(1.03);
  }

  .tarjeta img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
  }

  .tarjeta .info {
    padding: 10px;
    text-align: center;
  }

  .tarjeta h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 5px;
  }

  .tarjeta .marca {
    font-size: 0.8rem;
    color: #777;
  }

  .tarjeta .precio {
    font-size: 1rem;
    color: #3c1f1f;
    font-weight: bold;
    margin-top: 5px;
  }

  .btn-vermas {
    display: inline-block;
    margin-top: 8px;
    background-color: #3c1f1f;
    color: #fff;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background-color 0.3s ease;
  }

  .btn-vermas:hover {
    background-color: #5a2c2c;
  }

  /* --- ETIQUETAS (Top ventas, Oferta, etc.) --- */
  .etiqueta {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #b1875c;
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 5px;
  }

  /* --- BOTÓN "VOLVER AL INICIO" --- */
  .volver {
    text-align: left;
    padding: 15px;
    font-size: 0.9rem;
  }

  .volver a {
    color: #8b5e3c;
    text-decoration: none;
  }

  /* --- CARRITO FLOTANTE --- */
  .carrito-flotante {
    bottom: 15px;
    right: 15px;
    padding: 10px 15px;
    font-size: 1.5rem;
  }

  #contador-carrito {
    font-size: 0.8rem;
    min-width: 18px;
  }
}
/* ===== Filtros hamburguesa SOLO móvil ===== */
.btn-filtros-movil{
  display:none;
}

@media (max-width: 768px){
  .btn-filtros-movil{
    display:inline-flex;
    align-items:center;
    gap:10px;
    margin:16px auto 12px;
    background:#3c1f20;
    color:#fff;
    border:0;
    border-radius:10px;
    padding:12px 18px;
    font-weight:700;
    box-shadow:0 6px 20px rgba(0,0,0,.12);
  }

  /* Panel como "drawer" superior */
  #sidebar-filtros{
    position: fixed;
    top:0;
    left:0;
    right:0;
    background:#3c1f20;
    color:#fff;
    max-height: 75vh;
    overflow:auto;
    border-bottom-left-radius:18px;
    border-bottom-right-radius:18px;
    box-shadow:0 12px 40px rgba(0,0,0,.35);
    transform: translateY(-110%);
    transition: transform .28s ease;
    z-index: 9999;
    padding:18px 16px 22px;
  }

  #sidebar-filtros.abierto{ transform: translateY(0); }

  /* Si tu layout reservaba columna para filtros, forzamos productos a 100% en móvil */
  .contenedor-productos{ width: 100% !important; }
}

/* Evitar scroll horizontal accidental en catálogo */
html, body{ max-width:100%; overflow-x:hidden; }
