﻿*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
    color: #111;
}

body {
    padding: 1rem;
    background: #fff;
}

.container {
    max-width: 1100px;
    margin: auto;
}

/* HEADER */
header {
    border-bottom: 1px solid #eee;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
}

/* Navigation Bar */
nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo img {
    width: 32px;
    height: 32px;
    display: block;
}

/* Menu styling */
nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

    nav ul a {
        text-decoration: none;
        color: #333;
        font-size: 0.95rem;
        display: block;
    }

/* Menu Toggle Button */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 2rem; /* Slightly bigger */
    cursor: pointer;
    padding: 0 0.5rem;
    line-height: 1;
    color: #111;
    z-index: 1001; /* Ensure button is above the mobile menu */
}

/* ========== MOBILE STYLES ========== */
@media (max-width: 900px) {
    .menu-toggle {
        display: block;
    }

    nav ul {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        background: white;
        padding: 4rem 2rem 2rem; /* Space from top for close button */
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        border-bottom: 1px solid #eee;
        /* Initially hidden */
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
        z-index: 1000;
    }

        nav ul.active {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }

        nav ul li {
            width: 100%;
            border-bottom: 1px solid #f0f0f0;
        }

            nav ul li:last-child {
                border-bottom: none;
            }

        nav ul a {
            padding: 1rem 0;
            font-size: 1.2rem;
            width: 100%;
        }

    /* Adjust header spacing for mobile */
    header {
        padding-bottom: 0;
    }
}
.sortDescrip{
    margin-bottom :15px;
}
.add-to-cart-btn svg {
    transition: transform 0.2s ease;
}

.add-to-cart-btn:hover svg {
    transform: translateX(2px);
}
/* PRODUCT GRID */
.product {
    display: grid;
    gap: 2.5rem;
    margin-bottom: 3rem;
}

@media (min-width:768px) {
    .product {
        grid-template-columns: 1fr 1fr;
    }
}

.product img {
    width: 100%;
    height: auto;
    border-radius: 6px;
}

h1 {
    font-size: 1.9rem;
    margin-bottom: 1rem;
}
table {
    width: 100%;
    border-collapse: collapse;
    font-family: Arial, sans-serif;
    font-size: 14px;
    margin-bottom: 30px;
}

th, td {
    padding: 10px 14px; /* espacio interno */
    text-align: left;
    border-bottom: 1px solid #ddd;
}

thead {
    background-color: #f5f7fa; /* fondo diferente */
}

    thead th {
        font-weight: 600;
        text-transform: uppercase;
        font-size: 12px;
        letter-spacing: 0.04em;
        color: #444;
        border-bottom: 2px solid #ccc;
    }

tbody tr:hover {
    background-color: #f9f9f9; /* hover suave */
}
.price {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

button {
    padding: 0.8rem 1.4rem;
    border: none;
    border-radius: 4px;
    background: #111;
    color: #fff;
    cursor: pointer;
}
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

.external-btn svg {
    flex-shrink: 0;
}
.seo-content {
    margin-bottom: 3rem;
    margin-top: 3rem;
    line-height: 1.7;
    color: #333;
}

.seo-content h2 {
    font-size: 1.6rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.seo-content p {
    margin-bottom: 1rem;
}

.seo-content ul,
.seo-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    list-style-position: inside;
}

.seo-content a {
    color: #1e90ff;
    text-decoration: underline;
}

.seo-content a:hover {
    color: #0d6efd;
}

.seo-content iframe,
.seo-content video {
    max-width: 100%;
    margin: 1rem 0;
    display: block;
}


/* ============================================
   FOOTER MEJORADO
   ============================================ */
footer {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    padding: 3rem 0 2rem;
    margin-top: 4rem;
    border-top: none;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

    footer::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, #667eea, #764ba2, #3b82f6, #2563eb);
    }

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
    position: relative;
    padding-bottom: 0.8rem;
    color: #fff;
}

    .footer-col h4::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 50px;
        height: 3px;
        background: linear-gradient(90deg, #3b82f6, #8b5cf6);
        border-radius: 2px;
    }

.footer-col p {
    color: #cbd5e1;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-bottom: 0;
}

    .footer-links a {
        color: #cbd5e1;
        text-decoration: none;
        transition: all 0.3s ease;
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
    }

        .footer-links a:hover {
            color: #3b82f6;
            transform: translateX(5px);
        }

        .footer-links a::before {
            content: '›';
            font-size: 1.2rem;
            color: #3b82f6;
            opacity: 0;
            transition: all 0.3s ease;
        }

        .footer-links a:hover::before {
            opacity: 1;
        }

/* Contacto */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #cbd5e1;
}
.contact-item,
.contact-item a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s ease;
}
.contact-item a:hover {
    color: #3b82f6;
}
.contact-item svg {
    width: 20px;
    height: 20px;
    fill: #3b82f6;
    flex-shrink: 0;
}
/* Social links */
.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

    .social-link:hover {
        background: #3b82f6;
        transform: translateY(-3px);
    }

    .social-link svg {
        width: 20px;
        height: 20px;
        fill: white;
    }

/* Newsletter */
.newsletter-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.newsletter-input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 0.95rem;
}

    .newsletter-input::placeholder {
        color: rgba(255,255,255,0.5);
    }

    .newsletter-input:focus {
        outline: none;
        border-color: #3b82f6;
        background: rgba(255,255,255,0.15);
    }

.newsletter-btn {
    padding: 0.8rem 1.2rem;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .newsletter-btn:hover {
        background: #2563eb;
        transform: translateY(-2px);
    }

/* Footer bottom */
.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

    .footer-bottom p {
        color: #94a3b8;
        font-size: 0.9rem;
    }

.payment-methods {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.payment-method {
    width: 40px;
    height: 25px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: #cbd5e1;
}

/* Responsive */
@media (max-width: 768px) {
    footer {
        padding: 2rem 0 1.5rem;
    }

    .footer-grid {
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .footer-col h4 {
        font-size: 1.1rem;
    }

    .footer-links a {
        font-size: 0.9rem;
    }
}

/* ===== CART BADGE ===== */

.nav-cart {
    position: relative;
}

.cart-link {
    position: relative;
    text-decoration: none;
    font-size: 1.2rem;
}

.cart-badge {
    position: absolute;
    top: -6px;
    right: -10px;
    background: #111;
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 3px 6px;
    border-radius: 999px;
    min-width: 18px;
    text-align: center;
    line-height: 1;
}
.cart-link {
    position: relative;
    padding-right: 10px;
}
/*cookie*/
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    padding: 1rem;
    z-index: 1050;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
    /* 🔑 CLAVE ANTI-CLS */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

    .cookie-banner.show {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.cookie-icon {
    flex-shrink: 0;
    width: 50px;
    height: 52px;
    background: url('/assets/img/galleta.png') no-repeat center;
    background-size: contain;
}

.cookie-text {
    flex-grow: 1;
    font-size: 0.9rem;
    line-height: 1.4;
}

    .cookie-text a {
        color: #4dabf7;
        text-decoration: underline;
        transition: color 0.2s;
    }

        .cookie-text a:hover {
            color: #74c0fc;
        }

.cookie-buttons {
    flex-shrink: 0;
    display: flex;
    gap: 0.75rem;
}

.btn-cookie {
    padding: 0.5rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-cookie-accept {
    background: linear-gradient(135deg, #37b24d 0%, #2b8a3e 100%);
    border: none;
    color: white;
}

    .btn-cookie-accept:hover {
        background: linear-gradient(135deg, #2b8a3e 0%, #2b8a3e 100%);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(43, 138, 62, 0.3);
    }

.btn-cookie-reject {
    background: transparent;
    border: 2px solid #495057;
    color: #adb5bd;
}

    .btn-cookie-reject:hover {
        border-color: #6c757d;
        color: white;
    }

/* Responsive */
@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .cookie-buttons {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .btn-cookie {
        padding: 0.5rem 1rem;
        min-width: 140px;
    }

    .cookie-icon {
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 480px) {
    .cookie-banner {
        padding: 0.75rem;
    }

    .cookie-text {
        font-size: 0.85rem;
    }

    .btn-cookie {
        min-width: 120px;
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
}

/* Mejora de rendimiento - evita flash de contenido no estilizado */
.cookie-banner * {
    box-sizing: border-box;
}