/* Productos Grid Styles */
.jls-productos-grid {
    margin: 20px 0;
}

/* Sidebar Layout */
.jls-productos-grid.has-sidebar {
    display: flex;
    align-items: flex-start;
    gap: 30px;
}

.jls-productos-grid.has-sidebar.sidebar-right {
    flex-direction: row-reverse;
}

.jls-productos-grid.has-sidebar .jls-pg-filters-container {
    flex: 0 0 280px;
    margin-bottom: 0;
    position: sticky;
    top: 20px;
}

.jls-productos-grid.has-sidebar .jls-pg-main-content {
    flex: 1;
    min-width: 0;
}

@media (max-width: 768px) {

    .jls-productos-grid.has-sidebar,
    .jls-productos-grid.has-sidebar.sidebar-right {
        flex-direction: column;
    }

    .jls-productos-grid.has-sidebar .jls-pg-filters-container {
        flex: none;
        width: 100%;
        position: static;
        margin-bottom: 30px;
    }

    .jls-productos-grid.has-sidebar .jls-pg-main-content {
        width: 100%;
        flex: none;
    }
}

.jls-pg-items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 900px) {
    .jls-pg-items {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 600px) {
    .jls-pg-items {
        display: grid !important;
        grid-template-columns: 1fr !important;
        width: 100% !important;
        margin: 0 !important;
    }

    .jls-product-card {
        width: 100% !important;
    }
}

.jls-product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.jls-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.jls-product-card-image {
    position: relative;
    width: 100%;
    padding-top: 75%;
    /* 4:3 Aspect Ratio */
    background: #f5f5f5;
    overflow: hidden;
}

.jls-product-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.jls-product-card:hover .jls-product-card-image img {
    transform: scale(1.05);
}

.jls-product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.jls-product-card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.jls-product-title {
    margin: 0 0 15px;
    font-size: 20px;
    line-height: 1.3;
}

.jls-product-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.jls-product-title a:hover {
    color: #0073aa;
}

.jls-product-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    color: #666;
    margin-top: auto;
}

.jls-product-meta .meta-item strong {
    color: #333;
}

.jls-pg-pagination {
    margin-top: 40px;
    text-align: center;
}

.jls-pg-pagination .page-numbers {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 4px;
    background: #fff;
    border: 1px solid #ddd;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
}

.jls-pg-pagination .page-numbers:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.jls-pg-pagination .page-numbers.current {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

/* Modal Popup Styles */
.jls-product-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.jls-product-popup-modal {
    position: relative;
    background: #fff;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.jls-popup-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #333;
    cursor: pointer;
    z-index: 10;
}

.jls-popup-content-wrap {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.jls-popup-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    font-size: 18px;
    color: #666;
}

.jls-product-card-action {
    margin-top: 20px;
    text-align: center;
}

.jls-product-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #0073aa;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.jls-product-btn:hover {
    background: #005177;
    color: #fff;
}