/*
Theme Name: Solena App Standalone
Theme URI: https://solenamoda.com
Author: Solena
Description: Tema Independiente Web App Mobile-First v2.4.040
Version: 2.4.040
Text Domain: solena-app
*/

/* 1. BASE */
* { box-sizing: border-box; }
body, html { margin: 0; padding: 0; width: 100%; overflow-x: hidden; }
body { font-family: 'Poppins', sans-serif; padding-top: 0; padding-bottom: 70px; background: #fff; color: #333; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }

/* 2. LIMPIEZA EXTREMA */
.site-header, .site-footer, footer, #footer, .footer, #colophon, 
.site-info, .copyright, .footer-widgets, .widget-area, #secondary, #sidebar, .sidebar,
.storefront-sorting, .woocommerce-ordering, .woocommerce-result-count, 
.page-title, .entry-title, h2.wp-block-heading, .widget, .block-library-content, 
.wp-block-columns, .wp-block-group,
.widget_pages, .widget_archive, .widget_categories, .widget_meta,
h2.widgettitle, h2.widget-title, li.widget,
#wpadminbar, .woocommerce-store-notice, .demo_store, .woocommerce-error, .woocommerce-info, .woocommerce-message { 
    display: none !important; 
    visibility: hidden !important; 
    opacity: 0 !important; 
    height: 0 !important; 
    width: 0 !important;
    overflow: hidden !important;
}
html { margin-top: 0 !important; }

/* 3. GRID */
ul.products { 
    display: grid !important; 
    grid-template-columns: repeat(2, 1fr) !important; 
    gap: 15px !important; 
    padding: 15px !important; 
    margin: 0 !important; 
    list-style: none !important; 
    width: 100% !important;
}
ul.products::before, ul.products::after { content: none !important; display: none !important; }

@media(min-width: 768px) { ul.products { grid-template-columns: repeat(4, 1fr) !important; gap: 30px !important; padding: 30px !important; max-width: 1400px !important; margin: 0 auto !important; } }

/* TARJETAS */
.solena-product-card, ul.products li.product { margin-bottom: 0 !important; position: relative; list-style: none; display: flex; flex-direction: column; width: auto !important; }
.solena-product-card .img-container { 
    position: relative !important; 
    display: block; 
    border-radius: 0 !important; 
    overflow: hidden !important; 
    margin-bottom: 10px; 
    width: 100%; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.03); 
}
.solena-main-img { 
    width: 100%; 
    aspect-ratio: 1/1 !important; 
    object-fit: cover !important; 
    border-radius: 0 !important; 
}
.solena-img-overlay { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: #e53935; color: #fff; padding: 5px 8px; font-weight: 700; font-size: 10px; border-radius: 0; pointer-events: none; text-transform: uppercase; z-index: 2; white-space: nowrap; box-shadow: 0 2px 4px rgba(0,0,0,0.2); }

/* TEXTOS */
.solena-title { font-family: 'Poppins', sans-serif !important; font-size: 12px !important; font-weight: 700 !important; margin: 5px 0; color: #000; text-transform: uppercase; line-height: 1.3; text-align: center !important; height: 32px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.solena-cat-text { display: none !important; }
.solena-price { font-weight: 800; font-size: 14px; color: #000; display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; margin-bottom: 10px; flex-wrap: wrap; }
.solena-price del { color: #e53935 !important; text-decoration: line-through !important; opacity: 1 !important; font-size: 11px !important; font-weight: 600 !important; }
.solena-price ins { text-decoration: none !important; color: #000 !important; font-weight: 800 !important; font-size: 14px !important; }
.stock-label { font-size: 11px !important; font-weight: 900 !important; text-transform: uppercase; margin: 0 auto 10px !important; display: block; text-align: center !important; letter-spacing: 0.5px; }
.stock-low { color: #e53935; } .stock-med { color: #ff6d00; } .stock-high { color: #2e7d32; }

/* VARIACIONES */
.swatch-container { margin: 0 0 12px !important; display: flex !important; flex-direction: column !important; align-items: center !important; gap: 8px !important; }
.swatch-row { display: flex !important; flex-wrap: wrap !important; gap: 8px !important; justify-content: center !important; }
.swatch-btn { cursor: pointer; font-size: 13px; background: #fff; color: #333; transition: all 0.2s; position: relative; display: flex; align-items: center; justify-content: center; }
.swatch-btn.text-opt { border: 2px solid #ddd; border-radius: 6px; min-width: 40px; height: 40px; padding: 0 4px; text-transform: uppercase; font-weight: 700; }
.swatch-btn.text-opt.selected { border-color: #000 !important; color: #000 !important; font-weight: 900; background: #fff; }
.swatch-btn.color-dot { width: 30px !important; height: 30px !important; border-radius: 50% !important; padding: 0 !important; border: 2px solid #eee !important; }
.swatch-btn.color-dot.selected { border: 2px solid #fff !important; box-shadow: 0 0 0 2px #000; transform: scale(1.1); }

/* BOTÓN AÑADIR (NEGRO) */
.add-btn { width: 100% !important; padding: 12px !important; background: #000 !important; color: #fff !important; border: none !important; font-weight: 800 !important; text-transform: uppercase !important; cursor: pointer !important; border-radius: 6px !important; font-size: 13px !important; margin-top: auto !important; letter-spacing: 0.5px; box-shadow: 0 4px 10px rgba(0,0,0,0.2); }
.add-btn.disabled { background: #eee !important; color: #aaa !important; cursor: not-allowed !important; pointer-events: none; box-shadow: none; }

/* MENU FIJO */
.mobile-fixed-footer-nav { position: fixed !important; bottom: 0 !important; left: 0 !important; width: 100% !important; height: 75px !important; background: #fff !important; border-top: 1px solid #eee !important; z-index: 2147483647 !important; display: flex !important; justify-content: space-around !important; align-items: center !important; padding-bottom: 0 !important; box-shadow: 0 -5px 20px rgba(0,0,0,0.15) !important; }
.footer-nav-item { text-align: center; color: #333; font-size: 13px !important; font-weight: 700; text-decoration: none; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 25%; }
.nav-icon { font-size: 24px !important; margin-bottom: 3px; line-height: 1; display: block; }
.footer-cart-count { background: #e53935; color: #fff; min-width: 20px; height: 20px; border-radius: 50%; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; position: absolute; top: -8px; right: 12px; z-index: 10; border: 2px solid #fff; transition: transform 0.2s; }

/* ANIMACIÓN SHAKE */
@keyframes shakeGrow {
    0% { transform: scale(1) rotate(0deg); }
    20% { transform: scale(1.4) rotate(-15deg); }
    50% { transform: scale(1.8) rotate(15deg); }
    80% { transform: scale(1.4) rotate(-15deg); }
    100% { transform: scale(1) rotate(0deg); }
}
.shake-anim { animation: shakeGrow 0.5s ease-in-out both; background-color: #ff0000 !important; }

/* PANELES */
.off-canvas-panel { width: 85% !important; max-width: 400px !important; height: 100%; position: fixed; top: 0; right: 0; z-index: 2147483650 !important; background: #fff; transform: translate3d(100%,0,0); transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1); display: flex; flex-direction: column; box-shadow: -10px 0 30px rgba(0,0,0,0.1); }
.off-canvas-panel.is-visible { transform: translate3d(0,0,0) !important; }
.close-panel { position: absolute !important; top: 15px !important; right: 15px !important; background: #e53935 !important; color: #fff !important; width: 30px !important; height: 30px !important; min-width: 30px !important; border-radius: 50% !important; border: none !important; display: flex !important; align-items: center !important; justify-content: center !important; font-size: 14px !important; cursor: pointer !important; z-index: 2000 !important; padding: 0 !important; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
.off-canvas-content { flex: 1; overflow-y: auto !important; -webkit-overflow-scrolling: touch; padding: 0; padding-bottom: 80px; position: relative; }
.off-canvas-inner-padding { padding: 20px; padding-top: 60px; }
.body-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 2147483645 !important; opacity: 0; visibility: hidden; transition: 0.3s; backdrop-filter: blur(2px); }
body.off-canvas-open .body-overlay { opacity: 1; visibility: visible; }

/* ESTILOS DE CATEGORÍA */
.solena-cat-list { list-style: none !important; padding: 0 !important; margin: 0 !important; }
.solena-cat-list li { border-bottom: 1px solid #f0f0f0; padding: 0; margin: 0; }
.solena-cat-link { display: flex; justify-content: space-between; align-items: center; padding: 18px 0; color: #333; text-decoration: none; font-size: 16px; font-weight: 500; }
.solena-cat-link span { font-size: 20px; font-weight: 300; color: #333; }

/* LIGHTBOX (ZOOM PURO) */
.solena-lightbox-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    /* 85% OPACIDAD */
    background-color: rgba(0,0,0,0.85); 
    z-index: 2147483655 !important; /* Encima de todo */
    display: none; 
    justify-content: center; align-items: center;
    cursor: zoom-out; opacity: 0; transition: opacity 0.3s ease;
}
.solena-lightbox-overlay.active { display: flex; opacity: 1; }

.solena-lightbox-img {
    max-width: 95%; max-height: 95%; /* Ocupa casi todo */
    object-fit: contain;
    border-radius: 2px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    cursor: default;
}

/* CARRITO */
.cart-promo-slider { width: 100%; background: #000; color: #fff; padding: 8px; text-align: center; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; position: sticky; top: 0; z-index: 100; }
.cart-promo-slider .slide { display: none; } .cart-promo-slider .slide.active { display: block; animation: fadeIn 0.5s; }
@keyframes fadeIn { from{opacity:0;} to{opacity:1;} }
.solena-cart-list { list-style: none; padding: 0; margin: 0; }
.solena-cart-item-row { display: grid; grid-template-columns: 80px 1fr; gap: 15px; padding: 15px 0; border-bottom: 1px solid #eee; position: relative; }
.solena-cart-img { width: 80px !important; height: 80px !important; object-fit: cover; border-radius: 4px; }
.remove-circle-btn { position: absolute; top: 10px; right: 0; width: 24px; height: 24px; background: #eee; color: #333; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; line-height: 1; cursor: pointer; z-index: 10; font-weight: bold; }
.solena-qty-selector { display: flex; align-items: center; justify-content: space-between; border: 1px solid #ddd; border-radius: 4px; width: 90px; height: 32px; margin-top: 10px; background: #fff; }
.solena-qty-btn { background: none; border: none; font-size: 16px; color: #333; width: 30px; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; height: 100%; font-weight: 600; }
.solena-qty-val { width: 30px; border: none; text-align: center; font-size: 13px; font-weight: 700; padding: 0; color: #000; background: transparent; }
.solena-save-label { color: #e53935; font-size: 10px; font-weight: 700; text-align: right; margin-top: 4px; clear: right; }
.input-error { border: 1px solid #e53935 !important; background: #fff5f5 !important; }
.error-msg { color: #e53935; font-size: 10px; margin-top: -6px; margin-bottom: 10px; display: block; font-weight: 600; text-align: left; }
.checkout-title { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 13px; text-transform: uppercase; color: #333; margin-bottom: 12px; letter-spacing: 0.5px; }
.legal-box { text-align: center; margin-top: 15px; color: #999; line-height: 1.4; }
.legal-line-1 { font-size: 16px !important; font-weight: 700; display: block; margin-bottom: 2px; }
.legal-line-2 { font-size: 14px !important; font-weight: 400; display: block; }
.btn-finished { background: #cfcfcf !important; color: #fff !important; cursor: default !important; pointer-events: none; }
.search-item-row { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f5f5f5; cursor: pointer; align-items: center; touch-action: manipulation; }
.search-item-row img { width: 45px; height: 45px; object-fit: cover; border-radius: 4px; }
.solena-gallery-thumbs { display: flex; gap: 6px; overflow-x: auto; margin: 12px 0; padding-bottom: 5px; justify-content: flex-start; }
.solena-thumb-img { width: 50px; height: 50px; object-fit: cover; border-radius: 4px; border: 1px solid #eee; flex-shrink: 0; cursor: pointer; opacity: 0.6; transition: 0.2s; }
.solena-thumb-img.active { border-color: #000; opacity: 1; }
.modal-short-desc { font-size: 12px; color: #666; margin-top: 12px; text-align: left; line-height: 1.5; font-weight: 400; }

/* ANIMACIÓN DESCUENTO CRM */
@keyframes solenaDiscountAppear {
    0% { opacity: 0; transform: translateX(20px); background-color: rgba(214, 54, 56, 0.1); }
    50% { opacity: 1; transform: translateX(0); background-color: rgba(214, 54, 56, 0.1); }
    100% { background-color: transparent; }
}
.solena-crm-discount {
    animation: solenaDiscountAppear 2s ease-out forwards;
    padding: 5px; border-radius: 4px;
}