/*
Theme Name: Awayni Studio
Theme URI: https://awayni.com/
Author: Awayni
Description: Tema WordPress personalizado Awayni V3, optimizado para Awayni Commerce Core sin WooCommerce.
Version: 3.0.2
Text Domain: awayni
Requires at least: 6.0
Requires PHP: 8.0
*/

/* Personalización de fuentes */
        .font-title {
            font-family: 'Italiana', serif;
        }
        body {
            font-family: 'Italiana', serif;
            background-color: #FDFBF7; /* Cream base */
            color: #292524; /* Stone 800 */
            overflow-x: hidden;
        }
        ::selection {
            background-color: #B5C4B0; /* Sage selection */
            color: white;
        }
        
        /* PRELOADER (Pantalla de Carga) */
        #preloader {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: #FDFBF7; /* Mismo color de fondo */
            z-index: 9999; /* Por encima de todo */
            display: flex;
            justify-content: center;
            align-items: center;
            transition: opacity 0.8s ease-out, visibility 0.8s;
        }
        #preloader.loaded {
            opacity: 0;
            visibility: hidden;
        }
        .loading-logo {
            width: 100px;
            animation: breathe 2s infinite ease-in-out;
        }
        @keyframes breathe {
            0% { opacity: 0.6; transform: scale(0.95); }
            50% { opacity: 1; transform: scale(1.05); }
            100% { opacity: 0.6; transform: scale(0.95); }
        }

        /* MODAL GUÍA DE TALLAS */
        #size-modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(28, 25, 23, 0.6); /* Stone 900 con opacidad */
            z-index: 9000;
            display: flex;
            justify-content: center;
            align-items: center;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
            backdrop-filter: blur(4px);
        }
        #size-modal.open {
            opacity: 1;
            visibility: visible;
        }
        .modal-content {
            background: #FDFBF7;
            padding: 40px;
            max-width: 600px;
            width: 90%;
            position: relative;
            transform: translateY(20px);
            transition: transform 0.3s ease;
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
        }
        #size-modal.open .modal-content {
            transform: translateY(0);
        }

        /* Animaciones Premium */
        .hover-zoom img {
            transition: transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        }
        .hover-zoom:hover img {
            transform: scale(1.08);
        }
        .fade-in {
            animation: fadeIn 0.8s ease-out;
        }
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* Animación Carrito */
        @keyframes cartBump {
            0% { transform: scale(1); }
            50% { transform: scale(1.3); }
            100% { transform: scale(1); }
        }
        .cart-animate {
            animation: cartBump 0.3s ease-out;
        }

        /* Vistas SPA - OPTIMIZADO PARA MÓVIL */
        .view-section {
            display: none;
            padding-top: 20px; /* Pequeño margen base, el nav sticky hace el resto */
            min-height: 100vh;
        }
        @media (min-width: 768px) {
            .view-section {
                padding-top: 30px; /* Pequeño margen en desktop */
            }
        }
        .view-section.active {
            display: block;
        }

        /* Toast de Lujo */
        #toast {
            visibility: hidden;
            min-width: 300px;
            background-color: #1c1917; /* Stone 900 */
            color: #fff;
            text-align: center;
            border-radius: 2px;
            padding: 16px 24px;
            position: fixed;
            z-index: 100;
            left: 50%;
            bottom: 30px;
            transform: translateX(-50%);
            font-size: 13px;
            letter-spacing: 0.05em;
            opacity: 0;
            transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
            box-shadow: 0 10px 30px rgba(0,0,0,0.15);
        }
        #toast.show {
            visibility: visible;
            opacity: 1;
            bottom: 50px;
        }

        /* Scroll Reveal */
        .reveal-on-scroll {
            opacity: 0;
            transform: translateY(40px);
            transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
        }
        .reveal-on-scroll.is-visible {
            opacity: 1;
            transform: translateY(0);
        }

        /* Parallax Suave */
        .parallax-wrapper {
            overflow: hidden;
            position: relative;
        }
        .parallax-img {
            will-change: transform;
            transition: transform 0.1s linear;
            transform: scale(1.1);
        }

        /* Search Overlay */
        #search-overlay {
            transition: opacity 0.4s ease, visibility 0.4s;
        }
        #search-overlay.open {
            opacity: 1;
            visibility: visible;
        }

        /* CART DRAWER */
        #cart-drawer {
            transform: translateX(100%);
            transition: transform 0.5s cubic-bezier(0.32, 0.72, 0, 1);
        }
        #cart-drawer.open {
            transform: translateX(0);
        }
        #cart-overlay {
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.4s ease, visibility 0.4s;
        }
        #cart-overlay.open {
            opacity: 1;
            visibility: visible;
        }
        
        /* Size Selector Styles */
        .size-option {
            width: 45px;
            height: 45px;
            display: flex;
            align-items: center;
            justify-content: center;
            border: 1px solid #e7e5e4;
            color: #78716c;
            cursor: pointer;
            transition: all 0.2s;
            font-size: 0.8rem;
            font-weight: 500;
        }
        .size-option:hover {
            border-color: #5F7161;
            color: #5F7161;
        }
        .size-option.selected {
            background-color: #292524;
            color: white;
            border-color: #292524;
        }

        /* Color Selector Styles */
        .color-option {
            width: 44px;
            height: 44px;
            border-radius: 50%;
            cursor: pointer;
            border: 2px solid transparent;
            transition: all 0.2s;
            box-shadow: 0 0 0 1px #e7e5e4;
            flex-shrink: 0;
        }
        .color-option.selected {
            transform: scale(1.1);
            box-shadow: 0 0 0 2px #5F7161;
            border: 2px solid white;
            position: relative;
        }
        .color-option.selected::after {
            content: '✓';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: white;
            font-size: 14px;
            font-weight: bold;
            text-shadow: 0 1px 2px rgba(0,0,0,0.5);
        }
        
        /* Tipografía Editorial */
        .prose p { margin-bottom: 1.5rem; line-height: 1.9; font-weight: 300; }
        .prose h3 { font-family: 'Italiana', serif; font-size: 1.8rem; margin-top: 2.5rem; margin-bottom: 1rem; color: #1c1917; }
        
        /* Badges */
        .badge-new {
            background-color: #5F7161;
            color: white;
            padding: 4px 8px;
            font-size: 10px;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            position: absolute;
            top: 10px;
            left: 10px;
            z-index: 10;
        }

        /* Floating WhatsApp */
        .float-wa {
            position: fixed;
            width: 60px;
            height: 60px;
            bottom: 40px;
            right: 40px;
            background-color: #25d366;
            color: #FFF;
            border-radius: 50px;
            text-align: center;
            font-size: 30px;
            box-shadow: 2px 2px 3px #999;
            z-index: 100;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: transform 0.3s;
        }
        .float-wa:hover {
            transform: scale(1.1);
            background-color: #128C7E;
        }

        /* Marquee Banner */
        .marquee-container {
            display: flex;
            width: max-content;
        }
        .marquee-content {
            display: flex;
            animation: marquee 20s linear infinite;
        }
        .marquee-container:hover .marquee-content {
            animation-play-state: paused;
        }
        @keyframes marquee {
            0% { transform: translateX(0); }
            100% { transform: translateX(-50%); }
        }

        /* BOTTOM SHEET FILTERS (Mobile) */
        #mobile-filters-sheet {
            transform: translateY(100%);
            transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
        }
        #mobile-filters-sheet.open {
            transform: translateY(0);
        }
        #mobile-filters-overlay {
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.4s ease, visibility 0.4s;
        }
        #mobile-filters-overlay.open {
            opacity: 1;
            visibility: visible;
        }

/* WordPress integration */
html { scroll-behavior: smooth; }
body.admin-bar #navbar { top: 32px; }
@media (max-width: 782px){ body.admin-bar #navbar { top: 46px; } }
#preloader { display:none !important; }
img { height:auto; }
.custom-logo-link img { max-height:80px; width:auto; }
.screen-reader-text{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
