/**
 * Elementor Modern Carousel - WooCommerce Grid Styles
 */

/* Variables */
.emc-grid-wrapper {
    --grid-columns: 4;
    --grid-gap: 20px;
    --transition-speed: 300ms;
}

/* Filters */
.emc-grid-filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px 0;
    margin-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

/* Filtros Sticky - funciona en todos los dispositivos */
.emc-grid-filters.emc-filters-sticky {
    position: -webkit-sticky;
    position: sticky;
    top: var(--emc-sticky-offset-desktop, 60px);
    z-index: 999;
    background: #fff;
    padding: 15px 20px;
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 20px;
    padding-right: 20px;
}

/* Asegurar que el wrapper permita sticky */
.emc-grid-wrapper {
    overflow: visible !important;
}

.emc-filters-left,
.emc-filters-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.emc-filter-dropdown {
    padding: 12px 40px 12px 16px;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px solid #e8e8e8;
    border-radius: 6px;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 180px;
    color: #333 !important;
    -webkit-text-fill-color: #333 !important;
}

.emc-filter-dropdown:invalid,
.emc-filter-dropdown option[value=""][disabled] {
    color: #999 !important;
    -webkit-text-fill-color: #999 !important;
}

.emc-filter-dropdown option[value=""] {
    color: #999 !important;
    font-style: italic;
    display: block;
}

/* Ajuste de altura de línea para modos con fondo personalizado en el select */
select.emc-filter-dropdown.__text_mode_custom_bg__ {
    line-height: 1 !important;
}

.emc-filter-dropdown option {
    color: #333 !important;
    background: #fff !important;
    padding: 10px;
}

.emc-filter-dropdown option:first-child,
.emc-filter-dropdown option[value=""] {
    color: #999 !important;
    font-style: italic;
}

.emc-filter-dropdown:hover {
    border-color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.emc-filter-dropdown:focus {
    border-color: #333;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.emc-filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.emc-filter-btn {
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px solid #e8e8e8;
    border-radius: 30px;
    background: #fff;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.emc-filter-btn:hover {
    border-color: #333;
    color: #333;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.emc-filter-btn.active {
    background: #333;
    border-color: #333;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.emc-results-count {
    font-size: 14px;
    font-weight: 500;
    color: #666;
    padding: 8px 0;
}

.emc-view-toggle {
    display: flex;
    gap: 5px;
}

.emc-view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid #e0e0e0;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #999;
}

.emc-view-btn:hover,
.emc-view-btn.active {
    border-color: #333;
    color: #333;
}

/* Grid */
.emc-grid {
    display: grid;
    grid-template-columns: repeat(var(--grid-columns), 1fr);
    gap: var(--grid-gap);
}

.emc-grid.emc-view-list {
    grid-template-columns: 1fr;
}

.emc-grid.emc-view-list .emc-grid-item {
    display: flex;
    flex-direction: row;
}

.emc-grid.emc-view-list .emc-grid-image-wrapper {
    width: 250px;
    flex-shrink: 0;
}

.emc-grid.emc-view-list .emc-grid-content {
    flex: 1;
    padding: 20px;
}

/* Grid Item */
.emc-grid-item {
    position: relative;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow var(--transition-speed) ease, transform var(--transition-speed) ease;
}

.emc-hover-shadow .emc-grid-item:hover {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.emc-equal-height .emc-grid-item {
    display: flex;
    flex-direction: column;
}

.emc-equal-height .emc-grid-content {
    flex: 1;
}

/* Image */
.emc-grid-image-wrapper {
    position: relative;
    overflow: hidden;
}

.emc-grid-image {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    background: #f5f5f5;
}

.emc-grid-image img,
.emc-grid-image video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: opacity 0.3s ease, transform 0.5s ease;
}

.emc-gallery-img,
.emc-gallery-video {
    opacity: 0;
}

.emc-gallery-img.active,
.emc-gallery-video.active {
    opacity: 1;
}

/* Hover Effects */
.emc-hover-zoom .emc-grid-item:hover .emc-gallery-img.active,
.emc-hover-zoom .emc-grid-item:hover .emc-gallery-video.active {
    transform: scale(1.08);
}

.emc-hover-brightness .emc-grid-item:hover .emc-gallery-img.active {
    filter: brightness(1.1);
}

/* Gallery Segments */
.emc-gallery-segments {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    display: flex;
}

.emc-segment {
    flex: 1;
    cursor: pointer;
}

/* Gallery Dots */
.emc-gallery-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 15;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.emc-grid-item:hover .emc-gallery-dots {
    opacity: 1;
}

.emc-gallery-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
}

.emc-gallery-dot:hover,
.emc-gallery-dot.active {
    background: #fff;
    transform: scale(1.3);
}

/* Badges */
.emc-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 5;
}

.emc-badge {
    display: inline-block;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    border-radius: 4px;
}

.emc-badge-sale { background: #e53935; }
.emc-badge-new { background: #43a047; }
.emc-badge-out-of-stock { background: #757575; }
.emc-badge-featured { background: #ff9800; }

/* Tags */
.emc-product-tags {
    position: absolute;
    bottom: 12px;
    left: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    z-index: 5;
}

.emc-product-tag {
    padding: 4px 8px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border-radius: 3px;
}

/* Quick View Button Positions */
.emc-quick-view-btn-wrapper {
    position: absolute;
    z-index: 15;
}

.emc-qv-position-top_right {
    top: 12px;
    right: 12px;
}

.emc-qv-position-top_left {
    top: 12px;
    left: 12px;
}

.emc-qv-position-below_image {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 12px;
    background: #fff;
    border-top: 1px solid #e8e8e8;
}

.emc-qv-position-below_image .emc-quick-view-btn {
    margin: 0 auto;
}

/* Add to Cart Button Positions */
.emc-add-to-cart-btn-wrapper {
    position: absolute;
    z-index: 15;
}

.emc-cart-position-top_right {
    top: 12px;
    right: 12px;
}

.emc-cart-position-top_left {
    top: 12px;
    left: 12px;
}

.emc-cart-position-bottom_right {
    bottom: 12px;
    right: 12px;
}

.emc-cart-position-bottom_left {
    bottom: 12px;
    left: 12px;
}

/* Estilo del botón del carrito en posiciones de esquina */
.emc-add-to-cart-btn-wrapper .button,
.emc-add-to-cart-btn-wrapper .add_to_cart_button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
    font-size: 0;
    line-height: 0;
    text-indent: -9999px;
    overflow: hidden;
    position: relative;
}

.emc-add-to-cart-btn-wrapper .button::before,
.emc-add-to-cart-btn-wrapper .add_to_cart_button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Ccircle cx='9' cy='21' r='1'%3E%3C/circle%3E%3Ccircle cx='20' cy='21' r='1'%3E%3C/circle%3E%3Cpath d='M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.emc-add-to-cart-btn-wrapper .button:hover,
.emc-add-to-cart-btn-wrapper .add_to_cart_button:hover {
    background: #333;
    border-color: #333;
    color: #fff;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.emc-add-to-cart-btn-wrapper .button *,
.emc-add-to-cart-btn-wrapper .add_to_cart_button * {
    display: none !important;
}

.emc-qv-image-trigger {
    cursor: pointer;
}

/* Hover Actions */
.emc-hover-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 10;
}

.emc-grid-item:hover .emc-hover-actions {
    opacity: 1;
    transform: translateY(0);
}

.emc-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.emc-action-btn svg {
    width: 20px;
    height: 20px;
    display: block;
}

.emc-action-btn:hover {
    background: #333;
    border-color: #333;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.emc-action-btn-text {
    padding: 12px 24px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.emc-action-btn-text:hover {
    background: #333;
    border-color: #333;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Content */
.emc-grid-content {
    padding: 15px 0;
}

.emc-grid-title {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
}

.emc-grid-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.emc-grid-title a:hover {
    color: #666;
}

.emc-grid-rating {
    margin-bottom: 8px;
}

.emc-grid-rating .star-rating {
    font-size: 12px;
}

.emc-grid-price {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.emc-grid-price .amount,
.emc-grid-price .woocommerce-Price-amount {
    color: inherit;
}

.emc-grid-price del {
    opacity: 0.6;
    margin-right: 8px;
    color: #999;
}

.emc-grid-price del .amount,
.emc-grid-price del .woocommerce-Price-amount {
    color: inherit;
}

.emc-grid-price ins {
    text-decoration: none;
    color: #e53935;
}

.emc-grid-price ins .amount,
.emc-grid-price ins .woocommerce-Price-amount {
    color: inherit;
}

.emc-grid-add-to-cart {
    margin-top: 12px;
}

.emc-grid-add-to-cart .button,
.emc-grid-add-to-cart .add_to_cart_button {
    width: 100%;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    line-height: 1.2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: relative;
}

.emc-grid-add-to-cart .button:hover,
.emc-grid-add-to-cart .add_to_cart_button:hover {
    background: #333;
    border-color: #333;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.emc-grid-add-to-cart .button:disabled,
.emc-grid-add-to-cart .add_to_cart_button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Botón de carrito en hover actions - estilo circular como quick view */
.emc-hover-actions .button,
.emc-hover-actions .add_to_cart_button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
    font-size: 0;
    line-height: 0;
    position: relative;
}

.emc-hover-actions .button::before,
.emc-hover-actions .add_to_cart_button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Ccircle cx='9' cy='21' r='1'%3E%3C/circle%3E%3Ccircle cx='20' cy='21' r='1'%3E%3C/circle%3E%3Cpath d='M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.emc-hover-actions .button:hover,
.emc-hover-actions .add_to_cart_button:hover {
    background: #333;
    border-color: #333;
    color: #fff;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.emc-hover-actions .button:disabled,
.emc-hover-actions .add_to_cart_button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Ocultar texto del botón en hover actions */
.emc-hover-actions .button,
.emc-hover-actions .add_to_cart_button {
    font-size: 0 !important;
    line-height: 0 !important;
    text-indent: -9999px;
    overflow: hidden;
}

.emc-hover-actions .button *,
.emc-hover-actions .add_to_cart_button * {
    display: none !important;
}

/* En móvil, hacer que el botón debajo del contenido también sea circular con ícono */
@media (max-width: 767px) {
    .emc-grid-add-to-cart .button,
    .emc-grid-add-to-cart .add_to_cart_button {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        padding: 0 !important;
        border-radius: 50% !important;
        font-size: 0 !important;
        line-height: 0 !important;
        text-indent: -9999px;
        overflow: hidden;
        position: relative;
    }
    
    .emc-grid-add-to-cart .button::before,
    .emc-grid-add-to-cart .add_to_cart_button::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 20px;
        height: 20px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Ccircle cx='9' cy='21' r='1'%3E%3C/circle%3E%3Ccircle cx='20' cy='21' r='1'%3E%3C/circle%3E%3Cpath d='M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6'%3E%3C/path%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: center;
        background-size: contain;
    }
    
    .emc-grid-add-to-cart .button *,
    .emc-grid-add-to-cart .add_to_cart_button * {
        display: none !important;
    }
    
    .emc-grid-add-to-cart {
        display: flex;
        justify-content: center;
        margin-top: 12px;
    }
}

/* Ocultar botón "Ver carrito" después de agregar */
.emc-grid-add-to-cart .added_to_cart.wc-forward,
.emc-qv-add-to-cart .added_to_cart.wc-forward {
    display: none !important;
}

/* Overlay Content */
.emc-grid-overlay {
    position: absolute;
    left: 0;
    right: 0;
    padding: 20px;
    pointer-events: none;
    z-index: 5;
}

.emc-content-overlay-bottom {
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
}

.emc-content-overlay-center {
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.4);
}

.emc-grid-overlay .emc-grid-title,
.emc-grid-overlay .emc-grid-title a,
.emc-grid-overlay .emc-grid-price {
    color: #fff;
}

/* Pagination */
.emc-grid-pagination {
    margin-top: 40px;
    text-align: center;
}

.emc-grid-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    margin: 0 3px;
    font-size: 14px;
    border: 1px solid #e0e0e0;
    background: #fff;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
}

.emc-grid-pagination .page-numbers:hover,
.emc-grid-pagination .page-numbers.current {
    background: #333;
    border-color: #333;
    color: #fff;
}

.emc-load-progress {
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.emc-load-more-btn {
    padding: 14px 40px;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    border-radius: 4px;
    background: #333;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.emc-load-more-btn:hover {
    background: #555;
}

.emc-load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.emc-infinite-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    color: #666;
}

/* Loader overlay para filtros */
.emc-grid-loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.emc-grid-loader-overlay.active {
    opacity: 1;
    visibility: visible;
}

.emc-grid-loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.emc-grid-loader-content span {
    font-size: 14px;
    font-weight: 500;
    color: #666;
}

.emc-grid-loader-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e0e0e0;
    border-top-color: #333;
    border-radius: 50%;
    animation: emc-spin 0.8s linear infinite;
}

/* Asegurar que el contenedor del grid tenga position relative */
.emc-grid-wrapper {
    position: relative;
}

.emc-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #e0e0e0;
    border-top-color: #333;
    border-radius: 50%;
    animation: emc-spin 0.8s linear infinite;
}

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

/* Quick View */
.emc-quick-view-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.emc-quick-view-overlay.active,
.emc-quick-view-overlay.loading {
    opacity: 1;
    visibility: visible;
}

.emc-quick-view-overlay.loading .emc-quick-view-modal {
    display: flex;
    align-items: center;
    justify-content: center;
}

.emc-quick-view-modal {
    position: relative;
    width: 100%;
    max-width: 1100px;
    max-height: 90vh;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.95) translateY(20px);
    transition: transform 0.3s ease;
}

.emc-quick-view-overlay.active .emc-quick-view-modal {
    transform: scale(1) translateY(0);
}

.emc-quick-view-close,
.emc-qv-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.emc-quick-view-close:hover,
.emc-qv-close:hover {
    background: #fff;
    transform: rotate(90deg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.emc-quick-view-content,
.emc-qv-content {
    display: flex;
    max-height: 90vh;
    overflow: hidden;
}

.emc-qv-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    width: 100%;
}

/* Gallery */
.emc-qv-gallery-wrapper {
    width: 55%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: #f8f8f8;
    position: relative;
}

.emc-qv-gallery-main {
    position: relative;
    flex: 1;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emc-qv-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 70px; /* Espacio para las flechas */
}

.emc-qv-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.emc-qv-main-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
}

.emc-qv-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    padding: 0;
    flex-shrink: 0;
}

.emc-qv-nav svg {
    width: 20px;
    height: 20px;
    display: block;
    flex-shrink: 0;
}

.emc-qv-nav:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.emc-qv-nav-prev {
    left: 15px;
}

.emc-qv-nav-next {
    right: 15px;
}

.emc-qv-thumbnails {
    display: flex;
    gap: 12px;
    padding: 20px;
    overflow-x: auto;
    border-top: 1px solid #e8e8e8;
    background: #fff;
}

.emc-qv-thumbnails::-webkit-scrollbar {
    height: 4px;
}

.emc-qv-thumbnails::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 2px;
}

.emc-qv-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f5f5f5;
}

.emc-qv-thumb:hover {
    border-color: #ddd;
    transform: translateY(-2px);
}

.emc-qv-thumb.active {
    border-color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.emc-qv-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Info */
.emc-qv-info {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.emc-qv-title {
    margin: 0 0 20px;
    font-size: 28px;
    font-weight: 600;
    line-height: 1.3;
    color: #1a1a1a;
}

.emc-qv-price-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.emc-qv-price {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
}

.emc-qv-price del {
    opacity: 0.5;
    margin-right: 10px;
    font-size: 20px;
    font-weight: 400;
}

.emc-qv-price ins {
    text-decoration: none;
    color: #e53935;
}

.emc-qv-stock {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
}

.emc-qv-stock.emc-qv-in-stock {
    background: #e8f5e9;
    color: #2e7d32;
}

.emc-qv-stock.emc-qv-out-of-stock {
    background: #ffebee;
    color: #c62828;
}

.emc-qv-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.emc-qv-rating-count {
    font-size: 14px;
    color: #666;
}

.emc-qv-description {
    margin-bottom: 30px;
    font-size: 15px;
    line-height: 1.7;
    color: #555;
}

.emc-qv-add-to-cart {
    margin-bottom: 30px;
    padding: 25px;
    background: #f8f8f8;
    border-radius: 12px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.emc-qv-add-to-cart .quantity {
    margin-right: 0;
    display: flex;
    align-items: center;
}

.emc-qv-add-to-cart .quantity input {
    padding: 12px;
    border: 2px solid #e8e8e8;
    border-radius: 6px;
    font-size: 16px;
    text-align: center;
    min-width: 60px;
}

.emc-qv-add-to-cart .single_add_to_cart_button,
.emc-qv-add-to-cart .button,
.emc-qv-add-to-cart .add_to_cart_button {
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px solid #333;
    border-radius: 6px;
    background: #333;
    color: #fff;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
    min-height: 48px;
    vertical-align: middle;
    cursor: pointer;
    text-align: center;
}

.emc-qv-add-to-cart .single_add_to_cart_button:hover,
.emc-qv-add-to-cart .button:hover,
.emc-qv-add-to-cart .add_to_cart_button:hover {
    background: #555;
    border-color: #555;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.emc-qv-add-to-cart .single_add_to_cart_button:disabled,
.emc-qv-add-to-cart .button:disabled,
.emc-qv-add-to-cart .add_to_cart_button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.emc-qv-meta {
    margin-top: auto;
    padding-top: 25px;
    border-top: 1px solid #e8e8e8;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.emc-qv-meta-item {
    display: flex;
    gap: 10px;
    font-size: 14px;
    color: #666;
}

.emc-qv-meta-item strong {
    font-weight: 600;
    color: #333;
    min-width: 80px;
}

.emc-qv-link,
.emc-qv-view-product {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.emc-qv-link:hover,
.emc-qv-view-product:hover {
    color: #666;
    gap: 12px;
}

.emc-qv-link svg,
.emc-qv-view-product svg {
    transition: transform 0.3s ease;
}

.emc-qv-link:hover svg,
.emc-qv-view-product:hover svg {
    transform: translateX(4px);
}

/* Responsive */
@media (max-width: 1024px) {
    .emc-grid-wrapper { --grid-columns: 3; }
    .emc-grid-image { height: 260px; }
}

@media (max-width: 767px) {
    .emc-grid-wrapper { --grid-columns: 2; }
    .emc-grid-image { height: 220px; }
    
    /* Filtros en móvil - en fila, juntos */
    .emc-grid-filters {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 10px !important;
        padding: 12px 0 !important;
        margin-bottom: 15px;
    }
    
    /* Ajustes sticky en móvil */
    .emc-grid-filters.emc-filters-sticky {
        top: var(--emc-sticky-offset-mobile, 50px);
        margin-left: -15px;
        margin-right: -15px;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    /* Los filtros individuales en fila */
    .emc-filters-left {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 10px !important;
        flex: 1;
    }
    
    /* Ocultar el contenedor derecho si está vacío o solo tiene el contador */
    .emc-filters-right {
        display: none;
    }
    
    .emc-filters-right:has(.emc-view-toggle) {
        display: flex;
    }
    
    /* Cada filtro ocupa espacio igual */
    .emc-filter {
        flex: 1;
        min-width: 0;
    }
    
    .emc-filter-dropdown {
        width: 100%;
        flex: 1;
        min-width: 0;
        padding: 10px 35px 10px 12px;
        font-size: 13px;
    }
    
    .emc-quick-view-content,
    .emc-qv-content {
        flex-direction: column;
    }
    
    .emc-qv-gallery-wrapper {
        width: 100%;
    }
    
    .emc-qv-gallery-main {
        min-height: 300px;
    }
    
    .emc-qv-info {
        padding: 25px;
    }
    
    .emc-qv-title {
        font-size: 22px;
    }
    
    .emc-qv-price {
        font-size: 20px;
    }
    
    .emc-qv-thumbnails {
        padding: 15px;
        gap: 8px;
    }
    
    .emc-qv-thumb {
        width: 60px;
        height: 60px;
    }
    
    .emc-grid.emc-view-list .emc-grid-item {
        flex-direction: column;
    }
    
    .emc-grid.emc-view-list .emc-grid-image-wrapper {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .emc-grid-wrapper { --grid-columns: 1; }
    .emc-grid-image { height: 280px; }
}

/* Accessibility */
.emc-quick-view-btn:focus,
.emc-filter-btn:focus,
.emc-view-btn:focus,
.emc-load-more-btn:focus {
    outline: 2px solid #333;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .emc-grid-item,
    .emc-gallery-img,
    .emc-gallery-video,
    .emc-quick-view-overlay,
    .emc-quick-view-modal,
    .emc-hover-actions {
        transition: none;
    }
    
    .emc-spinner {
        animation: none;
    }
}

/* No Products */
.emc-no-products {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 16px;
    background: #f9f9f9;
    border-radius: 8px;
}
