/* PALETA DE COLORES */
:root {
    --color-bg-dark: #22201e;
    --color-text-light: #d1c3b2;
    --color-accent-gold: #b8860b;
    --color-secondary-beige: #4a4540;
    --color-border-dark: #3a3835;
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Roboto', sans-serif;
}

/* RESET Y ESTILOS GLOBALES */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    background-color: var(--color-bg-dark); 
    color: var(--color-text-light); 
}

a {
    text-decoration: none;
    color: var(--color-text-light);
}

/* --- HEADER Y FOOTER --- */
header {
    background-color: var(--color-bg-dark);
    border-bottom: 1px solid var(--color-border-dark);
    padding: 10px 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.logo {
    flex-grow: 1;
    text-align: center;
}

.logo a {
    font-family: var(--font-serif);
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--color-text-light);
    text-transform: uppercase;
}

.header-left-elements,
.header-right-icons {
    display: flex;
    align-items: center;
    min-width: 100px;
}

.header-right-icons {
    justify-content: flex-end;
}

.header-right-icons button {
    background: 0 0;
    border: none;
    font-size: 1.25rem;
    margin-left: 10px;
    cursor: pointer;
    color: var(--color-text-light);
    position: relative;
}

.menu-toggle {
    display: block;
    font-size: 1.5rem;
}

.desktop-nav {
    display: none;
}

.mobile-nav {
    display: none;
    background-color: var(--color-secondary-beige);
    position: absolute;
    width: 100%;
    left: 0;
    padding: 10px 0;
    box-shadow: 0 4px 8px rgba(0,0,0,.3);
}

.mobile-nav.open {
    display: block;
}

.mobile-nav ul {
    list-style: none;
}

.mobile-nav li a {
    display: block;
    padding: 10px 20px;
    color: var(--color-text-light);
    transition: background-color .3s;
}

.mobile-nav li a:hover {
    background-color: var(--color-border-dark);
}

#cart-count {
    position: absolute;
    top: -5px;
    right: -10px;
    background-color: var(--color-accent-gold);
    color: var(--color-bg-dark);
    font-size: .7rem;
    font-weight: 700;
    border-radius: 50%;
    padding: 2px 5px;
    line-height: 1;
}

footer {
    background-color: var(--color-bg-dark);
    color: var(--color-text-light);
    text-align: center;
    padding: 20px;
    border-top: 1px solid var(--color-border-dark);
    margin-top: 50px;
}

footer img {
    width: 250px;
    filter: invert(75%);
}

footer hr {
    border: 0;
    height: 1px;
    background: var(--color-border-dark);
    margin: 15px 0;
}

/* --- ESTILOS CTA --- */
.cta-button {
    display: inline-block;
    background-color: var(--color-accent-gold);
    color: var(--color-bg-dark);
    padding: 12px 35px;
    border-radius: 5px;
    text-transform: uppercase;
    font-weight: 700;
    transition: background-color .3s, transform .3s;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    background-color: #a37209;
    transform: scale(1.05);
}

/* --- 1. SECCIÓN HÉROE OFERTAS --- */
.hero-ofertas {
    padding: 60px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('../img/ofertas/oferta.jpg');
    background-size: cover;
    background-position: center;
    color: white;
}

.hero-content h1 {
    font-family: var(--font-serif);
    font-size: 3rem;
    margin-bottom: 10px;
}

.hero-content p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 30px auto;
}

#countdown-timer {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.time-block {
    background: rgba(0,0,0,0.3);
    padding: 15px;
    border-radius: 5px;
    min-width: 80px;
}

.time-block span {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    line-height: 1;
}

.time-block small {
    font-size: 0.8rem;
    text-transform: uppercase;
}

/* --- 2. OFERTA DESTACADA --- */
.featured-offer {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    max-width: 1100px;
    margin: 60px auto;
    padding: 0 20px;
    align-items: center;
}

.offer-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.offer-text h2 {
    color: var(--color-accent-gold);
    text-transform: uppercase;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.offer-text h3 {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.offer-price {
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.offer-price .original-price {
    font-size: 1.5rem;
    text-decoration: line-through;
    color: #888;
}

.offer-price .sale-price {
    font-size: 2.2rem;
    font-weight: bold;
    color: var(--color-accent-gold);
}

/* --- 3. CUADRÍCULA DE OFERTAS --- */
.sales-grid-section {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
    text-align: center;
}

.section-title {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    margin-bottom: 40px;
}

.sales-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.product-card {
    background-color: var(--color-secondary-beige);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    text-align: center;
    cursor: pointer;
    position: relative;
    height: 380px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    color: white;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

.product-card::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 70%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    z-index: 1;
    border-radius: 0 0 8px 8px;
    pointer-events: none;
}

.product-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease-in-out;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
}

.product-card:hover img {
    transform: scale(1.05);
}

.discount-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--color-accent-gold);
    color: var(--color-bg-dark);
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 0.9rem;
    z-index: 3;
}

.product-details-container {
    position: relative;
    z-index: 2;
    padding: 20px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.product-name {
    font-weight: bold;
    font-size: 1.1rem;
    margin: 0;
    height: 3.2em;
    overflow: hidden;
}

.price-container {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 0.9rem;
}

.sale-price {
    color: var(--color-accent-gold);
    font-size: 1.2rem;
    font-weight: bold;
}

.quick-view-btn {
    background-color: rgba(34, 32, 30, 0.8);
    color: var(--color-text-light);
    border: 1px solid var(--color-border-dark);
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 5px;
}

.quick-view-btn:hover {
    background-color: var(--color-bg-dark);
}

/* --- 4. BANNER ÚLTIMAS UNIDADES --- */
.last-chance-banner {
    margin-top: 60px;
    padding: 60px 20px;
    background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('../img/ofertas/limited_stock.jpg');
    text-align: center;
}

.banner-content h2 {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    margin-bottom: 10px;
}

/* --- MODAL DEL CARRITO --- */
.cart-modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,.6);
}

.cart-modal.visible {
    display: block;
}

.cart-content {
    background-color: var(--color-secondary-beige);
    margin: 15% auto;
    padding: 20px;
    border: 1px solid var(--color-border-dark);
    width: 90%;
    max-width: 450px;
    border-radius: 10px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,.5);
    color: var(--color-text-light);
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    color: var(--color-text-light);
    font-size: 28px;
    font-weight: 700;
    background: 0 0;
    border: none;
    cursor: pointer;
}

.shipping-options {
    border-top: 1px solid var(--color-border-dark);
    padding-top: 15px;
    margin-top: 15px;
    text-align: left;
}

.checkout-button {
    width: 100%;
    text-align: center;
    margin-top: 20px;
    color: var(--color-bg-dark);
}

/* --- RESPONSIVE DESIGN --- */
@media(min-width:768px) {
    .header-container {
        justify-content: flex-start;
    }

    .menu-toggle {
        display: none;
    }

    .desktop-nav {
        display: block;
    }

    .desktop-nav ul {
        list-style: none;
        display: flex;
        padding-left: 0;
    }

    .desktop-nav li a {
        padding: 0 15px;
    }

    .logo {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%,-50%);
        flex-grow: 0;
    }

    .header-right-icons {
        margin-left: auto;
    }

    .header-left-elements,
    .header-right-icons {
        min-width: 300px;
    }

    .hero-content h1 {
        font-size: 4rem;
    }

    .featured-offer {
        grid-template-columns: 1fr 1fr;
        gap: 60px;
    }
}