/* =============================================
   Envirapack — products.css
   Sidebar, filter, produktlayout, toolbar, paginering
   ============================================= */

/* --- Produktlayout --- */
.products-layout {
    padding: 0 0 56px;
}
.products-wrapper {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}
.filter-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 16px;
    color: var(--text);
}

/* --- Sidebar --- */
.sidebar {
    width: 240px;
    flex-shrink: 0;
    position: sticky;
    top: calc(var(--header-height) + 16px);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.sidebar-header h3 {
    font-size: 17px;
    font-weight: 600;
}
.sidebar-close {
    display: none;
    color: var(--text-light);
    padding: 4px;
}
.filter-group {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}
.filter-group:last-of-type {
    border-bottom: none;
    margin-bottom: 16px;
    padding-bottom: 0;
}
.filter-group h4 {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    margin-bottom: 12px;
}
.filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    padding: 5px 0;
    cursor: pointer;
    color: var(--text);
    transition: color 0.2s;
}
.filter-option:hover {
    color: var(--primary);
}
.filter-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
}
.btn-reset-filter {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-light);
    text-align: center;
    transition: all 0.2s;
}
.btn-reset-filter:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Filterlänkar (ersätter checkboxar) */
a.filter-option {
    display: block;
    text-decoration: none;
    font-size: 14px;
    padding: 5px 0;
    color: var(--text);
    transition: color 0.2s;
}
a.filter-option:hover {
    color: var(--primary);
}
a.filter-option.active {
    color: var(--primary);
    font-weight: 600;
}

/* --- Produktinnehåll --- */
.products-main {
    flex: 1;
    min-width: 0;
}
.products-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.products-count {
    font-size: 14px;
    color: var(--text-light);
}
.products-sort {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}
.products-sort label {
    color: var(--text-light);
}
.products-sort select {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    cursor: pointer;
}

/* --- Paginering --- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}
.pagination-current {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
}
.pagination-link {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--text);
    transition: all 0.2s;
}
.pagination-link:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.pagination-next {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--primary);
    transition: color 0.2s;
}
.pagination-next:hover {
    color: var(--accent);
}

/* --- Produktspecifikationer --- */
.product-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}
.spec-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-light);
    background: var(--bg);
    padding: 4px 8px;
    border-radius: 4px;
    letter-spacing: 0.01em;
    line-height: 1;
}
.spec-item svg {
    flex-shrink: 0;
    opacity: 0.5;
}

/* =============================================
   Responsiv — products
   ============================================= */
@media (max-width: 768px) {
    .filter-toggle {
        display: flex;
    }

    .sidebar {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 999;
        border-radius: 0;
        border: none;
        background: var(--bg);
        padding: 20px;
        overflow-y: auto;
    }
    .sidebar.open {
        display: block;
    }
    .sidebar-close {
        display: block;
    }

    .products-wrapper {
        flex-direction: column;
        gap: 20px;
    }
}