body {
    background-color: #fdf6e3;
    background-image: url('../img/collage.png');
    background-repeat: no-repeat;
    background-position: center center; /* Centrado horizontal y vertical */
    background-attachment: fixed;
    background-size: cover; /* 👈 Esto asegura que cubra toda la pantalla sin deformarse */

    font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
    color: #382b18;
    margin: 0;
    transition: background 0.4s;
}
main { flex: 1 0 auto; }

/* HEADER Y NAV */
.main-header {
    position: sticky;
    top: 0;
    width: 100vw;
    z-index: 99;
    background: #ecdcb0;
    box-shadow: 0 2px 8px #bca16a11;
}
.header-container {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 4vw;
    gap: 16px;
    position: relative;
}
.logo-nombre {
    display: flex; align-items: center; gap: 12px;
    font-size: 1.65rem; font-weight: 700; color: #b68545; letter-spacing: 1.2px;
}
.main-nav ul {
    list-style: none; display: flex; gap: 34px; padding: 0; margin: 0;
}
.main-nav a {
    text-decoration: none; color: #382b18; font-weight: 600; font-size: 18px;
    transition: color 0.2s; position: relative;
}
.main-nav a.active, .main-nav a:hover { color: #b68545; }
.burger {
    background: none; border: none; padding: 6px; display: none; cursor: pointer;
    z-index: 150; margin-left: auto; outline: none; flex-shrink: 0;
    height: 44px; width: 44px; justify-content: center; align-items: center; position: relative;
}
.burger .burger-bar {
    display: block; width: 28px; height: 4px; background: #b68545; margin: 5px 0;
    border-radius: 3px; transition: 0.35s cubic-bezier(.51,2.4,.51,1);
}
.burger.open .burger-bar:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.burger.open .burger-bar:nth-child(2) { opacity: 0; }
.burger.open .burger-bar:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
.cart-icon-container { display: flex; align-items: center; margin-left: 16px; }
.cart-btn {
    background: #ecdcb0; border: 2px solid #b68545; border-radius: 22px; padding: 7px 20px 7px 15px;
    font-size: 1.2rem; font-weight: bold; color: #b68545; display: flex; align-items: center; gap: 7px;
    cursor: pointer; transition: background 0.18s, box-shadow 0.18s; position: relative; outline: none;
}
.cart-btn:hover { background: #f9e3bc; box-shadow: 0 3px 18px #e2c29055; }
#cart-count {
    background: #fff7e0; color: #a37527; border-radius: 14px; padding: 2px 10px; margin-left: 4px;
    font-size: 1.02em; font-weight: 900; border: 1.2px solid #d9c09a; box-shadow: 0 1px 3px #ecdcb0;
    min-width: 24px; text-align: center; display: inline-block;
}
@media (max-width: 900px) {
    .header-container { flex-wrap: wrap; gap: 10px; padding: 12px 2vw; }
    .main-nav {
        position: fixed; top: 64px; left: 0; width: 100vw; background: #ecdcb0; border-bottom: 1.5px solid #bca16a;
        box-shadow: 0 8px 24px #e2c29033; z-index: 99; display: none; transition: 0.3s; opacity: 0; pointer-events: none;
    }
    .main-nav.open { display: block; opacity: 1; pointer-events: all; animation: fadeInMenu 0.34s; }
    .main-nav ul { flex-direction: column; align-items: center; gap: 18px; }
    .burger { display: flex; position: absolute; right: 20px; top: 10px; }
    .search-form { width: 90vw; margin: 10px 0 0 0; }
    .cart-icon-container { order: 100; margin-left: 0; margin-top: 10px; }
}
@keyframes fadeInMenu {
    from { opacity: 0; transform: translateY(-18px);}
    to { opacity: 1; transform: translateY(0);}
}
/* Buscador */
.search-form {
    display: flex; align-items: center; gap: 4px; background: #fff7e0; border-radius: 18px; padding: 3px 12px;
    border: 1px solid #e2c290; transition: box-shadow 0.2s;
}
.search-form input[type="text"] {
    border: none; background: transparent; outline: none; font-size: 16px; padding: 7px 0; color: #382b18;
    width: 180px; font-family: inherit;
}
.search-form button {
    background: none; border: none; font-size: 1.1rem; cursor: pointer; color: #b68545; padding: 4px 2px;
}
/* CONTENIDO DETALLE PRODUCTO */
.detalle-container {
    max-width: 1050px; margin: 38px auto 0 auto; display: flex; gap: 54px; align-items: flex-start;
    padding: 36px 5vw 44px 5vw; background: rgba(255, 247, 224, 0.98); border-radius: 30px;
    box-shadow: 0 8px 40px #e2c29045; position: relative;
}
.detalle-img {
    flex: 1.2; display: flex; flex-direction: column; align-items: center; position: relative;
}
.detalle-img img {
    background: #ecdcb0; border-radius: 22px; box-shadow: 0 2px 24px #bca16a33; width: 320px; height: 320px;
    object-fit: contain; margin-bottom: 6px; transition: transform 0.3s cubic-bezier(.5,2,.7,.99), box-shadow 0.22s;
}
.detalle-img img:hover { transform: scale(1.07); box-shadow: 0 8px 36px #98713438; }
.detalle-info {
    flex: 2; display: flex; flex-direction: column; gap: 17px; justify-content: flex-start; padding-top: 10px;
}
.detalle-info h1 {
    font-size: 2.2rem; font-weight: 800; color: #987134; margin: 0 0 8px 0; letter-spacing: 1px;
    border-bottom: 3px solid #ecdcb0; padding-bottom: 2px;
}
.product-precio {
    font-size: 1.3rem; font-weight: bold; margin-bottom: 3px; display: flex; align-items: center; gap: 14px;
}
.product-precio .precio-tachado {
    color: #a6793a; text-decoration: line-through; font-weight: 400; font-size: 1.1rem; opacity: 0.7;
}
.product-precio .oferta {
    color: #b86e4e; font-weight: 700; font-size: 1.22rem;
}
.product-precio .normal { color: #b68545; }
.stock-info { margin: 3px 0 10px 0; font-size: 1rem; font-weight: 600; color: #73ad37; transition: color 0.2s; }
.stock-info.sin-stock { color: #c8583c; }
/* Descripción */
.detalle-desc {
    background: #fff7e0e3; border-radius: 11px; padding: 13px 17px; font-size: 1.08rem; color: #453620;
    margin: 4px 0 0 0; box-shadow: 0 2px 10px #e2c29016;
}
/* Botón WhatsApp */
.btn-contact {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #25D366;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 11px 14px 11px 39px;
    font-size: 1.08rem;
    font-weight: bold;
    margin: 16px auto 0 auto;
    box-shadow: 0 1px 3px #ecdcb0;
    position: relative;
    text-decoration: none;
    transition: background 0.22s, box-shadow 0.21s;
    cursor: pointer;
    width: 340px;
    max-width: 95vw;
    min-width: 180px;
}
.btn-contact:before {
    content: "";
    position: absolute;
    left: 13px;
    top: 10px;
    width: 23px;
    height: 23px;
    background: url("https://cdn.jsdelivr.net/gh/simple-icons/simple-icons/icons/whatsapp.svg") center/cover no-repeat;
    filter: drop-shadow(0 1px 2px #fff7e0c0) drop-shadow(0 2px 4px #6b4d2559);
}
.btn-contact:hover {
    background: #20b558;
    box-shadow: 0 2px 12px #bca16a4c;
    text-decoration: underline;
}
.btn-contact[aria-disabled="true"], .btn-contact.disabled {
    background: #bdbdbd !important;
    color: #fff !important;
    pointer-events: none;
    opacity: 0.74;
    cursor: not-allowed;
}

.btn-add-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #b68545;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 11px 0;
    font-size: 1.07rem;
    font-weight: bold;
    margin: 18px auto 0 auto;
    width: 340px;
    max-width: 95vw;
    min-width: 180px;
    box-shadow: 0 1px 3px #ecdcb0;
    cursor: pointer;
    transition: background 0.18s, box-shadow 0.19s;
    text-align: center;
    gap: 8px;
}
.btn-add-cart:hover {
    background: #986C2D;
}
.btn-add-cart:disabled {
    background: #ccc !important;
    color: #fff !important;
    opacity: 0.7;
    cursor: not-allowed;
}


/* Footer siempre abajo */
.footer {
    background: #ecdcb0;
    padding: 28px 0;
    text-align: center;
    border-top: 2px solid #bca16a;
    margin-top: 60px;
    width: 100vw;
    position: relative;
    left: 0;
    bottom: 0;
}

/* MODALES Y RESPONSIVE PARA DETALLE */
@media (max-width: 950px) {
    .detalle-container {
        flex-direction: column;
        gap: 34px;
        padding: 24px 4vw 28px 4vw;
        align-items: stretch;
    }
    .detalle-img img { width: 90vw; max-width: 340px; height: 210px; }
}
@media (max-width: 600px) {
    .detalle-info h1 { font-size: 1.4rem; }
    .detalle-container { padding: 12px 1vw 18px 1vw; }
    .detalle-img img { max-width: 98vw; }
    .btn-contact { font-size: 0.99rem; padding-left: 45px; }
    .detalle-desc { font-size: 0.98rem; }
}

/* CARRITO DE COMPRAS Y MODALES */
.modal-cart {
    display: none; position: fixed; top:0; left:0; width:100vw; height:100vh;
    background: rgba(0,0,0,0.26); z-index:1004; align-items: center; justify-content: center;
}
.modal-cart.active { display: flex; }
.cart-content {
    background: #fff7e0;
    padding: 34px 28px 26px 28px;
    border-radius: 18px;
    box-shadow: 0 4px 32px #bca16a77;
    width: 98vw; max-width: 400px;
    display: flex; flex-direction: column; align-items: center;
    animation: fadeInUp 0.3s;
    min-height: 220px;
}
#cartItemsList {
    width: 100%;
    margin: 14px 0 22px 0;
    min-height: 60px;
    font-size: 1rem;
    color: #79552c;
}
.cart-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 0; border-bottom: 1px dashed #e2c290;
}
.cart-item:last-child { border-bottom: none; }
.cart-qty { font-weight: bold; margin-right: 8px; color: #b68545; }
.cart-remove-btn {
    background: none; border: none; color: #b86e4e; font-size: 1.15rem; cursor: pointer; margin-left: 8px;
}
.cart-actions { display: flex; gap: 18px; width: 100%; justify-content: flex-end; }
#cartSendBtn {
    background: #b68545; color: #fff; border: none; border-radius: 8px;
    padding: 9px 18px; font-weight: bold; cursor: pointer; transition: background 0.19s;
}
#cartSendBtn:hover { background: #8f622a; }
#cartCloseBtn {
    background: #e6d2b5; color: #b68545; border: none; border-radius: 8px;
    padding: 9px 18px; font-weight: bold; cursor: pointer; transition: background 0.19s;
}
#cartCloseBtn:hover { background: #bca16a; color: #fff; }
/* Modal para agregar cantidad de productos */
.modal-cantidad {
    display: none; position: fixed; top:0; left:0; width:100vw; height:100vh;
    background: rgba(0,0,0,0.26); z-index:1003; align-items: center; justify-content: center;
}
.modal-cantidad.active { display: flex; }
.cantidad-content {
    background: #fff7e0;
    padding: 32px 28px 22px 28px;
    border-radius: 18px;
    box-shadow: 0 4px 32px #bca16a55;
    width: 98vw; max-width: 350px;
    display: flex; flex-direction: column; align-items: center;
    animation: fadeInUp 0.3s;
}
.cantidad-inputs {
    margin: 20px 0 15px 0;
    display: flex; align-items: center; gap: 10px;
}
.cantidad-inputs input[type="number"] {
    font-size: 1.22rem;
    border: 1.5px solid #bca16a;
    border-radius: 8px;
    width: 70px;
    padding: 6px 12px;
    background: #fffef7;
    color: #624314;
}
.modal-btns { display: flex; gap: 18px; }
#btnCantidadAgregar {
    background: #b68545;
    color: #fff;
    border: none;
    padding: 9px 26px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 1px 6px #ecdcb0;
    transition: background 0.19s;
}
#btnCantidadAgregar:hover { background: #8f622a; }
#btnCantidadCancelar {
    background: #e6d2b5;
    color: #b68545;
    border: none;
    padding: 9px 19px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 1px 3px #ecdcb0;
    transition: background 0.19s;
}
#btnCantidadCancelar:hover { background: #bca16a; color: #fff; }
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px);}
    to { opacity: 1; transform: translateY(0);}
}

@media (max-width: 600px) {
    .btn-contact,
    .btn-add-cart {
        width: 96vw;
        max-width: 340px;
        min-width: 110px;
        padding: 11px 0 11px 38px;
        font-size: 1rem;
    }
    .btn-contact:before {
        left: 11px;
        top: 9px;
        width: 22px;
        height: 22px;
    }
}

.imagenes-extra-galeria {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}
.imagen-extra-item img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 12px;
  background: rgba(255,255,255,0.5);
  box-shadow: 0 2px 8px #0002;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.imagen-extra-item img:hover {
  opacity: 1;
}

.variantes-list {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 12px;
}
.variantes-list-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
  width: 100%;
  max-width: 600px;
}
.variante-item {
  background: #f8f4e6;
  border: 1.5px solid #e2c48a;
  border-radius: 10px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 180px;
  max-width: 260px;
  margin: 0 auto;
  box-sizing: border-box;
}
.variante-img {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #bca16a;
  background: #fff;
}
.variante-info {
  font-size: 1rem;
  color: #7a5c2b;
  font-family: 'Montserrat', sans-serif;
}

@media (max-width: 700px) {
  .variantes-list-inner {
    flex-direction: column;
    align-items: center;
    gap: 14px;
    max-width: 98vw;
  }
  .variante-item {
    max-width: 98vw;
    width: 100%;
    justify-content: flex-start;
  }
}