/**
 * IT Solution Custom Theme - Shop Archive Stylesheet
 */

/* 1. SHOP HEADER & BREADCRUMBS */
.it-shop-header-banner {
    background: #0f172a;
    color: #ffffff;
    padding: 30px 0;
    border-bottom: 1px solid #1e293b;
}

.it-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.it-breadcrumbs a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}

.it-breadcrumbs a:hover {
    color: #38bdf8;
}

.it-bc-sep {
    color: #475569;
}

.it-bc-current {
    color: #f1f5f9;
    font-weight: 600;
}

.it-shop-page-title {
    font-size: 26px;
    font-weight: 800;
    margin: 0;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.it-category-desc {
    margin-top: 8px;
    font-size: 13px;
    color: #cbd5e1;
    max-width: 720px;
    line-height: 1.5;
}

/* 2. CATALOG LAYOUT */
.it-shop-catalog-section {
    padding: 40px 0 60px;
    background: #f8fafc;
}

.it-shop-layout-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    align-items: start;
}

.it-shop-sidebar-col {
    width: 100%;
}

.it-sidebar-sticky {
    position: sticky;
    top: 90px;
}

/* 3. TOOLBAR */
.it-shop-toolbar {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.it-toolbar-count {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.it-toolbar-count span {
    font-weight: 700;
    color: #0f172a;
}

.it-toolbar-search {
    flex: 1;
    max-width: 320px;
}

.it-catalog-search-form {
    display: flex;
    align-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    overflow: hidden;
    background: #ffffff;
    height: 38px;
}

.it-catalog-search-form input {
    flex: 1;
    border: none;
    outline: none;
    padding: 0 12px;
    font-size: 13px;
    color: #0f172a;
    background: transparent;
}

.it-catalog-search-form button {
    background: transparent;
    border: none;
    padding: 0 12px;
    color: #64748b;
    cursor: pointer;
    transition: color 0.2s;
}

.it-catalog-search-form button:hover {
    color: #1d4ed8;
}

.it-custom-select-wrap {
    position: relative;
    display: inline-block;
}

.it-select-orderby {
    appearance: none;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    padding: 8px 34px 8px 14px;
    height: 38px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}

.it-select-orderby:focus {
    border-color: #1d4ed8;
}

.it-select-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    color: #64748b;
    pointer-events: none;
}

/* 4. PRODUCTS ARCHIVE GRID */
.it-products-archive-grid {
    width: 100%;
}

/* Override default WooCommerce ul.products */
.it-products-archive-grid ul.products {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.it-products-archive-grid ul.products::before,
.it-products-archive-grid ul.products::after {
    display: none !important;
}

.it-products-archive-grid ul.products li.product {
    width: 100% !important;
    margin: 0 !important;
    float: none !important;
    display: flex !important;
}

/* Empty State */
.it-no-products-found {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 50px 30px;
    text-align: center;
}

.it-no-prod-icon {
    font-size: 40px;
    color: #cbd5e1;
    margin-bottom: 14px;
}

.it-no-products-found h3 {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px 0;
}

.it-no-products-found p {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 20px 0;
}

.it-btn-reset-shop {
    background: #0f172a;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    padding: 10px 22px;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
}

.it-btn-reset-shop:hover {
    background: #1d4ed8;
}

/* 5. PAGINATION */
.it-shop-pagination-wrap {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.it-shop-pagination-wrap ul.page-numbers {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.it-shop-pagination-wrap ul.page-numbers li a,
.it-shop-pagination-wrap ul.page-numbers li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #0f172a;
    text-decoration: none;
    transition: all 0.2s;
}

.it-shop-pagination-wrap ul.page-numbers li a:hover {
    border-color: #1d4ed8;
    color: #1d4ed8;
}

.it-shop-pagination-wrap ul.page-numbers li span.current {
    background: #0f172a;
    border-color: #0f172a;
    color: #ffffff;
}

/* 6. MOBILE FILTER OFFCANVAS */
.it-mobile-filter-trigger-wrap {
    display: none;
    margin-bottom: 20px;
}

.it-btn-mobile-filter {
    width: 100%;
    background: #0f172a;
    color: #ffffff;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.it-filter-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
    z-index: 99998;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.it-filter-drawer-overlay.active {
    display: block;
    opacity: 1;
}

.it-filter-offcanvas {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height: 100vh;
    background: #ffffff;
    z-index: 99999;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.it-filter-offcanvas.active {
    left: 0;
}

.it-offcanvas-header {
    background: #0f172a;
    color: #ffffff;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.it-offcanvas-title {
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.it-offcanvas-close-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 18px;
    cursor: pointer;
}

.it-offcanvas-body {
    padding: 20px;
}

/* RESPONSIVE */
@media (max-width: 1200px) {
    .it-products-archive-grid ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 992px) {
    .it-shop-layout-grid {
        grid-template-columns: 1fr;
    }
    .it-shop-sidebar-col {
        display: none; /* Hide on mobile/tablet */
    }
    .it-mobile-filter-trigger-wrap {
        display: block;
    }
}

@media (max-width: 640px) {
    .it-shop-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .it-toolbar-search {
        max-width: 100%;
    }
    .it-products-archive-grid ul.products {
        grid-template-columns: repeat(2, 1fr) !important; /* 2 columns on mobile */
        gap: 10px !important;
    }
    .it-shop-page-title {
        font-size: 20px;
    }
}


/* Reset & Base Scoping */
.it-archive-wrapper {
    background-color: #f8fafc;
    color: #1e293b;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    padding-bottom: 60px;
}

.it-container {
    width: 100%;
    max-width: 1380px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* 1. Header Banner */
.it-archive-banner {
    background: #0f172a;
    color: #ffffff;
    padding: 28px 0;
    margin-bottom: 30px;
    border-bottom: 1px solid #1e293b;
}

.it-bc-trail {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.it-bc-trail a {
    color: #38bdf8;
    text-decoration: none;
}

.it-archive-title {
    font-size: 28px;
    font-weight: 800;
    margin: 0;
    color: #ffffff;
    letter-spacing: -0.5px;
}

/* 2. Main 2-Column Layout (Sidebar 270px + Content 1fr) */
.it-archive-grid-layout {
    display: grid;
    grid-template-columns: 270px 1fr;
    gap: 30px;
    align-items: start;
}

/* 3. Sidebar Filters Box */
.it-filter-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.it-filter-top-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 2px solid #0f172a;
    margin-bottom: 15px;
}

.it-filter-top-head h4 {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
}

.it-filter-top-head h4 i { color: #1d4ed8; }

.it-btn-reset-pill {
    font-size: 11px;
    font-weight: 700;
    color: #dc2626;
    background: #fee2e2;
    padding: 4px 8px;
    border-radius: 4px;
    text-decoration: none;
}

/* Collapsible Filter Accordions */
.it-filter-group {
    border-bottom: 1px solid #f1f5f9;
    padding: 14px 0;
}

.it-filter-group:last-child {
    border-bottom: none;
}

.it-acc-btn {
    width: 100%;
    background: transparent;
    border: none;
    padding: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    text-align: left;
}

.it-acc-chevron {
    font-size: 11px;
    color: #94a3b8;
    transition: transform 0.25s ease;
}

.it-filter-group.is-open .it-acc-chevron {
    transform: rotate(180deg);
}

.it-acc-content {
    display: none;
    padding-top: 12px;
}

.it-filter-group.is-open .it-acc-content {
    display: block;
}

/* Filter Option Checkboxes */
.it-filter-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
    max-height: 250px;
    overflow-y: auto;
}

.it-check-label {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #334155;
    cursor: pointer;
    user-select: none;
}

.it-check-label input {
    margin-right: 10px;
    width: 16px;
    height: 16px;
    accent-color: #1d4ed8;
    cursor: pointer;
}

.it-check-label .it-cnt {
    font-size: 11px;
    color: #94a3b8;
    margin-left: auto;
    background: #f1f5f9;
    padding: 1px 6px;
    border-radius: 10px;
}

/* Price Range Inputs */
.it-price-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.it-price-input-box {
    display: flex;
    align-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    padding: 0 8px;
    flex: 1;
}

.it-price-input-box span {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    margin-right: 4px;
}

.it-price-input-box input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 0;
    color: #0f172a;
}

.it-btn-apply-price {
    width: 100%;
    background: #0f172a;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.it-btn-apply-price:hover { background: #1d4ed8; }

/* 4. Products Column & Toolbar */
.it-shop-toolbar {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.it-res-count {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.it-res-count strong { color: #0f172a; }

.it-inshop-search {
    flex: 1;
    max-width: 320px;
}

.it-inshop-search form {
    display: flex;
    align-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    height: 38px;
    overflow: hidden;
}

.it-inshop-search input {
    flex: 1;
    border: none;
    outline: none;
    padding: 0 12px;
    font-size: 13px;
    color: #0f172a;
}

.it-inshop-search button {
    background: transparent;
    border: none;
    padding: 0 12px;
    color: #64748b;
    cursor: pointer;
}

.it-sort-select {
    appearance: none;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    cursor: pointer;
    outline: none;
    height: 38px;
}

/* 5. 3-COLUMN PRODUCT GRID (DESKTOP) */
.it-catalog-products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    width: 100%;
}

/* Mobile Filter Trigger Button */
.it-mobile-filter-bar {
    display: none;
    margin-bottom: 16px;
}

.it-btn-trigger-filter {
    width: 100%;
    background: #0f172a;
    color: #ffffff;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Mobile Offcanvas Drawer */
.it-filter-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
    z-index: 99998;
    display: none;
}

.it-filter-backdrop.active { display: block; }

.it-filter-offcanvas-pane {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height: 100vh;
    background: #ffffff;
    z-index: 99999;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
}

.it-filter-offcanvas-pane.active { left: 0; }

.it-offcanvas-top {
    background: #0f172a;
    color: #ffffff;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.it-offcanvas-top h5 { margin: 0; font-size: 15px; font-weight: 700; color: #fff; }
.it-offcanvas-close { background: none; border: none; color: #ffffff; font-size: 18px; cursor: pointer; }
.it-offcanvas-inner { padding: 20px; }

/* Pagination */
.it-pagination-row {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.it-pagination-row ul.page-numbers {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.it-pagination-row ul.page-numbers li a,
.it-pagination-row ul.page-numbers li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #0f172a;
    text-decoration: none;
}

.it-pagination-row ul.page-numbers li span.current {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

/* Responsive Breakpoints */
@media (max-width: 1200px) {
    .it-catalog-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .it-archive-grid-layout {
        grid-template-columns: 1fr;
    }
    .it-desktop-sidebar-area {
        display: none; /* Hide desktop sidebar */
    }
    .it-mobile-filter-bar {
        display: block; /* Show mobile filter trigger */
    }
}

@media (max-width: 640px) {
    .it-catalog-products-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 products per row on mobile */
        gap: 10px;
    }
    .it-shop-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .it-inshop-search {
        max-width: 100%;
    }
}