* {
    -webkit-tap-highlight-color: transparent;
}

:root {
    --negro: #0a0a0a;
    --blanco: #ffffff;
    --dorado: #d4af37;
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background: var(--negro);
    color: var(--blanco);
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 2000;
    background: var(--negro);

}

header h1 {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--dorado);
}

nav a {
    color: var(--blanco);
    margin-left: 25px;
    font-size: 15px;
    text-decoration: none;
    transition: 0.3s;
}
nav a:hover {
    color: var(--dorado);
}

.hero {
    height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
}

.hero h2 {
    font-size: 48px;
    font-weight: 700;
    color: var(--dorado);
    margin-bottom: 10px;
}

.hero p {
    font-size: 18px;
    max-width: 700px;
    opacity: 0.8;
}

.btn-primary {
    margin-top: 25px;
    padding: 14px 35px;
    background: var(--dorado);
    color: var(--negro);
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    transition: 0.3s;
}

.btn-primary:hover {
    background: #b8942f;
}

.section {
    padding: 80px 50px;
    text-align: center;
}

.section h3 {
    font-size: 32px;
    color: var(--dorado);
    margin-bottom: 20px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.card {
    padding: 30px;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    transition: 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--dorado);
}

.style-script-regular {
  font-family: "Style Script", cursive;
  font-weight: 300;
  font-style: normal;
  color: var(--dorado);
}



footer {
    padding: 25px;
    text-align: center;
    color: #aaa;
    font-size: 14px;
    margin-top: 50px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== MENU HAMBURGUESA ===== */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.menu-toggle span {
    height: 3px;
    width: 25px;
    background: var(--blanco);
    margin: 4px 0;
    transition: 0.3s;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {

    header {
        padding: 20px;
    }

    .menu-toggle {
        display: flex;
    }

    nav {
        position: absolute;
        top: 80px;
        right: 0;
        width: 100%;
        background: #0a0a0a;
        flex-direction: column;
        align-items: center;
        display: none;
        border-top: 1px solid rgba(255,255,255,0.1);
    }

    nav a {
        margin: 15px 0;
        font-size: 18px;
    }

    nav.active {
        display: flex;
    }
}


/* ===== ANIMACIÓN MENU MOBILE ===== */
@media (max-width: 768px) {

    nav {
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: var(--negro);
        flex-direction: column;
        align-items: center;
        overflow: hidden;

        max-height: 0;
        opacity: 0;
        transform: translateY(-20px);

        transition: 
            max-height 0.4s ease,
            opacity 0.3s ease,
            transform 0.3s ease;

        border-top: 1px solid rgba(255,255,255,0.1);
    }

    nav.active {
        max-height: 500px;
        opacity: 1;
        transform: translateY(0);
    }

    nav a {
        margin: 15px 0;
        font-size: 18px;
    }

    /* ===== BOTÓN HAMBURGUESA → X ===== */
    .menu-toggle {
        display: flex;
        z-index: 1000;
    }

    .menu-toggle span {
        height: 3px;
        width: 26px;
        background: var(--blanco);
        border-radius: 2px;
        transition: 0.3s;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
}

/* ===== ANIMACIÓN MENU MOBILE MEJORADA ===== */
@media (max-width: 768px) {

    nav {
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: var(--negro);
        flex-direction: column;
        align-items: center;
        overflow: hidden;

        transform-origin: top;
        transform: translateY(-30px) scaleY(0.95);
        opacity: 0;
        pointer-events: none;

        transition:
            transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
            opacity 0.35s ease;

        border-top: 1px solid rgba(255,255,255,0.1);
        box-shadow: 0 20px 40px rgba(0,0,0,0.6);
    }

    nav.active {
        transform: translateY(0) scaleY(1);
        opacity: 1;
        pointer-events: auto;
    }

    nav a {
        margin: 18px 0;
        font-size: 18px;
        opacity: 0;
        transform: translateY(-10px);
        transition: 0.3s ease;
    }

    nav.active a {
        opacity: 1;
        transform: translateY(0);
    }

    /* Delay escalonado */
    nav.active a:nth-child(1) { transition-delay: 0.05s; }
    nav.active a:nth-child(2) { transition-delay: 0.10s; }
    nav.active a:nth-child(3) { transition-delay: 0.15s; }
    nav.active a:nth-child(4) { transition-delay: 0.20s; }
    nav.active a:nth-child(5) { transition-delay: 0.25s; }

}

nav a:hover {
    color: var(--dorado);
    transform: scale(1.05);
}

@media (max-width: 768px) {

    nav {
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: var(--negro);

        display: grid;
        grid-template-rows: 0fr;
        overflow: hidden;

        opacity: 0;
        transition:
            grid-template-rows 0.55s cubic-bezier(0.4, 0, 0.2, 1),
            opacity 0.35s ease;

        border-top: 1px solid rgba(255,255,255,0.1);
        box-shadow: 0 25px 60px rgba(0,0,0,0.65);
    }

    nav > * {
        overflow: hidden;
    }

    nav.active {
        grid-template-rows: 1fr;
        opacity: 1;
    }

    nav a {
        display: block;
        margin: 18px 0;
        font-size: 18px;
        text-align: center;

        opacity: 0;
        transform: translateY(-6px);
        transition:
            opacity 0.35s ease,
            transform 0.35s ease;
    }

    nav.active a {
        opacity: 1;
        transform: translateY(0);
    }

    /* Cascada real (no brusca) */
    nav.active a:nth-child(1) { transition-delay: 0.08s; }
    nav.active a:nth-child(2) { transition-delay: 0.14s; }
    nav.active a:nth-child(3) { transition-delay: 0.20s; }
    nav.active a:nth-child(4) { transition-delay: 0.26s; }
    nav.active a:nth-child(5) { transition-delay: 0.32s; }
}

.menu-toggle {
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-toggle.active {
    transform: rotate(180deg);
}

.recent-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 30px;
    margin-top: 40px;
}

/* Card normal */
.product-card {
    text-decoration: none;
    color: var(--blanco);
    text-align: center;
}

/* Placeholder vacío */
.product-card.placeholder {
    background: transparent;
    border: 1px dashed rgba(255,255,255,0.1);
    pointer-events: none;
}

/* Mobile */
@media (max-width: 1024px) {
    .recent-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .recent-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.product-card {
    text-decoration: none;
    color: var(--blanco);
    text-align: center;

    display: flex;
    flex-direction: column;
    justify-content: flex-start;

    height: 100%;
}

/* CONTENEDOR DE IMAGEN */
.product-card img {
    width: 100%;
    height: 250px; /* Un poco más altas para que luzcan más */
    object-fit: cover; /* 🔥 Ahora la imagen llenará todo el recuadro */
    background: transparent;    
    border-radius: 8px;
    padding: 0;                 
    box-sizing: border-box;
    margin-bottom: 10px;
}









/* ===== BUSCADOR HEADER ===== */
.search-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-form input {
    background: #111;
    border: 1px solid rgba(255,255,255,0.15);
    color: var(--blanco);
    padding: 8px 12px;
    border-radius: 6px;
    outline: none;
    width: 180px;
    transition: 0.3s;
}

.search-form input:focus {
    border-color: var(--dorado);
}

.search-form button {
    background: transparent;
    border: none;
    color: var(--blanco);
    font-size: 18px;
    cursor: pointer;
    transition: 0.3s;
}

.search-form button:hover {
    color: var(--dorado);
}

/* Mobile */
@media (max-width: 768px) {
    .search-form {
        width: 100%;
        margin-top: 15px;
        justify-content: center;
    }

    .search-form input {
        width: 70%;
    }

    .btn-enviar{
        display: flex;
        justify-content: center;
    }
}






/* ===== BUSCAR / RESULTADOS ===== */

.search-title span {
    color: var(--dorado);
}

.search-filters {
    display: flex;
    justify-content: center;
    margin: 30px 0 10px;
}

.search-filters select {
    background: #111;
    color: var(--blanco);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 10px 14px;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: 0.3s;
}

.search-filters select:hover,
.search-filters select:focus {
    border-color: var(--dorado);
    outline: none;
}

/* ===== RESULTADOS GRID ===== */
/* ya usás recent-grid, solo afinamos animación */

.product-card {
    background: #111;
    border-radius: 12px;
    padding: 15px;
    transition: 0.35s;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

/* Precio */
.product-card p,
.product-card span {
    color: var(--dorado);
    font-weight: 500;
    margin-top: 5px;
}

/* ===== PAGINACIÓN ===== */

.pagination {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 50px;
}

.pagination a {
    padding: 10px 16px;
    border-radius: 8px;
    background: #111;
    color: var(--blanco);
    text-decoration: none;
    font-size: 14px;
    border: 1px solid rgba(255,255,255,0.15);
    transition: 0.3s;
}

.pagination a:hover {
    border-color: var(--dorado);
    color: var(--dorado);
}

.pagination a.active {
    background: var(--dorado);
    color: var(--negro);
    font-weight: 600;
}







/* ================= HEADER SEARCH PREMIUM ================= */

.header-search {
    display: flex;
    align-items: center;
    background: #111;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 999px;
    padding: 4px 6px 4px 14px;
    margin-left: 25px;
    transition: 0.3s;
}

.header-search:focus-within {
    border-color: var(--dorado);
    box-shadow: 0 0 0 2px rgba(212,175,55,0.15);
}

.header-search input {
    background: transparent;
    border: none;
    color: var(--blanco);
    font-size: 14px;
    outline: none;
    width: 160px;
}

.header-search input::placeholder {
    color: rgba(255,255,255,0.5);
}

/* Botón lupa */
.header-search button {
    background: var(--dorado);
    border: none;
    color: var(--negro);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.header-search button:hover {
    background: #b8942f;
}

/* ================= MOBILE ================= */

@media (max-width: 768px) {

    .header-search {
        width: 90%;
        margin: 15px auto 5px;
    }

    .header-search input {
        width: 100%;
        font-size: 16px;
    }
}


.header-search button {
    opacity: 0.85;
}

.header-search:hover button {
    opacity: 1;
}


/* ===== VISIBILIDAD BUSCADOR ===== */
.only-mobile {
    display: none;
}

.only-desktop {
    display: flex;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {

    .only-desktop {
        display: none;
    }

    .only-mobile {
        display: flex;
        width: 100%;
        margin: 15px 0 10px;
        justify-content: center;
    }

    .only-mobile input {
        width: 85%;
        font-size: 16px;
        padding: 12px 14px;
    }

    .only-mobile button {
        background: var(--dorado);
        color: var(--negro);
        border-radius: 6px;
        padding: 0 14px;
    }
}

/* ===== HERO MOBILE FIX ===== */
@media (max-width: 768px) {

    .hero {
        padding: 0 25px;          /* más aire a los lados */
    }

    .hero h2 {
        font-size: 34px;          /* evita que ocupe demasiado ancho */
        line-height: 1.2;
    }

    .hero p {
        font-size: 16px;
        max-width: 95%;
        margin: 0 auto;
        padding: 0 10px;          /* 🔑 espacio interno extra */
        line-height: 1.5;
    }

    .btn-primary {
        width: 90%;
        max-width: 280px;
        text-align: center;
    }
}


.hero {
    padding: 0 20px;
}

.hero p {
    max-width: 650px;
    margin: 0 auto;
    padding: 0 15px;
}



/* ===== CART BADGE PREMIUM ===== */

.cart-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding-right: 18px; /* espacio para el badge */
}

/* Badge */
.cart-badge {
    position: absolute;
    top: -8px;
    right: -14px;

    min-width: 20px;
    height: 20px;
    padding: 0 6px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 11px;
    font-weight: 600;

    color: var(--negro);
    background: linear-gradient(145deg, #e6c65c, var(--dorado));

    border-radius: 999px;
    box-shadow:
        0 0 0 2px var(--negro),
        0 4px 10px rgba(0,0,0,0.5);

    animation: cartPop 0.35s ease;
}

/* Glow al hover del nav */
.cart-link:hover .cart-badge {
    box-shadow:
        0 0 0 2px var(--negro),
        0 0 10px rgba(212,175,55,0.6),
        0 6px 14px rgba(0,0,0,0.6);
}

/* Animación */
@keyframes cartPop {
    0%   { transform: scale(0.5); opacity: 0; }
    60%  { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

@media (max-width: 768px) {

    .cart-link {
        position: relative;
        overflow: visible !important; /* Evita el recorte de la guillotina */
        display: inline-flex !important; /* Mantiene la burbuja pegada al texto */
        margin: 18px auto !important; /* Centra el bloque en la pantalla */
        width: max-content; /* El enlace solo ocupa el espacio necesario */
    }

    .cart-badge {
        right: -10px; /* Le damos un poco más de aire para que no se pegue a la "o" */
        top: -4px;
        transform: scale(0.95);
    }
}



.logout-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 5000;
}

.logout-modal.active {
    display: flex;
}

.logout-box {
    background: #111;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.1);
    width: 320px;
}

.logout-box h3 {
    color: var(--dorado);
    margin-bottom: 10px;
}

.logout-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.btn-cancel {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--blanco);
    border-radius: 6px;

    margin-top: 25px;
    padding: 14px 35px;
    font-weight: 600;
    text-decoration: none;
    transition: 0.3s;
}
.btn-cancel:hover {
    border-color: var(--dorado);
}

.logout-buttons {
    display: flex;
    gap: 15px;
}

.logout-buttons button {
    flex: 1;           /* mismo ancho automático */
    padding: 12px 0;
}

.input-error {
    border-color: var(--dorado) !important;
}


/* ========================================= */
/* ===== SCROLL HORIZONTAL COLECCIONES ===== */
/* ========================================= */

/* ========================================= */
/* ===== SCROLL HORIZONTAL COLECCIONES ===== */
/* ========================================= */

.category-grid {
    display: flex !important;
    flex-direction: row !important;      /* Fuerza a que sea una fila */
    flex-wrap: nowrap !important;        /* Evita que los elementos bajen a otra línea */
    justify-content: flex-start;         /* Alinea todo desde la izquierda */
    gap: 20px;
    margin-top: 30px;
    padding-bottom: 25px;
    
    overflow-x: auto !important;         /* Habilita el scroll horizontal */
    overflow-y: hidden;                  /* Oculta cualquier desborde vertical */
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    
    /* Scrollbar premium */
    scrollbar-width: thin;
    scrollbar-color: var(--dorado) transparent;
}

.category-grid::-webkit-scrollbar {
    height: 6px;
}
.category-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}
.category-grid::-webkit-scrollbar-thumb {
    background: var(--dorado);
    border-radius: 10px;
}

.category-card {
    flex: 0 0 280px !important;          /* El "0 0" es clave para que no se encojan */
    scroll-snap-align: start;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 300px;
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s ease;
    background: #111;
}

/* (Mantené los estilos que ya tenías de .category-card img, .category-overlay, y los hover) */

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    opacity: 0.8;
}

/* Gradiente oscuro encima de la imagen para que el texto resalte */
.category-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10,10,10,0.95) 0%, rgba(10,10,10,0.2) 60%, rgba(10,10,10,0) 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 25px;
}

.category-overlay h4 {
    color: var(--dorado);
    font-size: 20px;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    transition: 0.3s;
}

.category-card:hover {
    border-color: var(--dorado);
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.8);
}

.category-card:hover img {
    transform: scale(1.1);
    opacity: 1;
}

.category-card:hover .category-overlay h4 {
    transform: translateY(-5px);
}

/* Ajustes responsivos para las categorías */
@media (max-width: 768px) {

    .cards2 .category-card {
        height: auto;
    }
    .category-overlay h4 {
        font-size: 16px;
    }
}
.category-grid {
    display: grid;
    /* Cambiamos el 1fr por un tamaño máximo (ej. 300px) para que no se estire de más */
    grid-template-columns: repeat(auto-fit, minmax(250px, 300px));
    justify-content: center; /* Centra las tarjetas si hay poquitas */
    gap: 25px;
    margin-top: 30px;
}


/* ========================================= */
/* ===== FIX VISUAL CENTRADO EN MÓVILES ==== */
/* ========================================= */
@media (max-width: 768px) {

    /* 1. Centrar el enlace del carrito en el menú */
    .cart-link {
        position: relative;
        overflow: visible !important;
        display: inline-flex !important;
        justify-content: center;
        align-items: center;
        margin: 18px auto !important;
        width: max-content;
        justify-self: center; /* Fundamental para centrar en el nuevo nav grid */
    }

    .cart-badge {
        right: -15px;
        top: -6px;
    }

    /* 2. Centrar y emprolijar el buscador en el menú móvil */
    form.header-search.only-mobile {
        width: 85%;
        margin: 20px auto 30px auto;
        justify-self: center;
        box-sizing: border-box;
    }

    /* 3. Centrar layout de los productos en la página Carrito */
    .cart-item {
        display: flex;
        flex-direction: column !important;
        align-items: center;
        text-align: center;
        gap: 15px;
        padding: 25px 15px;
    }

    .cart-item-left img {
        width: 150px;
        height: 150px;
        object-fit: contain;
        margin: 0 auto;
    }

    .cart-item-info {
        width: 100%;
    }

    .cart-item-price {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 15px;
        margin-top: 10px;
        width: 100%;
    }

    .qty-controls {
        justify-content: center;
        margin: 0 auto;
    }

    /* 4. Centrar los métodos de pago, envío y totales */
    .cart-bar {
        display: flex;
        flex-direction: column !important;
        align-items: center;
        text-align: center;
        gap: 35px;
        padding: 30px 15px;
    }

    .cart-bar-left, .cart-bar-center, .cart-bar-right {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .payment-select, .shipping-select {
        margin: 0 auto;
        justify-content: center;
        width: 100%;
        max-width: 280px;
    }

    .postal-box {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-top: 15px;
    }

    .postal-box input {
        text-align: center;
    }
    
    .cart-bar-right {
        border-top: 1px solid rgba(255,255,255,0.1);
        padding-top: 25px;
    }
}