/* ============================================
   LIRU SHOP PRODUCT GRID - ESTILOS
   ============================================ */

.liru-shop-section {
    background: #0a0a0a;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* ADD TO CART AREA */
.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 #333 !important;
    height: 45px !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: 30px !important;
    height: 100% !important;
    cursor: pointer !important;
    font-size: 18px !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: #e91e63 !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: 14px !important;
    font-weight: 600 !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* BOTONES DE FILTRO */
.filtros-categorias {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.btn-filtro {
    background: transparent;
    border: 1px solid #333;
    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: #e91e63;
    color: #e91e63;
}

.btn-filtro.active {
    background: #e91e63;
    border-color: #e91e63;
    color: white;
}

/* 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: #141414;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #1a1a1a;
    position: relative;
}

.producto-card:hover {
    transform: translateY(-5px);
    border-color: #e91e63;
    box-shadow: 0 10px 40px rgba(233, 30, 99, 0.2);
}

.producto-card.hidden {
    display: none;
}

/* IMAGEN DEL PRODUCTO */
.producto-imagen {
    position: relative;
    aspect-ratio: 1;
    background: #0a0a0a;
    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: #4caf50;
    color: white;
}

/* OVERLAY CON BOTONES - ESTILO VIDEO */
.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.9) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
    z-index: 10;
}

.producto-card:hover .producto-overlay {
    opacity: 1;
    transform: translateY(0);
}

/* BOTÓN AGREGAR - ESTILO VIDEO */
.btn-agregar {
    flex: 1;
    background: linear-gradient(135deg, #e91e63, #c2185b);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    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, #f06292, #e91e63);
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(233, 30, 99, 0.5);
}

/* Estados del botón */
.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 #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

.btn-agregar.added {
    background: #4caf50;
}

.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.1);
    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: #e91e63;
    transform: scale(1.1);
}

/* INFO DEL PRODUCTO */
.producto-info {
    padding: 20px;
}

.categoria-label {
    color: #e91e63;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: block;
}

.producto-nombre {
    margin-bottom: 10px;
    line-height: 1.4;
}

.producto-nombre a {
    color: white;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.producto-nombre a:hover {
    color: #e91e63;
}

/* RATING */
.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;
}

/* PRECIOS */
.producto-precio {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.precio-actual {
    color: white;
    font-size: 18px;
    font-weight: 700;
}

.precio-actual .woocommerce-Price-amount {
    color: white;
    font-size: 18px;
    font-weight: 700;
}

.precio-anterior {
    color: #666;
    font-size: 14px;
    text-decoration: line-through;
}

.precio-anterior .woocommerce-Price-amount {
    color: #666;
    font-size: 14px;
    text-decoration: line-through;
}

/* RESPONSIVE */
@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;
}

/* Ocultar precio duplicado de WooCommerce */
.producto-precio .woocommerce-Price-currencySymbol {
    display: inline;
}

.producto-precio del {
    display: none;
}

.producto-precio ins {
    text-decoration: none;
}

/* ============================================
   SINGLE PRODUCT & WISHLIST - ESTILOS
   ============================================ */

.liru-single-wrapper {
    width: 100%;
    margin: 0 auto;
}

.liru-single-container {
    max-width: 1200px;
    margin: 0 auto;
    color: #fff;
    padding: 0 20px;
}

.liru-single-main {
    display: flex;
    /* Changed from grid to flex for better control */
    flex-wrap: wrap;
    /* allow wrapping on small screens */
    gap: 60px;
    margin-bottom: 60px;
    align-items: flex-start;
}

.liru-single-image-col {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
    /* Constrain image width */
}

.liru-single-details-col {
    flex: 2;
    min-width: 300px;
}

.liru-main-image-box {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #1a1a1a;
    background: #141414;
    aspect-ratio: 1;
    cursor: pointer;
}

.liru-primary-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* WISHLIST ESTILOS (Sobre imagen en grid) */
.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: 45px;
    height: 45px;
    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(233, 30, 99, 0.2);
    border-color: #e91e63;
}

.liru-wishlist-toggle.active svg {
    fill: #e91e63;
    stroke: #e91e63;
    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;
}

/* INFO DETALLES Y VOLVER AL INICIO */
.liru-back-link {
    margin-bottom: 30px;
}

.liru-back-link a {
    color: #888;
    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;
}

.liru-breadcrumbs {
    font-size: 13px;
    color: #888;
    margin-bottom: 20px;
}

.liru-breadcrumbs a {
    color: #e91e63;
    text-decoration: none;
}

.liru-product-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 15px 0;
    line-height: 1.2;
}

/* PRECIOS */
.liru-single-price {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.liru-single-price .precio-actual {
    font-size: 32px;
    font-weight: bold;
}

.liru-single-price .precio-actual .woocommerce-Price-amount {
    font-size: 32px;
    font-weight: bold;
}

.liru-single-price .precio-anterior {
    font-size: 18px;
    color: #666;
    text-decoration: line-through;
}

.liru-single-price .precio-anterior .woocommerce-Price-amount {
    font-size: 18px;
    color: #666;
    text-decoration: line-through;
}

.liru-discount-pill {
    background: #331515;
    color: #ff5252;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid #ff5252;
    font-size: 12px;
    font-weight: bold;
}

.liru-mb {
    margin-bottom: 25px;
}

.liru-short-desc {
    color: #aaa;
    line-height: 1.6;
    font-size: 15px;
}

/* ATRIBUTOS Y PILLS */
.liru-attributes {
    margin-bottom: 30px;
}

.liru-attr-group {
    margin-bottom: 15px;
}

.liru-attr-name {
    display: block;
    margin-bottom: 8px;
    color: #888;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.liru-attr-values {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.liru-attr-pill {
    padding: 6px 16px;
    border: 1px solid #333;
    border-radius: 30px;
    font-size: 12px;
    flex: none;
    padding: 0 40px;
    height: 45px;
    border-radius: 30px;
    font-size: 15px !important;
    white-space: nowrap;
    background: #e91e63;
    /* Force background color */
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.liru-single-product-wrapper .liru-single-add-cart {
    flex: none !important;
    padding: 0 30px !important;
    height: 45px !important;
    border-radius: 30px !important;
    font-size: 15px !important;
    white-space: nowrap !important;
    background: #e91e63 !important;
    color: white !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;
}

.liru-single-add-cart:hover {
    background: #d81b60;
    transform: translateY(-2px);
}

.liru-action-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid #333;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.liru-single-product-wrapper .liru-action-btn {
    width: 45px !important;
    height: 45px !important;
    border-radius: 50% !important;
    background: transparent !important;
    border: 1px solid #333 !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: #e91e63 !important;
    color: #e91e63 !important;
}

/* Override position para single button in row */
.liru-single-product-wrapper .liru-wishlist-toggle.liru-wishlist-single {
    position: static !important;
    background: transparent !important;
    width: 45px !important;
    height: 45px !important;
}

/* FEATURES */
.liru-product-features {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding-top: 25px;
    border-top: 1px solid #222;
}

.liru-feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #888;
}

.liru-feature-item svg {
    width: 16px;
    height: 16px;
    color: #e91e63;
}

.liru-meta {
    display: none;
    /* Ocultar el SKU por defecto debajo para limpieza, o se puede habilitar */
}

/* SECTIONS (GALERÍA Y TABS) */
.liru-section-title {
    font-size: 24px;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 1px solid #222;
}

.liru-section-title span {
    color: #e91e63;
}

.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 #1a1a1a;
    position: relative;
}

.liru-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.liru-gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(233, 30, 99, 0.4);
    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 img {
    transform: scale(1.1);
}

.liru-gallery-item:hover .liru-gallery-overlay {
    opacity: 1;
}

.liru-product-tabs {
    margin-bottom: 50px;
}

.liru-tab-content {
    color: #bbb;
    line-height: 1.8;
}

.liru-tab-content h2,
.liru-tab-content h3 {
    color: #fff;
    margin-top: 20px;
}

.liru-tab-content p {
    margin-bottom: 15px;
}

/* MODAL GALERÍA */
.liru-gallery-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
}

.liru-modal-content {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
}

.liru-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.liru-modal-close:hover {
    color: #e91e63;
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0
    }

    to {
        transform: scale(1);
        opacity: 1
    }
}

/* WISHLIST GRID ALINEACIÓN */
.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: #e91e63;
    border-color: #e91e63;
    transform: scale(1.1);
}

/* RESPONSIVE SINGLE PRODUCT */
@media (max-width: 992px) {
    .liru-single-main {
        grid-template-columns: 1fr;
        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);
    }
}