/* PALETA DE COLORES Y RESET BASE */
:root {
    --bg-light: #f6f7f2;
    --bg-charcoal: #252322;
    --bg-footer: #1c1a19;
    --text-dark: #19191a;
    --text-light: #f6f7f2;
    --text-muted: #a39b95;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto Mono', monospace;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: 80px; 
    font-size: 1.25rem;
}

a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

a:hover {
    opacity: 0.6;
}

.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.img-bw {
    filter: grayscale(100%) contrast(110%);
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 2px;
    display: block;
}

.container {
    width: 100%;
    max-width: 1260px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* HEADER Y NAVEGACIÓN */
.site-header {
    background-color: var(--bg-light);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: transform 0.4s ease-in-out;
    box-shadow: 0 1px 8px rgba(0,0,0,0.04);
}

.header-hidden {
    transform: translateY(-100%);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.header-brand img {
    height: 32px;
    display: block;
}

.brand-title {
    font-size: 1.31rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 1.8rem;
}

.main-nav a {
    font-size: 0.94rem;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 1px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    transition: opacity 0.2s ease;
}

.icon-btn:hover {
    opacity: 0.6;
}

.icon-btn svg {
    width: 26px;
    height: 26px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-btn.search-btn svg {
    width: 18px;
    height: 18px;
}

.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 20px;
    height: 14px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.hamburger-btn span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: var(--text-dark);
    transition: all 0.3s ease;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    background-color: var(--bg-light);
    border-bottom: 1px solid #ddd;
    padding: 1.5rem 2rem;
    z-index: 999;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.mobile-menu a {
    font-size: 1.06rem;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 1px;
    display: block;
}

/* BUSCADOR */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(37, 35, 34, 0.8);
    z-index: 2000;
    display: none;
    justify-content: center;
    padding-top: 10vh;
}

.search-modal.active { display: flex; }

.search-card {
    background-color: var(--bg-light);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    padding: 2rem;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.search-input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--text-dark);
    background: transparent;
    font-size: 1.06rem;
    color: var(--text-dark);
    outline: none;
}

.search-results {
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid #e0e0e0;
}

.search-item img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    background-color: #eaeaea;
}

.search-item-info h5 {
    font-size: 1.06rem;
    font-weight: 600;
    text-transform: uppercase;
}

.search-item-info p { font-size: 0.94rem; color: var(--text-muted); }
.close-search { position: absolute; top: 1rem; right: 1.2rem; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-muted); }

/* POPUP NEWSLETTER */
.popup-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(37, 35, 34, 0.85); display: flex; justify-content: center; align-items: center; z-index: 2000; opacity: 0; pointer-events: none; transition: opacity 0.5s ease;
}

.popup-overlay.active { opacity: 1; pointer-events: auto; }

.popup-content {
    background-color: var(--bg-light); color: var(--text-dark); padding: 3rem 2.5rem; max-width: 400px; width: 90%; position: relative; text-align: center; margin-top: -10vh; transform: translateY(30px); transition: transform 0.5s ease;
}

.popup-overlay.active .popup-content { transform: translateY(0); }

.close-popup { position: absolute; top: 1rem; right: 1.5rem; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-muted); }

.popup-content h2 { font-size: 1.75rem; font-weight: 400; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.8rem; }
.popup-content p { font-size: 1.06rem; color: #555; margin-bottom: 2rem; }

/* FOOTER GENERAL */
.site-footer {
    background-color: var(--bg-footer);
    color: var(--text-light);
    padding: 4rem 0 2rem;
    margin-top: auto;
}

.footer-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 3rem; }
.footer-col h3 { font-size: 0.8rem; text-transform: uppercase; margin-bottom: 1.2rem; font-weight: 400; color: var(--text-muted); }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.6rem; font-size: 0.85rem; }
.footer-col p { font-size: 0.85rem; color: var(--text-light); margin-bottom: 0.5rem; }
.social-links { display: flex; gap: 1.2rem; margin-top: 1.2rem; }
.social-links svg { width: 18px; height: 18px; fill: var(--text-light); }

.subscribe-form { display: flex; flex-direction: column; gap: 0.8rem; }
.subscribe-form input[type="email"] { padding: 0.8rem; background: transparent; border: 1px solid #444; color: var(--text-light); font-size: 1.06rem; }
.subscribe-form input[type="email"]:focus { outline: none; border-color: var(--text-light); }
.subscribe-form button { background-color: var(--text-light); color: var(--bg-footer); padding: 0.8rem; border: none; text-transform: uppercase; font-weight: 700; font-size: 1.06rem; cursor: pointer; transition: opacity 0.3s; }

.popup-content .subscribe-form input[type="email"] { border-color: var(--text-dark); color: var(--text-dark); }
.popup-content .subscribe-form button { background-color: var(--text-dark); color: var(--bg-light); }

.footer-bottom { margin-top: 3rem; text-align: center; font-size: 0.7rem; color: var(--text-muted); border-top: 1px solid #333; padding-top: 1.5rem; }

/* ESTILOS DEL GLOBITO DEL CARRITO */
.cart-btn-wrapper {
    position: relative;
    display: inline-flex;
}

.cart-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background-color: var(--text-dark);
    color: var(--bg-light);
    font-size: 0.65rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

/* ==========================================
   SIDE CART OVERLAY & PANEL (EXPLORATIO STYLE)
   ========================================== */

.side-cart-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-color: rgba(25, 25, 26, 0.6) !important;
    backdrop-filter: blur(3px) !important;
    -webkit-backdrop-filter: blur(3px) !important;
    z-index: 99998 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: opacity 0.35s ease, visibility 0.35s ease !important;
}

.side-cart-overlay.active {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.side-cart {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 440px !important;
    height: 100% !important;
    height: 100vh !important;
    background-color: var(--bg-light, #f6f7f2) !important;
    color: var(--text-dark, #19191a) !important;
    box-shadow: -10px 0 35px rgba(0, 0, 0, 0.25) !important;
    z-index: 99999 !important;
    transform: translateX(100%) !important;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 2rem 1.8rem 1.5rem !important;
    box-sizing: border-box !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

.side-cart.active {
    transform: translateX(0) !important;
}

.side-cart-header {
    flex-shrink: 0 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding-bottom: 1.2rem !important;
    border-bottom: 1px solid rgba(25, 25, 26, 0.15) !important;
}

.side-cart-header h3 {
    font-size: 1.2rem !important;
    font-weight: 500 !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
    margin: 0 !important;
}

.side-cart-close {
    background: none !important;
    border: none !important;
    font-size: 1.3rem !important;
    cursor: pointer !important;
    color: var(--text-dark, #19191a) !important;
    line-height: 1 !important;
    padding: 0.3rem !important;
    transition: opacity 0.2s ease !important;
}

.side-cart-close:hover {
    opacity: 0.5 !important;
}

.side-cart-items {
    flex: 1 0 auto !important;
    padding: 1.5rem 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 1.2rem !important;
}

.side-cart-item {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    padding-bottom: 1rem !important;
    border-bottom: 1px solid rgba(25, 25, 26, 0.08) !important;
}

.side-cart-item h5 {
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    margin: 0 0 0.3rem 0 !important;
}

.side-cart-item small {
    font-size: 0.85rem !important;
    color: var(--text-muted, #a39b95) !important;
}

.side-cart-item button {
    background: none !important;
    border: none !important;
    color: var(--text-muted, #a39b95) !important;
    font-size: 1rem !important;
    cursor: pointer !important;
    padding: 0.2rem 0.4rem !important;
    transition: color 0.2s ease !important;
}

.side-cart-item button:hover {
    color: var(--text-dark, #19191a) !important;
}

.side-cart-footer {
    flex-shrink: 0 !important;
    border-top: 1px solid rgba(25, 25, 26, 0.15) !important;
    padding-top: 1.2rem !important;
    padding-bottom: 1.5rem !important;
    margin-top: auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
    background-color: var(--bg-light, #f6f7f2) !important;
}

.side-cart-total {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
}

.side-cart-btn {
    background-color: var(--text-dark, #19191a) !important;
    color: var(--bg-light, #f6f7f2) !important;
    border: none !important;
    padding: 1.1rem !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    cursor: pointer !important;
    text-align: center !important;
    transition: opacity 0.3s ease !important;
    width: 100% !important;
    display: block !important;
}

.side-cart-btn:hover {
    opacity: 0.85 !important;
}

/* MEDIA QUERIES GENERALES (HEADER Y FOOTER) */
@media (max-width: 768px) {
    body { padding-top: 65px; }
    .site-header { padding: 0.8rem 0; }
    .header-brand img { height: 26px; }
    .brand-title { font-size: 1.19rem; }
    .main-nav { display: none; }
    .hamburger-btn { display: flex; }
    .header-inner { flex-direction: row; text-align: left; }
}

/* AJUSTES RESPONSIVOS DE CELULAR PARA EL PANEL LATERAL */
@media (max-width: 480px) {
    .side-cart {
        max-width: 100% !important;
        width: 100% !important;
        height: 100vh !important;
        height: 100dvh !important;
        padding: 1.2rem 1.2rem 0 !important;
        display: flex !important;
        flex-direction: column !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .side-cart-header {
        position: sticky !important;
        top: 0 !important;
        background-color: var(--bg-light, #f6f7f2) !important;
        z-index: 5 !important;
        padding-top: 0.4rem !important;
        padding-bottom: 0.8rem !important;
    }

    .side-cart-items {
        flex: 1 0 auto !important;
        padding: 1rem 0 !important;
    }

    .side-cart-footer {
        position: sticky !important;
        bottom: 0 !important;
        background-color: var(--bg-light, #f6f7f2) !important;
        z-index: 5 !important;
        border-top: 1px solid rgba(25, 25, 26, 0.15) !important;
        padding-top: 0.8rem !important;
        padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 20px)) !important;
        margin-top: auto !important;
    }

    .side-cart-total {
        font-size: 0.95rem !important;
        margin-bottom: 0.4rem !important;
    }

    .side-cart-btn {
        padding: 0.85rem !important;
        font-size: 0.8rem !important;
    }
}