/**
 * SX1 Product Browser Styles
 * Shortcode: [sx1_product_browser]
 */

/*
====== MAIN CONTAINER ======
*/
.sx1-product-browser {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 40px auto;
    width: 100%;
    max-width: 1480px; /* 360px sidebar + 40px gap + 1080px main */
    align-items: flex-start;
}

/*
====== SIDEBAR (Left Column) ======
*/
.sx1-browser-sidebar {
    flex: 0 0 360px;
    width: 360px;
    background-color: transparent;
    padding: 25px;
    border-radius: 8px;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.sx1-sidebar-title {
    font-size: 20px;
    font-weight: 700;
    color: #01a850;
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #01a850;
}

.sx1-category-list {
    list-style: none !important;
    padding: 0;
    margin: 0;
}

.sx1-category-item {
    margin-bottom: 8px;
}

.sx1-category-list .sx1-category-item:first-child a {
    font-weight: 600;
}

.sx1-category-item a {
    color: #444444 !important;
}

.sx1-category-item::marker {
    display: none !important;
}

.sx1-category-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    background-color: #ffffff;
    color: #01a850 !important;
    text-decoration: none;
    border-radius: 0px;
    font-size: 15px;
    font-weight: 400;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.sx1-category-link:hover {
    background-color: transparent;
    border-color: #01a850;
    color: #01a850 !important;
}

.sx1-category-item.active .sx1-category-link {
    color: #01a850 !important;
    font-weight: 400;
}

/* Újdonságok menüpont egyedi stílusa */

.sx1-category-item.sx1-category-new,
.sx1-category-link {
    position: relative;
}

.sx1-category-item.sx1-category-new .sx1-category-link,
.sx1-category-link.sx1-category-link-new {
    font-weight: 600;
    font-size: 16px;
}
.sx1-category-item.sx1-category-new .sx1-category-link::before,
.sx1-category-link.sx1-category-link-new::before {
    /*
    content: "!";
    font-weight: 600;
    font-size: 24px;
    display: inline;
    width: min-content;
    position: absolute;
    left: 10px;
    top: 5px;
    */
}

.sx1-cat-count {
    font-size: 13px;
    opacity: 0.8;
}

/*
====== MOBILE SELECT DROPDOWN ======
*/
.sx1-category-select-mobile {
    display: none; /* Hidden by default on desktop */
    width: 100%;
    padding: 12px 15px;
    font-size: 15px;
    font-weight: 500;
    color: #01a850;
    background-color: #ffffff;
    border: 2px solid #01a850;
    border-radius: 4px;
    text-transform: uppercase;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2301a850' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
    padding-right: 40px;
}

.sx1-category-select-mobile:focus {
    outline: none;
    border-color: #018a42;
    box-shadow: 0 0 0 3px rgba(1, 168, 80, 0.1);
}

.sx1-category-select-mobile option {
    padding: 10px;
    background-color: #ffffff;
    color: #333333;
}

/*
====== MAIN CONTENT AREA (Right Column) ======
*/
.sx1-browser-main {
    flex: 0 1 1080px;
    width: 100%;
    max-width: 1080px;
}

.sx1-browser-category-title {
    font-size: 42px;
    font-weight: 300;
    color: #01a850;
    margin: 0 0 30px 0;
    text-align: left;
}

/*
====== PRODUCT GRID ======
*/
.sx1-browser-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.sx1-no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    font-size: 16px;
    color: #666666;
    background-color: #f8f9fa;
    border-radius: 8px;
}

/* JavaScript Filter Mode: Hide by default, show based on filter */
.sx1-product-browser[data-mode="javascript"] .sx1-product-card {
    display: none;
}

.sx1-product-browser[data-mode="javascript"] .sx1-product-card.visible {
    display: flex;
}

/*
====== RESPONSIVE DESIGN ======
*/

/* Desktop/Laptop (1024px - 1599px) - Keep 3 columns, adjust spacing */
@media screen and (max-width: 1599px) {
    .sx1-product-browser {
        max-width: 100%;
        padding: 0 20px;
    }
}

/* Large Tablet/Small Desktop (1200px - 1479px) */
@media screen and (max-width: 1479px) {
    .sx1-browser-sidebar {
        flex: 0 0 300px;
        width: 300px;
    }
    
    .sx1-product-browser {
        max-width: 100%;
        gap: 30px;
    }
}

/* Tablet Large (900px - 1199px) - Grid goes to 2 columns */
@media screen and (max-width: 1199px) {
    .sx1-product-browser {
        gap: 25px;
        padding: 0 15px;
    }
    
    .sx1-browser-sidebar {
        flex: 0 0 260px;
        width: 260px;
        padding: 20px;
    }
    
    .sx1-browser-main {
        flex: 1 1 auto;
        max-width: none;
    }
    
    .sx1-browser-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .sx1-browser-category-title {
        font-size: 36px;
    }
}

/* Tablet (768px - 899px) - Grid goes to 2 columns, tighter spacing */
@media screen and (max-width: 899px) {
    .sx1-product-browser {
        gap: 20px;
        padding: 0 15px;
    }
    
    .sx1-browser-sidebar {
        flex: 0 0 240px;
        width: 240px;
        padding: 15px;
    }
    
    .sx1-browser-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .sx1-browser-category-title {
        font-size: 32px;
        margin-bottom: 20px;
    }
}

/* Mobile (under 768px) - Sidebar moves to top, grid goes to 1 column */
@media screen and (max-width: 767px) {
    .sx1-product-browser {
        flex-direction: column;
        gap: 30px;
        margin: 20px 0;
        padding: 0 15px;
    }
    
    .sx1-browser-sidebar {
        position: static;
        flex: 0 0 auto;
        max-width: none;
        width: 100%;
        padding: 15px;
        order: -1;
    }
    
    /* Show select, hide list on mobile */
    .sx1-category-select-mobile {
        display: block;
        margin-bottom: 0;
    }
    
    .sx1-category-list {
        display: none;
    }
    
    .sx1-sidebar-title {
        font-size: 18px;
    }
    
    .sx1-category-link {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .sx1-browser-main {
        max-width: none;
        width: 100%;
    }
    
    .sx1-browser-category-title {
        font-size: 28px;
        margin-bottom: 15px;
    }
    
    .sx1-browser-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* Small Mobile (under 480px) */
@media screen and (max-width: 479px) {
    .sx1-browser-category-title {
        font-size: 24px;
    }
    
    .sx1-browser-grid {
        grid-template-columns: 1fr;
    }
}

/*
====== LOADING STATE (JavaScript Mode) ======
*/
.sx1-product-browser.loading .sx1-browser-grid::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #01a850;
    border-radius: 50%;
    animation: sx1-spin 1s linear infinite;
}

@keyframes sx1-spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/*
====== ADMIN CARD STYLING ======
*/
.sx1-admin-card {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.sx1-admin-card h3 {
    margin-top: 0;
    color: #01a850;
    font-size: 18px;
    border-bottom: 2px solid #01a850;
    padding-bottom: 10px;
}

.sx1-admin-card p {
    color: #666666;
    font-size: 14px;
}

.sx1-admin-card .form-table th {
    padding-left: 0;
}

