/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html, body {
  height: 100%;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  background: #f5f1e9;
  color: #111;
  overflow-x: hidden;
  font-size: 16px;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 0;
}
/* Fondo global con la misma imagen, pero transparente */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('./media/P1010683.JPG') center/cover no-repeat;
  opacity: 0.35; /* transparencia en todo el resto */
  z-index: -1;   /* detrás de todo */
  pointer-events: none;
}
/* Fondo de animación three.js (si lo usas) */
#three-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  background: transparent;
  display: block;
}
/* Header */
header {
  position: fixed;
  top: 0;
  width: 100%;
  height: 60px;
  padding: 0.8rem 1rem;
  background: #000;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}
.header-container {
  max-width: 1200px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center; 
  position: relative; 
}
.header-container nav {
  flex: 0 1 auto; 
  justify-content: center;
  display: flex; 
  gap: 2rem;
}
/* Navegación flexible */
nav {
  display: flex;
  gap: 2rem;
  flex: 1 1 auto;
  min-width: 0;
  justify-content: center;
  overflow: hidden;
}
nav a {
  color: #f5f1e9;
  text-decoration: none;
  font-weight: 400;
  font-size: clamp(0.4rem, 2vw, 1rem);
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  min-width: 0;
  flex-shrink: 1;
  display: inline-block;
}
/* Botón carrito */
#cart-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  padding: 0.5rem 0.75rem;
  color: #f5f1e9;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 400;
  outline: none;
  flex-shrink: 0;
  white-space: nowrap;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}
/* Mobile */
@media screen and (max-width: 768px) {
  header {
    padding: 0.6rem 0.8rem;
  }
  .header-container {
    flex-direction: row;
    gap: 0.5rem;
  }
  nav {
    flex-grow: 1;
    justify-content: flex-start;
    min-width: 0;
    overflow: auto;
  }
  nav a {
    font-size: clamp(0.7rem, 2.5vw, 0.9rem);
  }
}
/* Main */
main {
  flex: 1;
  padding-top: 100px;
  padding-bottom: 80px;
  z-index: 5;
}
/* Sección INICIO con fondo fuerte */
#inicio {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  min-width: 100vw;
  background: url('./media/P1010683.JPG') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}
#inicio .hero h2 {
  font-size: 3rem;
  margin-bottom: 1rem;
}
#inicio .hero p {
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
}
/* Hero para otras secciones normales */
.hero {
  height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.hero h2 {
  font-size: 3rem;
  margin-bottom: 1rem;
}
.hero p {
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
}
/* Botones */
.btn-primary,
#cart button.checkout {
  background: #111;
  color: #f5f1e9;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
  width: 100%;
  margin-top: 0.5rem;
  transition: background 0.2s;
}
.btn-primary:hover,
#cart button.checkout:hover {
  background: #b58900;
}
/* Productos */
.products {
  display: flex;
  flex-wrap: wrap;   /* ✅ volvemos a varias columnas */
  gap: 1.5rem;
  justify-content: center;
  padding: 1rem;
}
.product {
  background: #fff;
  color: #111;
  border: 1px solid #ddd;
  border-radius: 8px;
  max-width: 280px;
  text-align: center;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.product img {
  width: 100%;
  height: 200px;       /* ✅ todas tendrán la misma altura */
  object-fit: contain; /* ✅ ajusta la imagen sin deformarla */
  border-radius: 6px;
  margin-bottom: 0.75rem;
  cursor: pointer;
}
.price {
  color: #b58900;
  font-weight: bold;
  margin: 0.5rem 0;
}
.product button {
  background: #111;
  color: #f5f1e9;
  border: none;
  padding: 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  width: 100%;
  transition: background 0.2s;
  margin-top: 0.5rem;
  outline: none;
}
.product button:hover {
  background: #b58900;
}
.product .color-circles-container,
.product .color-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
}
.product .color-circle {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #ccc;
  cursor: pointer;
  box-sizing: border-box;
  transition: border-color 0.3s;
}
/* Detalle de producto */
#detalle-container {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 1rem;
  background: #f5f1e9;
  box-sizing: border-box;
}
.product-image-box {
  width: 90%;
  max-width: 1400px;
  margin: 0 auto;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
}
.product-image-box img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 6px;
  max-height: 90vh;
}
.product-info-box {
  width: 100%;
  background: #222;
  color: #f5f1e9;
  padding: 1.5rem;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  font-family: 'Helvetica Neue', Arial, sans-serif;
}
.product-image-box .color-circles-container,
.product-image-box .color-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
}
.product-image-box .color-circle {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #ccc;
  cursor: pointer;
  box-sizing: border-box;
  transition: border-color 0.3s;
}
.color-circle.selected {
  border: 3px solid #b58900;
}
.hood-options {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 1rem;
}
.hood-btn {
  padding: 0.4rem 0.6rem;
  border: 1px solid #111;
  background: #eee;
  cursor: pointer;
  border-radius: 4px;
  color: #111;
  font-weight: 600;
  transition: background 0.3s, color 0.3s;
}
.hood-btn.selected {
  background: #b58900;
  color: #fff;
  border-color: #b58900;
}
/* Layout desktop */
@media (min-width: 992px) {
  .product-image-box {
    flex-direction: row;
    align-items: flex-start;
  }
  .product-image-box img {
    width: 60%;
    max-height: 85vh;
  }
  .product-info-box {
    width: 40%;
  }
}
/* Carrito lateral */
#cart {
  position: fixed;
  top: 60px;
  right: 20px;
  width: 320px;
  max-height: calc(100vh - 60px);
  background: #222;
  color: #f5f1e9;
  border: 1px solid #444;
  border-radius: 8px;
  overflow-y: auto;
  padding: 1rem;
  display: none;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}
#cart h3 {
  margin-bottom: 0.5rem;
  text-align: center;
  font-size: 1.1rem;
  color: #b58900;
  border-bottom: 1px solid #444;
  padding-bottom: 0.3rem;
}
#cart ul { list-style: none; margin: 0.5rem 0 1rem; padding: 0; }
#cart li {
  border-bottom: 1px solid #444;
  padding: 0.5rem 0;
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#cart li button {
  background: transparent;
  border: none;
  color: #b58900;
  font-weight: bold;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
#cart .total {
  font-weight: bold;
  text-align: right;
  font-size: 1rem;
  margin-top: 0.5rem;
  color: #b58900;
}
/* Overlay carrito */
#cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 90;
  display: none;
}
/* Pedido */
.pedido-container {
  margin-top: 60px;
  display: flex;
  justify-content: center;
  padding: 2rem 1rem 4rem;
  background-color: #f0e7d8;
  flex: 1;
  box-sizing: border-box;
}
#pedido {
  max-width: 500px;
  width: 100%;
  background: #222;
  color: #f5f1e9;
  padding: 1.5rem 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  font-family: 'Helvetica Neue', Arial, sans-serif;
  box-sizing: border-box;
}
#pedido h2 {
  font-weight: 400;
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: #b58900;
  text-align: center;
}
#pedido ul {
  list-style: none;
  padding: 0;
  margin-bottom: 1.5rem;
  max-height: none;
  border-top: 1px solid #444;
  border-bottom: 1px solid #444;
}
#pedido ul li {
  padding: 0.75rem 0;
  border-bottom: 1px solid #444;
  font-size: 1rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.3rem;
}
#pedido ul li:last-child { border-bottom: none; }
.total-order {
  font-weight: 700;
  font-size: 1.25rem;
  text-align: right;
  margin-bottom: 1.5rem;
  color: #b58900;
}
#pedido form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
#pedido label {
  font-weight: 600;
  display: block;
  margin-bottom: 0.3rem;
}
#pedido input[type="text"],
#pedido input[type="email"] {
  width: 100%;
  padding: 0.6rem 0.8rem;
  font-size: 1rem;
  border: 1px solid #444;
  border-radius: 6px;
  background: #333;
  color: #f5f1e9;
}
#pedido input::placeholder { color: #bbb; }
#pedido input:focus {
  outline: none;
  border-color: #b58900;
  box-shadow: 0 0 6px #b58900aa;
}
#pedido button {
  background-color: #b58900;
  border: none;
  color: #222;
  font-size: 1.1rem;
  padding: 0.75rem 0;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-weight: 600;
}
#pedido button:hover { background-color: #9f7400; }
.info-pedido {
  margin: 1rem 0;
  padding: 1rem;
  background: #fff;
  color: #333;
  border-radius: 6px;
  font-size: 0.9rem;
  line-height: 1.4;
}
/* Responsive ajustes */
@media (max-width: 600px) {
  .pedido-container { padding: 1.5rem 1rem 3rem; }
  #pedido { margin: 0 auto; }
  nav { justify-content: center; gap: 0.75rem; }
  #cart-toggle { margin-left: auto; }
  #inicio {
    width: 100vw;
    height: 100vh;
    background-size: cover;
    padding: 0.5rem;
  }
  #inicio .hero { padding: 1.2rem 0.7rem; }
}
/* Footer */
footer {
  margin-top: 0;
  padding: 0.5rem 0;
  text-align: center;
  background: #000;
  color: #f5f1e9;
  font-size: 0.9rem;
  flex-shrink: 0;
}
/* Detecta home */
body.home main { padding-top: 0; padding-bottom: 0; margin-bottom: 0; }
body.home #inicio {
  min-height: calc(100vh - 60px - 30px);
  height: calc(100vh - 60px - 30px);
  width: 100vw;
  background: url('./media/P1010683.JPG') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  margin-bottom: 0;
}
body.home footer { margin: 0; padding-top: 2; padding-bottom: 2rem; flex-shrink: 0; }
body.home #inicio .hero h2 {
  font-size: 2rem !important;
  margin-bottom: 0.3rem !important;
  color: #f5f1e9;
}
body.home #inicio .hero p {
  font-size: 1rem !important;
  margin-bottom: 0.8rem !important;
  color: #f5f1e9;
}
.botones-grid {
  display: flex;
  flex-direction: column; /* ✅ siempre en columna solo aquí */
  gap: 1.5rem;
  align-items: center;
  max-width: 600px;
  margin: 2rem auto;
}
.botones-grid .btn-primary {
  width: 160px;
  height: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.1rem;
  border-radius: 8px;
  text-align: center;
  margin: 0;
}
/* Sidebar */
.header-container { 
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  max-width: 1200px;
  width: 100%;
}
.sidebar {
  position: fixed;
  top: 60px;
  left: -500px;
  width: 250px;
  height: calc(100vh - 60px);
  background-color: #000;
  color: #f5f1e9;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 1rem;
  gap: 1rem;
  transition: left 0.3s ease;
  z-index: 200;
  overflow-y: auto;
}
/* Menú activo visible */
.sidebar.active {
  left: 0;
  justify-content: flex-start;
}
.sidebar.active { left: 0; }
#menu-close {
  align-self: flex-end;
  background: none;
  border: none;
  color: #f5f1e9;
  font-size: 2rem;
  cursor: pointer;
}
.sidebar a {
  color: #f5f1e9;
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
/* Oculta menú nav al usar sidebar */
header nav:not(#sidebar) { display: none; }
#menu-toggle {
  font-size: 1.8rem;
  background: none;
  border: none;
  color: #f5f1e9;
  cursor: pointer;
  z-index: 300;
}

/* Submenús sidebar */
.menu-item .submenu, 
.submenu-item .submenu {
  display: none;
  flex-direction: column;
  margin-left: 1rem;
  padding-left: 0.5rem;
  border-left: 2px solid #333;
}

.menu-item.active > .submenu,
.submenu-item.active > .submenu {
  display: flex;
}

.submenu-toggle {
  background: none;
  border: none;
  color: #f5f1e9;
  font-size: 1.1rem;
  cursor: pointer;
  text-align: left;
  font-weight: 600;
  margin-bottom: 0.3rem;
}
