/* FUENTES Y RESET */
body {
  font-family: 'Montserrat', sans-serif;
  background-color: #fff;
  margin: 0;
  padding: 0;
  color: #222;
}

/* 🔝 BARRA SUPERIOR */
/* 🔝 BARRA SUPERIOR CON ANIMACIÓN */
.top-bar {
  background-color: #3c1f20;
  color: #fff;
  overflow: hidden;
  white-space: nowrap;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 500;
  position: relative;
}

.mensaje-scroll {
  display: inline-block;
  animation: moverTexto 15s linear infinite;
  padding-left: 100%;
}

@keyframes moverTexto {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* 🧭 HEADER */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 40px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo {
  font-family: 'Cinzel', serif;
  font-size: 1.8rem;
  color: #3c1f20;
  font-weight: 700;
}

.buscador {
  display: flex;
  width: 40%;
}

.buscador input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 6px 0 0 6px;
}

.buscador button {
  background: #8b5e3c;
  color: #fff;
  border: none;
  border-radius: 0 6px 6px 0;
  padding: 8px 12px;
  cursor: pointer;
}

.nav a {
  margin-left: 20px;
  text-decoration: none;
  color: #3c1f20;
  font-weight: 500;
}

/* 🧴 PRODUCTO */
.contenedor-producto {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 50px;
  max-width: 1200px;
  margin: 60px auto 40px;
  flex-wrap: wrap;
}

.producto-imagen img {
  width: 400px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.producto-info {
  max-width: 500px;
}

.producto-info h1 {
  font-family: 'Cinzel', serif;
  font-size: 2rem;
  color: #3c1f20;
}

.marca { color: #555; }

.precio {
  color: #8b5e3c;
  font-weight: 600;
  font-size: 1.3rem;
  margin: 10px 0 15px;
}

.descripcion {
  line-height: 1.6;
  margin-bottom: 25px;
}

.botones { display: flex; gap: 15px; }

.btn-agregar, .btn-volver {
  padding: 10px 20px;
  border-radius: 6px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  text-decoration: none;
  font-family: 'Montserrat', sans-serif;
}

.btn-agregar {
  background-color: #8b5e3c;
  color: #fff;
}

.btn-agregar:hover { background-color: #6e4324; }

.btn-volver {
  background-color: #f7f7f7;
  color: #222;
}

.btn-volver:hover { background-color: #e5e5e5; }

/* 🔸 DETALLE OLFACTIVO */
.detalle-olfativo {
  max-width: 900px;
  margin: 40px auto 100px;
  background: #fff;
  padding: 30px 40px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  line-height: 1.7;
  font-size: 1.05rem;
}

.detalle-olfativo hr {
  border: none;
  border-top: 1px solid #e6e6e6;
  margin: 25px 0;
}

.detalle-bloque h3 {
  font-family: 'Cinzel', serif;
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: #3c1f20;
}

.detalle-bloque p { margin: 6px 0; }

/* 🛒 CARRITO (página dedicada)
   — Eliminamos el lateral deslizante para NO reservar espacio en las fichas */
.carrito,
.carrito.abierto,
body.carrito-abierto::before,
.carrito-contenido,
.btn-cerrar {
  display: none !important;
}

/* ✨ EFECTO AL CARRITO (se mantiene por si lo usás en otros lugares) */
@keyframes popCarrito {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}
#abrir-carrito {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-weight: 600;
}
#abrir-carrito.animado { animation: popCarrito 0.4s ease; }

/* =========================
   BUSCADOR SUPERIOR
========================= */
.buscador-top {
  background-color: #f7f2ec;
  padding: 14px 0;
  text-align: center;
  border-bottom: 1px solid #ddd;
}

.buscador-top form {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.buscador-top input {
  padding: 8px 14px;
  width: 260px;
  border-radius: 6px;
  border: 1px solid #bbb;
  font-size: 0.95rem;
}

.buscador-top button {
  background-color: #b88c4a;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s ease;
}
.buscador-top button:hover { background-color: #9f7535; }

/* =========================
   HEADER CON BUSCADOR CENTRAL
========================= */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 28px;
  background-color: #fff;
  border-bottom: 1px solid #eee;
  gap: 20px;
}

.logo {
  font-family: 'Cinzel', serif;
  font-size: 1.6rem;
  color: #2c1a1a;
  font-weight: 600;
  flex: 1;
}

.buscador-header {
  flex: 2;
  display: flex;
  justify-content: center;
}

.buscador-header form {
  display: flex;
  align-items: center;
  background-color: #f7f2ec;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid #d3c2ae;
}

.buscador-header input {
  border: none;
  outline: none;
  background: transparent;
  width: 260px;
  font-size: 0.95rem;
  color: #3a2a2a;
}

.buscador-header button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: #b88c4a;
  transition: color 0.3s ease;
}
.buscador-header button:hover { color: #9f7535; }

.menu { display: flex; align-items: center; gap: 16px; }

.menu a {
  text-decoration: none;
  color: #3a2a2a;
  font-weight: 500;
}
.menu a:hover { color: #b88c4a; }

.btn-carrito-mini {
  background: #f5f2ec;
  border: 1px solid #d3c2ae;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  transition: background 0.3s ease;
}
.btn-carrito-mini:hover { background: #eaddc9; }

/* ==========================================================
   🌙 OPTIMIZACIÓN MOBILE - FICHAS INDIVIDUALES
   (solo en pantallas menores a 768px)
========================================================== */
@media (max-width: 768px) {

  /* --- GENERAL --- */
  html, body {
    width: 100%;
    overflow-x: hidden !important;
    margin: 0;
    padding: 0;
    background-color: #ffffff;
  }

  /* --- HEADER --- */
  header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 15px 10px;
  }
  header h1 { font-size: 1.6rem; margin-bottom: 8px; }

  nav ul { flex-wrap: wrap; justify-content: center; gap: 10px; }
  nav a { font-size: 0.95rem; }

  /* --- 🔥 ELIMINAR BARRA DE BÚSQUEDA --- */
  .buscador-container,
  .buscador { display: none !important; }

  /* --- CONTENEDOR PRINCIPAL --- */
  .producto-detalle {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 15px;
    width: 100%;
    max-width: 100vw;
    text-align: center;
  }

  /* --- IMAGEN DEL PRODUCTO --- */
  .producto-detalle img {
    width: 80%;
    max-width: 280px;
    height: auto;
    object-fit: contain;
    margin-bottom: 20px;
  }

  /* --- INFORMACIÓN DEL PRODUCTO --- */
  .producto-info h1 {
    font-size: 1.4rem;
    font-family: 'Cinzel', serif;
    margin-bottom: 10px;
    color: #2a1a1a;
  }
  .producto-info .marca { font-size: 0.9rem; color: #7a7a7a; margin-bottom: 8px; }
  .producto-info .precio { font-size: 1.3rem; color: #3c1f1f; font-weight: bold; margin-bottom: 15px; }
  .producto-info p { font-size: 0.95rem; color: #333; line-height: 1.6; margin-bottom: 20px; }

  /* --- BOTONES --- */
  .botones-producto {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    align-items: center;
  }
  .btn-agregar, .btn-volver {
    width: 85%;
    text-align: center;
    padding: 12px;
    font-size: 0.95rem;
    border-radius: 8px;
    font-weight: bold;
    transition: background-color 0.3s ease;
  }
  .btn-agregar { background-color: #3c1f1f; color: #fff; }
  .btn-agregar:hover { background-color: #5a2c2c; }
  .btn-volver { background-color: #fff; color: #3c1f1f; border: 1.5px solid #3c1f1f; }
  .btn-volver:hover { background-color: #f1e6df; }

  /* --- DETALLES ADICIONALES --- */
  .detalles {
    background-color: #fafafa;
    border-radius: 10px;
    padding: 15px;
    text-align: left;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-top: 25px;
    color: #333;
    box-shadow: 0 3px 8px rgba(0,0,0,0.05);
  }
  .detalles h3 { font-size: 1rem; margin-bottom: 10px; color: #3c1f1f; }
  .detalles ul { padding-left: 18px; }

  /* --- CARRITO FLOTANTE (si lo usás en otras páginas) --- */
  .carrito-flotante {
    bottom: 15px;
    right: 15px;
    font-size: 1.5rem;
    padding: 10px 15px;
  }
  #contador-carrito { font-size: 0.8rem; }
}

/* ===== FIX MOBILE PRODUCT PAGES ===== */
html, body { max-width: 100%; overflow-x: hidden; }

/* Imagen y contenedores nunca más anchos que la pantalla */
img, video, iframe { max-width: 100%; height: auto; }

/* Estructura full-width segura */
.top-bar,
.site-header,
.breadcrumb,
.producto-layout,
.producto-extra {
  width: 100%;
  box-sizing: border-box;
}

/* Ocultar el buscador del header SOLO en móvil (para evitar overflow) */
@media (max-width: 768px){
  .buscador-header{ display: none !important; }
  .site-header{ padding: 12px 16px; }
  .menu a{ margin-left: 10px; }

  /* La grilla del producto en 1 columna */
  .producto-layout{
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 0 16px 16px;
  }

  .producto-imagen img{
    width: 100%;
    height: auto;
    border-radius: 12px;
  }

  .producto-info h1{ font-size: 28px; }
  .producto-info .precio{ font-size: 22px; }

  .botones{ gap:10px; flex-wrap: wrap; }
  .btn-agregar, .btn-secundario{
    width: 100%;
    text-align: center;
  }

  .producto-extra{ padding: 0 16px 40px; }
  .producto-detalle { overflow-x: hidden; }
}

/* (Opcional) si tenías algún ancho fijo en el buscador del header */
.buscador-header input, .buscador-header form{ max-width: 100%; }
