/* ============================================
   CONTEXT PRO SHOP — ESTILOS v2.0.1
   Color principal: #7ED321
   ============================================ */

:root {
    --cp-green:  #7ED321;
    --cp-green2: #5da015;
    --cp-dark:   #162A2E;
    --cp-darker: #0a0a0a;
    --cp-card:   #1a2e32;
}

/* ============================================
   BASE — SECCIÓN SHOP
   ============================================ */

.liru-shop-section {
    background: var(--cp-dark);
    padding: 40px 20px;
    font-family: 'Barlow', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #fff;
}

/* Single product — fondo Context Pro */
.liru-single-product-wrapper {
    background: #162A2E !important;
    color: #fff !important;
    padding: 40px 0 60px !important;
}

/* ============================================
   SINGLE PRODUCT — CANTIDAD Y CARRITO
   ============================================ */

.liru-single-product-wrapper .liru-add-to-cart-wrapper {
    display: flex !important;
    gap: 15px !important;
    margin-bottom: 30px !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    clear: both;
}

.liru-single-product-wrapper .liru-quantity {
    display: flex !important;
    align-items: center !important;
    background: transparent !important;
    border-radius: 30px !important;
    border: 1px solid #2e4a50 !important;
    height: 48px !important;
    padding: 0 5px !important;
    width: auto !important;
    margin: 0 !important;
}

.liru-single-product-wrapper .liru-qty-btn {
    background: none !important;
    border: none !important;
    color: #fff !important;
    width: 32px !important;
    height: 100% !important;
    cursor: pointer !important;
    font-size: 20px !important;
    transition: color 0.3s !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.liru-single-product-wrapper .liru-qty-btn:hover {
    color: var(--cp-green) !important;
}

.liru-single-product-wrapper .liru-qty-input {
    width: 40px !important;
    background: transparent !important;
    border: none !important;
    color: #fff !important;
    text-align: center !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* ============================================
   FILTROS DE CATEGORÍA
   ============================================ */

.filtros-categorias {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.btn-filtro {
    background: transparent;
    border: 1px solid #2e4a50;
    color: #888;
    padding: 12px 28px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-filtro:hover {
    border-color: var(--cp-green);
    color: var(--cp-green);
}

.btn-filtro.active {
    background: var(--cp-green);
    border-color: var(--cp-green);
    color: #000;
    font-weight: 700;
}

/* ============================================
   GRID DE PRODUCTOS
   ============================================ */

.productos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    max-width: 1400px;
    margin: 0 auto;
}

.no-productos {
    color: #888;
    text-align: center;
    grid-column: 1 / -1;
    padding: 40px;
}

/* ============================================
   TARJETA DE PRODUCTO
   ============================================ */

.producto-card {
    background: var(--cp-card);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #1e3a3f;
    position: relative;
}

.producto-card:hover {
    transform: translateY(-5px);
    border-color: var(--cp-green);
    box-shadow: 0 10px 40px rgba(126, 211, 33, 0.15);
}

.producto-card.hidden { display: none; }

.producto-imagen {
    position: relative;
    aspect-ratio: 1;
    background: #0f1e21;
    overflow: hidden;
}

.producto-link {
    display: block;
    width: 100%;
    height: 100%;
}

.producto-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.producto-card:hover .producto-img { transform: scale(1.05); }

/* BADGES */
.badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 2;
}

.badge-oferta    { background: #ff9800; color: #000; }
.badge-destacado { background: var(--cp-green); color: #000; }

/* OVERLAY */
.producto-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    display: flex;
    gap: 10px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.5) 60%, transparent 100%);
    z-index: 10;
}

.producto-card:hover .producto-overlay {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   BOTÓN AGREGAR
   ============================================ */

.btn-agregar {
    flex: 1;
    background: linear-gradient(135deg, var(--cp-green), var(--cp-green2));
    color: #000;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    font-family: inherit;
}

.btn-agregar:hover {
    background: linear-gradient(135deg, #a8d84a, var(--cp-green));
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(126, 211, 33, 0.4);
    color: #000;
}

.btn-agregar.loading {
    opacity: 0.8;
    pointer-events: none;
}

.btn-agregar.loading .btn-text::after {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #000;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

.btn-agregar.added { background: #4caf50; color: #fff; }
.btn-agregar.added svg { display: none; }
.btn-agregar.added .btn-text::before { content: "✓ "; }

@keyframes spin { to { transform: rotate(360deg); } }

/* BOTÓN VER */
.btn-ver {
    width: 42px;
    height: 42px;
    background: rgba(255,255,255,0.08);
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    text-decoration: none;
}

.btn-ver:hover {
    background: var(--cp-green);
    color: #000;
    transform: scale(1.1);
}

/* ============================================
   INFO TARJETA
   ============================================ */

.producto-info { padding: 20px; }

.categoria-label {
    color: var(--cp-green);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    display: block;
}

.producto-nombre { margin-bottom: 10px; line-height: 1.4; }

.producto-nombre a {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.producto-nombre a:hover { color: var(--cp-green); }

.producto-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.estrellas { color: #ffc107; font-size: 14px; letter-spacing: 2px; }
.reviews   { color: #666; font-size: 12px; }

.producto-precio {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.precio-actual,
.precio-actual .woocommerce-Price-amount {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
}

.precio-anterior,
.precio-anterior .woocommerce-Price-amount {
    color: #555;
    font-size: 14px;
    text-decoration: line-through;
}

/* ============================================
   RESPONSIVE — GRID
   ============================================ */

@media (max-width: 768px) {
    .productos-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .btn-filtro { padding: 10px 20px; font-size: 12px; }
    .producto-overlay { opacity: 1; transform: translateY(0); padding: 15px; }
    .btn-agregar { padding: 10px 15px; font-size: 12px; }
    .producto-info { padding: 15px; }
    .producto-nombre a { font-size: 14px; }
    .precio-actual,
    .precio-actual .woocommerce-Price-amount { font-size: 16px; }
}

@media (max-width: 480px) {
    .productos-grid { grid-template-columns: 1fr; }
    .liru-shop-section { padding: 20px 15px; }
}

/* ============================================
   ANIMACIONES
   ============================================ */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.producto-card { animation: fadeIn 0.5s ease forwards; }
.producto-precio .woocommerce-Price-currencySymbol { display: inline; }
.producto-precio del { display: none; }
.producto-precio ins { text-decoration: none; }

/* ============================================
   SINGLE PRODUCT — LAYOUT
   ============================================ */

.liru-single-container {
    max-width: 1200px;
    margin: 0 auto;
    color: #fff;
    padding: 0 20px;
}

.liru-single-main {
    display: flex;
    flex-wrap: wrap;
    gap: 60px;
    margin-bottom: 60px;
    align-items: flex-start;
}

.liru-single-image-col { flex: 1; min-width: 300px; max-width: 500px; }
.liru-single-details-col { flex: 2; min-width: 300px; }

.liru-main-image-box {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #2e4a50;
    background: #0f2225;
    aspect-ratio: 1;
    cursor: pointer;
}

.liru-primary-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.liru-main-image-box:hover .liru-primary-img {
    transform: scale(1.04);
}

/* BACK LINK */
.liru-back-link { margin-bottom: 30px; }

.liru-back-link a {
    color: #7a9ea5;
    text-decoration: none;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s;
}

.liru-back-link a:hover { color: #fff; }

/* TÍTULO */
.liru-product-title {
    font-size: 36px;
    font-weight: 900;
    margin: 4px 0 20px 0;
    line-height: 1.05;
    font-family: 'Barlow Condensed', 'Barlow', sans-serif;
    text-transform: uppercase;
    color: #fff;
}

/* PRECIO SINGLE */
.liru-single-price {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.liru-single-price .precio-actual,
.liru-single-price .precio-actual .woocommerce-Price-amount {
    font-size: 36px;
    font-weight: 700;
    color: var(--cp-green) !important;
}

.liru-single-price .precio-anterior,
.liru-single-price .precio-anterior .woocommerce-Price-amount {
    font-size: 18px;
    color: #556;
    text-decoration: line-through;
}

.liru-discount-pill {
    background: #0f2a10;
    color: var(--cp-green);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid var(--cp-green);
    font-size: 12px;
    font-weight: 700;
}

.liru-mb { margin-bottom: 25px; }

.liru-short-desc {
    color: #9ab5bc;
    line-height: 1.7;
    font-size: 15px;
}

/* ATRIBUTOS */
.liru-attributes { margin-bottom: 30px; }
.liru-attr-group { margin-bottom: 15px; }

.liru-attr-name {
    display: block;
    margin-bottom: 8px;
    color: #7a9ea5;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.liru-attr-values { display: flex; flex-wrap: wrap; gap: 10px; }

.liru-attr-pill {
    padding: 0 22px;
    height: 36px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    background: transparent;
    color: var(--cp-green);
    border: 1px solid var(--cp-green);
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.liru-attr-pill:hover { background: var(--cp-green); color: #000; }

/* BOTÓN AGREGAR SINGLE */
.liru-single-product-wrapper .liru-single-add-cart {
    flex: none !important;
    padding: 0 32px !important;
    height: 48px !important;
    border-radius: 30px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    background: var(--cp-green) !important;
    color: #000 !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    margin: 0 !important;
    font-family: 'Barlow Condensed', 'Barlow', sans-serif !important;
    letter-spacing: 0.5px !important;
}

.liru-single-product-wrapper .liru-single-add-cart:hover {
    background: var(--cp-green2) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(126, 211, 33, 0.35) !important;
}

/* BOTONES ACCIÓN */
.liru-action-btn {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid #2e4a50;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.liru-single-product-wrapper .liru-action-btn {
    width: 48px !important; height: 48px !important;
    border-radius: 50% !important;
    background: transparent !important;
    border: 1px solid #2e4a50 !important;
    color: #fff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
    margin: 0 !important;
    padding: 0 !important;
}

.liru-single-product-wrapper .liru-action-btn svg { width: 18px !important; height: 18px !important; }

.liru-single-product-wrapper .liru-action-btn:hover {
    border-color: var(--cp-green) !important;
    color: var(--cp-green) !important;
}

.liru-single-product-wrapper .liru-wishlist-toggle.liru-wishlist-single {
    position: static !important;
    background: transparent !important;
    width: 48px !important;
    height: 48px !important;
}

/* WISHLIST TOGGLE */
.liru-wishlist-toggle {
    position: absolute;
    top: 20px; right: 20px;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    width: 48px; height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    color: #fff;
}

.liru-wishlist-toggle:hover {
    background: rgba(126, 211, 33, 0.15);
    border-color: var(--cp-green);
}

.liru-wishlist-toggle.active svg {
    fill: var(--cp-green);
    stroke: var(--cp-green);
    animation: heartPulse 0.3s ease;
}

@keyframes heartPulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.liru-wishlist-toggle svg { width: 22px; height: 22px; transition: all 0.3s; }

/* FEATURES */
.liru-product-features {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    padding-top: 25px;
    border-top: 1px solid #2e4a50;
}

.liru-feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #7a9ea5;
}

.liru-feature-item svg { width: 16px; height: 16px; color: var(--cp-green); }

.liru-meta { display: none; }

/* ============================================
   SECTION TITLES
   ============================================ */

.liru-section-title {
    font-size: 24px;
    font-weight: 900;
    font-family: 'Barlow Condensed', 'Barlow', sans-serif;
    text-transform: uppercase;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 1px solid #2e4a50;
    color: #fff;
}

.liru-section-title span { color: var(--cp-green); }

/* ============================================
   GALERÍA
   ============================================ */

.liru-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 60px;
}

.liru-gallery-item {
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid #2e4a50;
    position: relative;
    background: #0f2225;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.liru-gallery-item:hover {
    border-color: var(--cp-green);
    box-shadow: 0 4px 20px rgba(126, 211, 33, 0.2);
}

.liru-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.liru-gallery-item:hover img {
    transform: scale(1.1);
}

.liru-gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(126, 211, 33, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.liru-gallery-overlay svg { width: 30px; height: 30px; color: white; }

.liru-gallery-item:hover .liru-gallery-overlay { opacity: 1; }

/* ============================================
   DESCRIPCIÓN — Fix Gutenberg overrides
   ============================================ */

.liru-product-tabs { margin-bottom: 50px; }

.liru-tab-content {
    color: #9ab5bc !important;
    line-height: 1.8;
    background: transparent !important;
}

.liru-tab-content *,
.liru-tab-content p,
.liru-tab-content div,
.liru-tab-content span,
.liru-tab-content li,
.liru-tab-content ul,
.liru-tab-content ol {
    color: #9ab5bc !important;
    background: transparent !important;
}

.liru-tab-content h1, .liru-tab-content h2,
.liru-tab-content h3, .liru-tab-content h4 {
    color: #fff !important;
    background: transparent !important;
    margin-top: 20px;
    font-family: 'Barlow Condensed', 'Barlow', sans-serif;
}

.liru-tab-content p { margin-bottom: 15px; }
.liru-tab-content strong, .liru-tab-content b { color: #fff !important; }
.liru-tab-content a { color: var(--cp-green) !important; }

/* ============================================
   LIGHTBOX GALERÍA — Facebook style
   ============================================ */

/* Evita scroll del body cuando el lightbox está abierto */
body.liru-lb-open { overflow: hidden; }

#liru-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

/* Envoltorio de imagen — animación al abrir */
.liru-lb-img-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: calc(100vw - 140px);
    max-height: 100vh;
    animation: lbZoomIn 0.25s ease;
}

#liru-lightbox-img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.8);
    transition: opacity 0.14s ease;
    display: block;
    user-select: none;
}

@keyframes lbZoomIn {
    from { transform: scale(0.88); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

/* Botón cerrar */
.liru-lb-close {
    position: fixed;
    top: 18px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    z-index: 10;
    padding: 0;
    font-family: sans-serif;
}

.liru-lb-close:hover {
    background: var(--cp-green);
    color: #000;
    border-color: var(--cp-green);
}

/* Botones de navegación prev / next */
.liru-lb-prev,
.liru-lb-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
    z-index: 10;
    padding: 0;
    user-select: none;
}

.liru-lb-prev { left: 18px; }
.liru-lb-next { right: 18px; }

.liru-lb-prev:hover,
.liru-lb-next:hover {
    background: var(--cp-green);
    border-color: var(--cp-green);
    color: #000;
    transform: translateY(-50%) scale(1.1);
}

/* Contador de imágenes */
.liru-lb-counter {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    padding: 5px 16px;
    border-radius: 20px;
    letter-spacing: 1px;
    z-index: 10;
    backdrop-filter: blur(6px);
}

/* Responsive */
@media (max-width: 600px) {
    .liru-lb-img-wrap { max-width: calc(100vw - 90px); }
    .liru-lb-prev { left: 8px; }
    .liru-lb-next { right: 8px; }
    .liru-lb-prev,
    .liru-lb-next { width: 40px; height: 40px; font-size: 16px; }
}

/* ============================================
   WISHLIST GRID
   ============================================ */

.liru-wishlist-grid .producto-card { position: relative; }

.liru-wishlist-remove {
    position: absolute;
    top: 10px; right: 10px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    color: white;
    padding: 8px;
    border-radius: 50%;
    opacity: 0;
    border: 1px solid rgba(255,255,255,0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 20;
}

.liru-wishlist-grid .producto-card:hover .liru-wishlist-remove { opacity: 1; }

.liru-wishlist-remove:hover {
    background: var(--cp-green);
    border-color: var(--cp-green);
    color: #000;
    transform: scale(1.1);
}

/* ============================================
   RESPONSIVE — SINGLE
   ============================================ */

@media (max-width: 992px) {
    .liru-single-main { gap: 30px; }
    .liru-product-title { font-size: 28px; }
}

@media (max-width: 480px) {
    .liru-add-to-cart-wrapper { flex-direction: column; align-items: stretch; }
    .liru-gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
