/* ==========================================
   SHOP FILTERS CSS
   Plik: assets/css/shop-filters.css
   ========================================== */

/* ==========================================
   WRAPPER
   ========================================== */
.shop-archive-wrapper {
    position: relative;
    padding: 40px 0;
}

.shop-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 30px;
}

/* ==========================================
   MOBILE FILTERS TRIGGER (STICKY)
   ========================================== */
.mobile-filters-trigger {
    display: none; /* Pokaż tylko na mobile */
    position: sticky;
    top: 74px;
    z-index: 89;
    background: #FFFFFF;
    padding: 15px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mobile-filters-button {
    width: 100%;
    height: 48px;
    background: #FDA635;
    border: none;
    border-radius: 50px;
    color: #FFFFFF;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-filters-button:hover {
    background: #FF6B35;
}

.mobile-filters-button svg {
    width: 20px;
    height: 20px;
}

/* ==========================================
   SIDEBAR - FILTRY
   ========================================== */
.shop-sidebar {
    width: 260px;
    flex-shrink: 0;
}

.sidebar-close-mobile {
    display: none; /* Pokaż tylko na mobile */
}

/* Filter Block */
.filter-block {
    background: #FFFFFF;
    border-radius: 10px;
    margin-bottom: 20px;
    overflow: hidden;
}

.filter-header {
    background: #FDA635;
    padding: 15px 20px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.filter-header h3 {
    margin: 0;
    color: #FFFFFF;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 600;
}

.filter-content {
    padding: 20px;
}

/* Categories List */
.categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.categories-list li {
    margin-bottom: 10px;
}

.category-item {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 300;
    color: #333333;
    text-decoration: none;
    transition: color 0.3s ease;
    padding: 4px 0;
}

.category-item:hover {
    color: #FDA635;
}

.category-parent {
    font-size: 14px !important;
    font-weight: 400 !important;
    margin-bottom: 8px;
}

.category-parent strong {
    font-weight: 400;
}

.categories-children {
    list-style: none;
    padding-left: 15px;
    margin-top: 8px;
}

.cat-count {
    color: #999999;
    font-size: 10px;
}

/* Checkboxy */
.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 300;
    color: #333333;
}

.filter-checkbox input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 12px;
    height: 12px;
    border: 1px solid #E5E5E5;
    border-radius: 1px;
    background: #FFFFFF;
    position: relative;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.filter-checkbox input[type="checkbox"]:checked + .checkbox-custom {
    background: #FDA635;
    border-color: #FDA635;
}

.filter-checkbox input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #FFFFFF;
    font-size: 10px;
    font-weight: bold;
}

.checkbox-label {
    flex: 1;
}

/* ==========================================
   MAIN CONTENT
   ========================================== */
.shop-main {
    flex: 1;
    position: relative;
}

/* Breadcrumb */
.shop-breadcrumb {
    margin-bottom: 24px;
}

.breadcrumb-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.breadcrumb-back {
    width: 40px;
    height: 40px;
    background: #FFFFFF;
    border: 1px solid #E5E5E5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.breadcrumb-back:hover {
    background: #FDA635;
    border-color: #FDA635;
}

.breadcrumb-back:hover svg path {
    stroke: #FFFFFF;
}

.breadcrumb-trail {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #666666;
}

.breadcrumb-trail a {
    color: #333333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-trail a:hover {
    color: #FDA635;
}

.breadcrumb-trail .separator {
    margin: 0 8px;
    color: #999999;
}

.breadcrumb-trail .current {
    color: #FDA635;
    font-weight: 500;
}

/* Header */
.shop-header {
    margin-bottom: 30px;
}

.shop-title {
    font-family: 'Poppins', sans-serif;
    font-size: 36px;
    font-weight: 800;
    color: #333333;
    margin: 0 0 16px 0;
}

.shop-description {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #333333;
    line-height: 1.6;
}

/* Toolbar */
.shop-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 20px;
}

.results-count {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #333333;
}

.shop-sorting {
    position: relative;
}

.orderby-select {
    height: 39px;
    padding: 0 40px 0 20px;
    border: 1px solid #E5E5E5;
    border-radius: 50px;
    background: #FFFFFF;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #333333;
    cursor: pointer;
    appearance: none;
    transition: all 0.3s ease;
}

.orderby-select:hover {
    border-color: #FDA635;
}

.orderby-select:focus {
    outline: none;
    border-color: #FDA635;
}

.shop-sorting::after {
    content: '';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #FDA635;
    pointer-events: none;
}

/* Loading Overlay */
.shop-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.shop-loading .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #FDA635;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================
   GRID PRODUKTÓW
   ========================================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.products-grid .custom-product-card {
    justify-self: center;
}

.no-products {
    text-align: center;
    padding: 60px 20px;
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    color: #666666;
}

/* ==========================================
   PAGINACJA
   ========================================== */
.shop-pagination {
    margin-top: 40px;
}

.pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.pagination-prev,
.pagination-next {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 300;
    color: #666666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.pagination-prev:hover,
.pagination-next:hover {
    color: #FDA635;
}

.pagination-prev.disabled,
.pagination-next.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pagination-number {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 300;
    color: #333333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination-number:hover {
    background: #FFF3E6;
    color: #FDA635;
}

.pagination-number.active {
    background: #FDA635;
    color: #FFFFFF;
    font-weight: 500;
}

.pagination-dots {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    color: #333333;
}

/* ==========================================
   RESPONSYWNOŚĆ
   ========================================== */

/* Tablet (768px - 1023px) */
@media screen and (max-width: 1023px) {
    .shop-container {
        gap: 24px;
    }
    
    .shop-sidebar {
        width: 220px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .shop-title {
        font-size: 28px;
    }
}

/* Mobile (do 767px) */
@media screen and (max-width: 767px) {
    .shop-archive-wrapper {
        padding: 0;
    }
    
    /* Pokaż mobile trigger */
    .mobile-filters-trigger {
        display: block;
    }
    
    /* Sidebar jako drawer */
    .shop-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 300px;
        height: 100vh;
        background: #FFFFFF;
        z-index: 10000;
        overflow-y: auto;
        transition: left 0.3s ease;
        padding: 20px;
    }
    
    .shop-sidebar.active {
        left: 0;
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3);
    }
    
    /* Overlay */
    .shop-sidebar.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }
    
    /* Close button */
    .sidebar-close-mobile {
        display: block;
        position: absolute;
        padding:0 !important;
        top: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        background:none;
        border: none;
        border-radius: 50%;
        cursor: pointer;
        transition: background 0.3s ease;
    }
    
    .sidebar-close-mobile:hover {
        background: #FDA635;
    }
    
    .sidebar-close-mobile svg {
        stroke: #333333;
        color:white;
    }
    
    .sidebar-close-mobile:hover svg {
        stroke: #FFFFFF;
    }
    
    .shop-container {
        flex-direction: column;
        padding: 20px 15px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .shop-title {
        font-size: 24px;
    }
    
    .shop-description {
        font-size: 13px;
    }
    
    .shop-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .orderby-select {
        width: 100%;
    }
    
    .breadcrumb-wrapper {
        flex-wrap: wrap;
    }
    
    .breadcrumb-trail {
        font-size: 12px;
    }
    
    .pagination-wrapper {
        flex-wrap: wrap;
    }
}
/* ==========================================
   BRAND FILTER (3 kolumny, loga)
========================================== */
.filter-brands .filter-content {
    padding: 0; /* Usuń padding dla grid */
}

.brand-filter-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.brand-filter-item {
    position: relative;
    cursor: pointer;
    display: block;
}

.brand-filter-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.brand-filter-logo {
    width: 100%;
    aspect-ratio: 1;
    border: 1px dashed transparent;
    border-radius: 8px;
    transition: border-color 0.2s ease;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

/* Zaznaczony - pomarańczowa obramówka */
.brand-filter-item input:checked + .brand-filter-logo {
    border-color: #FDA635;
    border-style: dashed;
}

/* Hover */
.brand-filter-item:hover .brand-filter-logo {
    border-color: #FDA635;
    border-style: solid;
}