/*
Theme Name: Arapy Theme
Theme URI: https://arapy.proyecto.link
Description: Premium WooCommerce Theme optimized for speed and conversion,  Independent standalone theme. Build your own Universe.
Author: William Chaparro
Author URI: https://2pixeles.com/
Version: 1.0.0
Text Domain: arapy
License: GNU General Public License v3 or later.
Tags: flexible-header, custom-colors, custom-menu, custom-logo, e-commerce, translation-ready
*/

/* =========================================
   VARIABLES GLOBALES Y RESET
   ========================================= */
:root {
    --bg-gray: #E8E8E8;
    --pill-white: #FFFFFF;
    --text-black: #111111;
    --lime-neon: #D9FF4F;
    --pill-height: 54px;
    --offcanvas-width: 320px;
    --card-blue-bg: #D0E8F7;
}

/* REGLA PARA TU FONDO PARALLAX (Asegura que no bloquee clics) */
.fondo-general-fijo {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1; /* Crítico para que el header funcione */
}

body {
    background-color: var(--bg-gray);
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    overflow-x: hidden;
}

a { background-color: transparent; color: #9dc312; text-decoration: none; }
a:active, a:hover { color: #d9ff4f; }
p { margin-block-end: 0; }

body:not([class*="elementor-page-"]) .site-main { max-width: 100%; }
body.offcanvas-open { overflow: hidden; }

html, body, button, input, select, textarea, .woocommerce-loop-product__title, .price, .button {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 { font-family: 'Inter', sans-serif !important; font-weight: 700; }

.page-header .entry-title, .site-footer .footer-inner, .site-footer:not(.dynamic-footer), .site-header .header-inner, .site-header:not(.dynamic-header), body:not([class*="elementor-page-"]) .site-main {
    max-width: 98%; border-radius: 30px; margin-bottom: 30px;
}

img.arapy-custom-logo, img.derene-custom-logo {
    max-height: 28px; width: auto; object-fit: contain; display: block;
}
.offcanvas-header img.arapy-custom-logo, .offcanvas-header img.derene-custom-logo { max-height: 35px; }

/* =========================================
   ESTILO DE PÁGINAS GENERALES
   ========================================= */
body.page, body.single-post { background-color: #f6f6f6 !important; }

.page .entry-content, .single-post .entry-content, .page .page-content {
    background: #ffffff; max-width: 1000px; margin: 40px auto !important; padding: 60px !important; border-radius: 12px; box-shadow: 0 4px 25px rgba(0,0,0,0.04);
}

.page .entry-title, .single-post .entry-title {
    text-align: center; font-size: 48px !important; font-weight: 800 !important; letter-spacing: -1.5px; margin-bottom: 40px; color: #000;
}

/* =========================================
   HEADER
   ========================================= */
.site-header {
    padding: 24px 0;
    position: sticky;
    top: 0;
    z-index: 9999; /* Subido para evitar conflicto con fondos fijos */
    background-color: transparent; 
    transition: all 0.3s ease;
}

.header-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 30px;
    box-sizing: border-box;
    gap: 15px;
}

.pill {
    background: var(--pill-white);
    height: var(--pill-height, 54px);
    border-radius: 100px;
    display: flex;
    align-items: center;
    padding: 0 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
}

.logo-pill { flex-shrink: 0; }
.logo-link {
    text-decoration: none;
    color: var(--text-black);
    font-weight: 800;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 4px;
    letter-spacing: -0.5px;
}
.logo-dot {
    width: 6px; height: 6px; 
    background-color: var(--lime-neon); 
    border-radius: 50%; 
    display: inline-block; 
    margin-top: -10px;
}

@media (min-width: 992px) {
    .mobile-only { display: none !important; }
    .menu-pill { margin: 0 auto; justify-content: center; }
    .menu-pill .nav-list { display: flex; gap: 25px; list-style: none; margin: 0; padding: 0; align-items: center; }
    .actions-pill { flex-shrink: 0; gap: 20px; }
    .pill-icon-btn, .user-btn {
        background: none; border: none; cursor: pointer; color: var(--text-black);
        display: flex; align-items: center; justify-content: center;
        transition: transform 0.2s, color 0.2s; padding: 0;
    }
    .pill-icon-btn:hover, .user-btn:hover { transform: scale(1.1); color: var(--lime-neon); }
    .cart-btn {
        display: flex; align-items: center; gap: 10px; font-weight: 600; 
        color: var(--text-black); text-decoration: none; font-size: 15px;
    }
    .count-circle {
        background-color: var(--lime-neon); width: 26px; height: 26px; border-radius: 50%;
        display: flex; justify-content: center; align-items: center; font-size: 13px; font-weight: 800;
    }
}

@media (max-width: 991px) {
    .desktop-only { display: none !important; }
    .site-header { padding: 15px 0; }
    .header-layout { padding: 0 15px; }
    .mobile-search-wrapper { margin-left: auto; }
    .mobile-only { display: flex !important; align-items: center; justify-content: center; }
    .mobile-only .pill-icon-btn {
        background: var(--pill-white); height: 44px; width: 44px; border-radius: 50%;
        border: none; display: flex; align-items: center; justify-content: center;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05); color: var(--text-black);
    }
    .mobile-cart-btn { position: relative; }
    .mobile-count-bubble {
        position: absolute; top: -2px; right: -2px; background-color: var(--lime-neon);
        width: 18px; height: 18px; border-radius: 50%; font-size: 10px; font-weight: 800;
        display: flex; align-items: center; justify-content: center; border: 2px solid #fff;
    }
}

/* =========================================
   BUSCADOR (OVERLAY) - CLASES CORREGIDAS
   ========================================= */
#derene-search-overlay { z-index: 999999 !important; }
.search-overlay {
    position: fixed; top: 0; right: 0; width: 100%; height: 100%; 
    background: rgba(255,255,255,0.98); z-index: 99999; 
    opacity: 0; visibility: hidden; transition: all 0.3s ease; 
    overflow-y: auto; -webkit-overflow-scrolling: touch; 
}
.search-overlay.active, .search-overlay.show { opacity: 1; visibility: visible; }
.search-overlay-container { max-width: 800px; margin: 10vh auto; padding: 30px; }
.search-header { display: flex; align-items: center; gap: 20px; border-bottom: 2px solid #000; padding-bottom: 10px; }
.search-header input { border: none; background: transparent; font-size: 24px; width: 100%; outline: none; font-weight: 700; color: #000; }
.close-btn { font-size: 35px; cursor: pointer; border: none; background: none; color: #111; line-height: 1; }
.close-btn:hover { color: var(--lime-neon); }

/* =========================================
   MENÚ OFFCANVAS (NUEVO - FALTABA EN TU CSS)
   ========================================= */
.mobile-offcanvas-menu {
    position: fixed;
    top: 0;
    right: -100%; /* Inicia oculto a la derecha */
    width: var(--offcanvas-width);
    max-width: 80vw;
    height: 100vh;
    background-color: var(--pill-white);
    z-index: 999999;
    box-shadow: -5px 0 25px rgba(0,0,0,0.1);
    transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    display: flex;
    flex-direction: column;
}
.mobile-offcanvas-menu.active, .mobile-offcanvas-menu.show {
    right: 0; /* Se desliza suavemente hacia la pantalla */
}
.offcanvas-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #f0f0f0;
}
.offcanvas-body {
    padding: 25px;
    overflow-y: auto;
}
.mobile-nav-list { list-style: none; padding: 0; margin: 0; }
.mobile-nav-list li { margin-bottom: 15px; }
.mobile-nav-list a { font-size: 18px; color: var(--text-black); font-weight: 600; text-decoration: none; }
.mobile-nav-list a:hover { color: var(--lime-neon); }

.mobile-overlay-backdrop {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.4); z-index: 999998;
    opacity: 0; visibility: hidden; transition: all 0.3s ease;
}
.mobile-overlay-backdrop.active, .mobile-overlay-backdrop.show {
    opacity: 1; visibility: visible;
}

/* =========================================
   TIENDA & GRID DE PRODUCTOS
   ========================================= */
.arapy-shop-layout { display: flex; gap: 40px; align-items: flex-start; margin: 40px 0; }
.arapy-sidebar-filters { width: 250px; flex-shrink: 0; position: sticky; top: 100px; }
.arapy-shop-content { flex-grow: 1; min-width: 0; }

ul.products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; width: 100%; margin: 0; padding: 0; list-style: none; }
ul.products li.product { width: 100% !important; margin: 0 !important; }

.arapy-product-card { position: relative; background: var(--pill-white); border-radius: 20px; overflow: hidden; transition: all 0.3s ease; display: flex; flex-direction: column; min-height: 380px; }
.arapy-product-card:hover { box-shadow: 0 15px 35px rgba(0,0,0,0.1); transform: translateY(-5px); }

.arapy-image-wrapper { position: relative; width: 100%; height: 350px; overflow: hidden; border-radius: 20px 20px 0 0; background-color: #f5f5f5; }
.arapy-image-wrapper img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.4s ease-in-out; }
.arapy-image-main { opacity: 1; z-index: 2; }
.arapy-image-secondary { opacity: 0; z-index: 1; }
.arapy-image-wrapper.has-second-image:hover .arapy-image-main { opacity: 0; }
.arapy-image-wrapper.has-second-image:hover .arapy-image-secondary { opacity: 1; }

.arapy-marquee-wrapper { position: absolute; top: 10px; left: 10px; right: 10px; background-color: var(--lime-neon); overflow: hidden; white-space: nowrap; border-radius: 4px; padding: 6px 0; z-index: 10; font-size: 12px; font-weight: 600; text-transform: uppercase; color: #000; }
.arapy-marquee-track { display: inline-flex; animation: arapy-scroll 35s linear infinite; align-items: center; gap: 10px; }
@keyframes arapy-scroll { 0% { transform: translate(0, 0); } 100% { transform: translate(-50%, 0); } }

.arapy-info-bar { padding: 15px 20px; display: flex; justify-content: space-between; align-items: flex-end; margin-top: auto; }
.arapy-info-bar .woocommerce-loop-product__title { font-size: 15px; font-weight: 600; color: #111; margin: 0; line-height: 1.2; }
.arapy-info-bar .price { font-size: 14px; font-weight: 500; color: #666; margin: 0; display: block; }
.arapy-info-bar .price ins { text-decoration: none; color: #000; font-weight: 700; margin-left: 5px; }

.info-actions { opacity: 0; transform: translateX(10px); transition: all 0.3s ease; }
.arapy-add-btn { width: 40px; height: 40px; background-color: var(--lime-neon) !important; border-radius: 12px !important; display: flex !important; justify-content: center; align-items: center; color: #000 !important; border: none; cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.1) !important; padding: 0 !important; }
.arapy-add-btn:hover { background-color: #ccee2e; transform: scale(1.05); }
.arapy-product-card:hover .info-actions { opacity: 1; transform: translateX(0); }

/* =========================================
   FILTROS AJAX (BOTONES Y PILLS)
   ========================================= */
.arapy-filter-btn { white-space: nowrap; background: #f2f2f2; border: none; padding: 8px 18px; border-radius: 30px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.arapy-filter-btn.active, .arapy-filter-btn:hover { background: #000; color: #fff; }

/* =========================================
   PRODUCTO INDIVIDUAL & CARRITO
   ========================================= */
.single_add_to_cart_button.button { font-size: 18px !important; background-color: var(--lime-neon) !important; color: #000 !important; border-radius: 10px !important; height: 50px !important; padding: 0 30px !important; font-weight: 700 !important; border: none !important; display: inline-flex !important; align-items: center; justify-content: center; transition: all 0.3s; }
.single_add_to_cart_button.loading { opacity: 0.7; cursor: wait; }

.quantity { display: inline-flex !important; align-items: center; background: #f2f2f2; border-radius: 12px; padding: 0px; height: 40px; overflow: hidden; }
.quantity .qty { width:45px !important; height: 100% !important; background: transparent !important; border: none !important; text-align: center; font-size: 16px !important; font-weight: 700 !important; color: #000; }
.qty-btn { width: 30px; height: 100%; border: none; background: transparent; cursor: pointer; font-size: 18px; font-weight: 600; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.qty-btn:hover { color: var(--lime-neon); background: #111; }

.arapy-ajax-error-wrap .woocommerce-error { background: #fff0f0 !important; border-left: 4px solid #ff4d4d !important; color: #cc0000 !important; padding: 15px 20px !important; border-radius: 8px !important; font-size: 14px !important; box-shadow: none !important; list-style: none !important; }

/* =========================================
   CHECKOUT MINIMAL STYLE
   ========================================= */
body.arapy-checkout-minimal { background: linear-gradient(to right, #ffffff 0%, #ffffff 55%, #fafafa 55%, #fafafa 100%) !important; min-height: 100vh; }
.arapy-checkout-minimal form.checkout { display: grid; grid-template-columns: 55% 45%; min-height: 80vh; }
.arapy-checkout-minimal #customer_details { padding-right: 60px; background: transparent; }
.arapy-checkout-minimal #order_review { padding-left: 60px; padding-top: 40px; background: transparent; }
.arapy-checkout-minimal .input-text, .arapy-checkout-minimal select { width: 100% !important; height: 46px !important; padding: 10px 15px !important; border: 1px solid #d9d9d9 !important; border-radius: 5px !important; font-size: 14px !important; }
.arapy-checkout-minimal #place_order { background-color: var(--lime-neon) !important; color: #000 !important; border-radius: 8px !important; padding: 20px !important; font-size: 16px !important; font-weight: 700 !important; width: 100%; border: none !important; transition: all 0.3s; }
.arapy-checkout-minimal #place_order:hover { background-color: #000 !important; color: var(--lime-neon) !important; }

/* =========================================
   FOOTER
   ========================================= */
.site-footer { background-color: #FFFFFF; padding-top: 80px; border-top: 1px solid #f0f0f0; color: var(--text-black); }
.footer-widgets-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px; max-width: 1300px; margin: 0 auto; padding-bottom: 60px; }
.footer-column { flex: 1 1 22%; min-width: 200px; }
.footer-title { font-size: 14px; font-weight: 700; text-transform: uppercase; margin-bottom: 25px; letter-spacing: 1px; }
.footer-menu { list-style: none; padding: 0; margin: 0; }
.footer-menu li { margin-bottom: 12px; }
.footer-menu li a { color: #444; font-size: 15px; text-decoration: none; transition: color 0.3s; }
.footer-menu li a:hover { color: var(--lime-neon); }