/* ============================================
   Motoworks — poe layout
   ============================================ */

/* Wrapper: sidebar + main kõrvuti */
.mw-shop-layout {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 20px;
}

/* ---- Sidebar ---- */
.mw-shop-sidebar {
    width: 260px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
}

.mw-sidebar-toggle {
    display: none; /* mobiilil nähtav */
}

.mw-sidebar-block {
    margin-bottom: 28px;
}

.mw-sidebar-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #111;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e0e0;
}

/* VPF aktiivne filter bänner */
.mw-vpf-active-notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 13px;
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}
.mw-vpf-label {
    color: #666;
    font-size: 12px;
}
.mw-vpf-reset {
    margin-left: auto;
    color: #e53935;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
}
.mw-vpf-reset:hover {
    text-decoration: underline;
}

/* Tagasi-link */
.mw-cat-back {
    display: inline-block;
    font-size: 13px;
    color: #555;
    margin-bottom: 8px;
    text-decoration: none;
}
.mw-cat-back:hover { color: #111; }

/* Kategooriate puu */
.mw-cat-tree {
    list-style: none;
    margin: 0;
    padding: 0;
}
.mw-cat-tree li {
    margin: 0;
    padding: 0;
}
.mw-cat-tree li a {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    transition: color 0.15s;
}
.mw-cat-tree li a:hover,
.mw-cat-tree li.active > a {
    color: #e53935;
    font-weight: 600;
}
.mw-cat-tree li .count {
    font-size: 11px;
    color: #999;
}
/* Alamkategooriad */
.mw-cat-tree.depth-1 {
    padding-left: 12px;
    border-left: 2px solid #f0f0f0;
    margin-top: 2px;
}
.mw-cat-tree.depth-1 li a {
    font-size: 12px;
    padding: 4px 0;
}
.mw-cat-tree.depth-2 {
    padding-left: 10px;
    border-left: 2px solid #f5f5f5;
}
.mw-cat-tree.depth-2 li a {
    font-size: 12px;
    color: #555;
}

/* ---- Peamine sisu ---- */
.mw-shop-main {
    flex: 1;
    min-width: 0;
}

/* Archive päis */
.mw-archive-header {
    margin-bottom: 16px;
}
.mw-archive-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 6px;
    color: #111;
}
.mw-archive-desc {
    font-size: 14px;
    color: #555;
}

/* Tulemusriba */
.mw-loop-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e0e0e0;
    flex-wrap: wrap;
    gap: 8px;
}
.mw-result-count p,
.woocommerce-result-count {
    margin: 0;
    font-size: 13px;
    color: #666;
}

/* WC toodete grid */
ul.products {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 16px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}
ul.products li.product {
    margin: 0 !important;
    width: auto !important;
    float: none !important;
    clear: none !important;
}
ul.products li.product a img {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    display: block !important;
}

/* Alamkategooriate kaardid */
.mw-subcategories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 32px;
}
.mw-subcat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px 10px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.mw-subcat-card:hover {
    border-color: #e53935;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    color: #e53935;
}
.mw-subcat-img {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    overflow: hidden;
    border-radius: 4px;
}
.mw-subcat-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.mw-subcat-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 4px;
}
.mw-subcat-count {
    font-size: 11px;
    color: #999;
}

/* Leheküljenumber */
.mw-pagination {
    margin-top: 32px;
}

/* ============================================
   Mobiil (< 900px)
   ============================================ */
@media (max-width: 900px) {
    .mw-shop-layout {
        flex-direction: column;
        padding: 12px;
        gap: 0;
    }

    .mw-shop-sidebar {
        width: 100%;
        position: static;
        margin-bottom: 16px;
    }

    .mw-sidebar-toggle {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        padding: 10px 14px;
        font-size: 14px;
        font-weight: 600;
        background: #f5f5f5;
        border: 1px solid #ddd;
        border-radius: 6px;
        cursor: pointer;
        margin-bottom: 0;
    }
    .mw-sidebar-toggle.active {
        border-radius: 6px 6px 0 0;
    }

    .mw-sidebar-inner {
        display: none;
        padding: 16px;
        border: 1px solid #ddd;
        border-top: none;
        border-radius: 0 0 6px 6px;
        background: #fff;
    }
    .mw-sidebar-inner.open {
        display: block;
    }

    ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 480px) {
    ul.products {
        grid-template-columns: 1fr !important;
    }
}

/* ============================================
   JetSmartFilters override (sidebar kontekstis)
   ============================================ */
.mw-filters-block .jet-filter-label,
.mw-filters-block .jet-smart-filters-filter-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #333;
    margin-bottom: 8px;
}
.mw-filters-block .jet-checkboxes-list__item label {
    font-size: 13px;
}
