/* ================= VARIABLES ================= */
:root {
    --bg-color: #ffffff;
    --text-color: #000000;
    --accent-green: #009e4a;
    --gray-light: #f4f4f4;
}

/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

ul {
    list-style: none;
}

/* ================= HEADER (DISEÑO MODIFICADO) ================= */
header {
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #eee;
    display: block;
}

.scroll-progress-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    z-index: 1001;
}

.scroll-progress-bar {
    height: 100%;
    width: 0%;
    background: #009e4a;
    transition: width 0.1s;
}

/* FILA SUPERIOR */
.header-top {
    padding: 15px 40px;
    display: flex;
    align-items: center;
    position: relative;
    height: 60px;
}

/* 1. LOGO EN EL CENTRO EXACTO */
.logo-container {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.logo {
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: -2px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 5px;
    color: #000;
}

.clover {
    color: var(--accent-green);
    font-size: 2rem;
    line-height: 1;
}

/* 2. ICONOS A LA DERECHA DEL TODO */
.icons {
    display: flex;
    gap: 25px;
    align-items: center;
    margin-left: auto;
    margin-top: 5px;
}

.icon-btn svg {
    width: 24px;
    height: 24px;
    stroke: #000;
    stroke-width: 2;
    fill: none;
    cursor: pointer;
    transition: 0.3s;
}

.icon-btn:hover svg {
    stroke: var(--accent-green);
}

/* FILA INFERIOR: Navegación Centrada */
.header-nav {
    border-top: 1px solid #f9f9f9;
    padding: 15px 0;
    display: flex;
    justify-content: center;
    width: 100%;
}

.nav-list {
    display: flex;
    gap: 40px;
}

.nav-item {
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}

.nav-item a {
    color: #000;
}

.nav-item.rebajas a {
    color: #e74c3c;
}

.nav-item:hover>a {
    opacity: 0.6;
}

.nav-item:hover::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-green);
}

/* MEGA MENU */
.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 250px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 900;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    pointer-events: none;
}

.mega-menu.user-dropdown {
    width: 200px;
    left: auto;
    right: 0;
    transform: translateY(10px) translateX(0);
}

.nav-item {
    position: relative;
}

.nav-item.menu-open .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.menu-inner {
    width: 100%;
    margin: 0;
    padding: 0;
    display: block;
}

.menu-column h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 20px;
    color: var(--accent-green);
    letter-spacing: 1px;
    font-weight: 800;
}

.menu-column ul li {
    margin-bottom: 10px;
}

.menu-column ul li a {
    font-size: 0.9rem;
    color: #555;
    transition: 0.2s;
    display: block;
}

.menu-column ul li a:hover {
    color: #000;
    transform: translateX(5px);
}

/* ================= HERO SECTION ================= */
.hero {
    height: 85vh;
    width: 100%;
    position: relative;
    overflow: hidden;
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.dynamic-text {
    color: #ffffff;
    mix-blend-mode: difference;
    margin: 0;
    width: 100%;
    text-align: center;
}

.hero h2 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 6px;
    margin-bottom: 15px;
    font-weight: 700;
}

.hero h1 {
    font-size: 4.5rem;
    text-transform: uppercase;
    font-weight: 900;
    letter-spacing: -2px;
    line-height: 1;
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    padding: 15px 40px;
    background: #fff;
    color: #000;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 0.8rem;
    letter-spacing: 2px;
    border: none;
    transition: 0.3s;
    margin-top: 10px;
    cursor: pointer;
}

.btn:hover {
    background: var(--accent-green);
    color: #fff;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

/* ================= CONTADOR ================= */
#countdown-container {
    background-color: #ffffff;
    color: #000000;
    border-radius: 12px;
    padding: 20px 40px;
    margin-top: 30px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: fit-content;
    max-width: 90%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

#countdown-container span {
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: #000;
    font-variant-numeric: tabular-nums;
}

.timer-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timer-unit small {
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 5px;
    color: #000;
}

.separator {
    font-size: 2rem;
    font-weight: 900;
    color: #000;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    #countdown-container {
        padding: 15px 20px;
        gap: 10px;
    }

    #countdown-container span {
        font-size: 1.5rem;
    }

    .separator {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }

    .header-top {
        padding: 15px 20px;
    }

    .nav-list {
        gap: 20px;
        font-size: 0.7rem;
    }
}

/* ================= RESTO DE LA PÁGINA ================= */
.products-section {
    padding: 80px 50px;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2rem;
    text-transform: uppercase;
    font-weight: 800;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.product-card {
    cursor: pointer;
}

.product-card:hover .product-img {
    opacity: 0.8;
}

.product-img {
    height: 350px;
    background: #f0f0f0;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-weight: bold;
}

.product-name {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.product-price {
    font-size: 0.85rem;
    color: #666;
}

footer {
    background: #000;
    color: #fff;
    padding: 50px;
    text-align: center;
    margin-top: 50px;
}

/* ================================================================= */
/* ⚠️⚠️⚠️ ARREGLO DEL CURSOR AQUÍ ⚠️⚠️⚠️                           */
/* ================================================================= */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 24px;
    height: 24px;
    background-color: #fff;
    pointer-events: none;
    mix-blend-mode: difference;
    z-index: 9999;

    /* Quitamos transform de CSS para que JS lo maneje */

    /* Solo animamos ancho y alto para el hover */
    transition: width 0.3s, height 0.3s;

    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M448 160c0-61.9-50.1-112-112-112c-39.7 0-74.8 21.3-96 53.6C218.8 69.3 183.7 48 144 48C82.1 48 32 98.1 32 160c0 47.9 29.5 89.2 71.2 106.1c-4.6 7.8-7.2 16.9-7.2 26.6c0 23.6 16.4 43.4 38.4 49.9c-2.4 8.7-4.4 17.6-5.8 26.7L116 432 96 464h.3 319.4 .3l-20-32-12.6-62.7c-1.4-9.1-3.4-18-5.8-26.7c22-6.5 38.4-26.3 38.4-49.9c0-9.6-2.6-18.8-7.2-26.6C418.5 249.2 448 207.9 448 160z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M448 160c0-61.9-50.1-112-112-112c-39.7 0-74.8 21.3-96 53.6C218.8 69.3 183.7 48 144 48C82.1 48 32 98.1 32 160c0 47.9 29.5 89.2 71.2 106.1c-4.6 7.8-7.2 16.9-7.2 26.6c0 23.6 16.4 43.4 38.4 49.9c-2.4 8.7-4.4 17.6-5.8 26.7L116 432 96 464h.3 319.4 .3l-20-32-12.6-62.7c-1.4-9.1-3.4-18-5.8-26.7c22-6.5 38.4-26.3 38.4-49.9c0-9.6-2.6-18.8-7.2-26.6C418.5 249.2 448 207.9 448 160z'/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
}

.custom-cursor.hovered {
    width: 60px;
    height: 60px;
}

/* ================================================================= */

/* 3D TILT EFFECT */
.tilt-card {
    will-change: transform;
    transform-style: preserve-3d;
    transform: perspective(1000px);
}

/* NOISE OVERLAY */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9000;
    opacity: 0.07;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* MAGNETIC BUTTONS */
.magnetic {
    display: inline-block;
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* GLITCH / TWITCH HOVER FOR PRODUCTS */
.product-card {
    position: relative;
    overflow: hidden;
}

.product-card:hover .product-img {
    transform: scale(0.98);
    filter: contrast(120%);
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* CARRITO */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1900;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background: #fff;
    z-index: 2000;
    transition: 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h2 {
    font-size: 1.2rem;
    font-weight: 800;
    text-transform: uppercase;
}

.close-cart {
    cursor: pointer;
    font-size: 1.5rem;
    background: none;
    border: none;
}

.cart-items {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    border-bottom: 1px solid #f9f9f9;
    padding-bottom: 20px;
    position: relative;
}

.cart-img {
    width: 70px;
    height: 90px;
    background-color: #f4f4f4;
    background-size: cover;
    background-position: center;
}

.cart-details h4 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.cart-details .meta {
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 5px;
}

.cart-details .price {
    font-size: 0.9rem;
    font-weight: 600;
}

.remove-btn {
    position: absolute;
    right: 0;
    top: 0;
    border: none;
    background: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #ccc;
}

.remove-btn:hover {
    color: #e74c3c;
}

.cart-footer {
    padding: 30px;
    border-top: 1px solid #eee;
    background: #fafafa;
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-weight: 800;
    font-size: 1.1rem;
}

.checkout-btn {
    width: 100%;
    padding: 15px;
    background: #000;
    color: #fff;
    border: none;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    letter-spacing: 1px;
}

.checkout-btn:hover {
    background: #009e4a;
}

@media (max-width: 768px) {
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
}

/* MARQUEE */
.marquee-container {
    overflow: hidden;
    white-space: nowrap;
    padding: 15px 0;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    mix-blend-mode: overlay;
    color: rgba(255, 255, 255, 0.9);
}

.marquee-content {
    display: inline-block;
    animation: marquee 25s linear infinite;
    padding-left: 0;
}

@keyframes marquee {
    0% {
        transform: translateX(100vw);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* LOADER */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-content {
    text-align: center;
    animation: fadeUp 0.8s ease forwards;
}

.loader-logo {
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: -3px;
    margin-bottom: 20px;
    display: block;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

/* SCROLL REVEAL (Professional) */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active-reveal {
    opacity: 1;
    transform: translateY(0);
}

/* Force show cursor since we removed the custom one */
body,
a,
button,
.product-card,
.nav-item {
    cursor: auto !important;
}