/* ==========================================================================
   GentsTime — Archive / Shop Page
   ========================================================================== */

.gt-archive-wrap {
    padding-block: 40px 80px;
}

/* ── Two-column layout: sidebar + main ──────────────────────────── */
.gt-archive-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 20px;
    align-items: start;
}

/* ══════════════════════════════════════════════════════════════════
   SIDEBAR
   ══════════════════════════════════════════════════════════════════ */
.gt-shop-sidebar {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gt-sidebar-widget {
    background: var(--bg-body);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px 18px;
}

.gt-sidebar-heading {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.6px;
    color: var(--text-primary);
    margin-bottom: 14px;
}

/* Categories list */
.gt-sidebar-cats {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gt-sidebar-cats a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 13.5px;
    color: var(--text-secondary);
    transition: background 0.2s ease, color 0.2s ease;
}

.gt-sidebar-cats a:hover,
.gt-sidebar-cats a.active {
    background: var(--bg-brand);
    color: var(--brand);
    font-weight: 600;
}

.gt-cat-count {
    font-size: 11px;
    background: var(--border);
    color: var(--text-secondary);
    border-radius: 20px;
    padding: 2px 7px;
    font-weight: 600;
    min-width: 22px;
    text-align: center;
}

.gt-sidebar-cats a.active .gt-cat-count,
.gt-sidebar-cats a:hover .gt-cat-count {
    background: var(--brand);
    color: #fff;
}

/* Search widget */
.gt-sidebar-search {
    display: flex;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.gt-sidebar-search input[type="text"] {
    flex: 1;
    border: none;
    outline: none;
    padding: 10px 12px;
    font-size: 13.5px;
    color: var(--text-primary);
    background: transparent;
}

.gt-sidebar-search button {
    background: var(--brand);
    color: #fff;
    border: none;
    padding: 0 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background 0.2s ease;
}

.gt-sidebar-search button:hover { background: var(--brand-hover); }

/* WC price filter widget */
.gt-sidebar-widget .price_slider_wrapper { margin-top: 6px; }
.gt-sidebar-widget .price_slider { margin-bottom: 18px; }
.gt-sidebar-widget .ui-slider-horizontal { height: 4px; background: var(--border); border: none; border-radius: 4px; }
.gt-sidebar-widget .ui-slider-handle { background: var(--brand) !important; border-color: var(--brand) !important; top: -7px; }
.gt-sidebar-widget .ui-slider-range { background: var(--brand); }
.gt-sidebar-widget .price_label { font-size: 13px; color: var(--text-secondary); margin-bottom: 10px; }
.gt-sidebar-widget .price_label .from,
.gt-sidebar-widget .price_label .to { font-weight: 700; color: var(--text-primary); }
.gt-sidebar-widget .price_slider_amount button { height: 38px; padding: 0 18px; border-radius: 8px; font-size: 13px; font-weight: 600; }

/* WC rating filter widget */
.gt-sidebar-widget .wc-layered-nav-rating { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.gt-sidebar-widget .wc-layered-nav-rating a { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-secondary); transition: color 0.2s; }
.gt-sidebar-widget .wc-layered-nav-rating a:hover { color: var(--brand); }
.gt-sidebar-widget .wc-layered-nav-rating .count { margin-left: auto; font-size: 11px; color: var(--text-secondary); }

/* ══════════════════════════════════════════════════════════════════
   TOOLBAR
   ══════════════════════════════════════════════════════════════════ */
.gt-archive-toolbar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.gt-filter-toggle {
    display: none; /* shown on mobile */
    align-items: center;
    gap: 7px;
    height: 40px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-body);
    color: var(--text-primary);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.gt-filter-toggle:hover { border-color: var(--brand); color: var(--brand); }
.gt-filter-toggle[aria-expanded="true"] { border-color: var(--brand); color: var(--brand); background: var(--bg-brand); }

.gt-result-count {
    font-size: 13.5px;
    color: var(--text-secondary);
    margin-right: auto;
}

.gt-sort-wrap .woocommerce-ordering {
    margin: 0 !important;
}

.gt-sort-wrap select {
    height: 40px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 13.5px;
    color: var(--text-primary);
    background: var(--bg-body);
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s;
}

.gt-sort-wrap select:focus { border-color: var(--brand); }

.gt-clear-filters {
    display: none;
    align-items: center;
    gap: 5px;
    height: 40px;
    padding: 0 14px;
    border: 1.5px solid #ef4444;
    border-radius: 10px;
    background: #fff5f5;
    color: #ef4444;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

.gt-clear-filters:hover {
    background: #ef4444;
    color: #fff;
}

/* ══════════════════════════════════════════════════════════════════
   PAGINATION
   ══════════════════════════════════════════════════════════════════ */
.woocommerce-pagination {
    margin-top: 8px;
}

.woocommerce-pagination ul.page-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
    justify-content: center;
}

.woocommerce-pagination ul.page-numbers li { margin: 0; }

.woocommerce-pagination ul.page-numbers li a,
.woocommerce-pagination ul.page-numbers li span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    text-decoration: none;
}

.woocommerce-pagination ul.page-numbers li a:hover {
    border-color: var(--brand);
    color: var(--brand);
    background: var(--bg-brand);
}

.woocommerce-pagination ul.page-numbers li span.current {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

/* ══════════════════════════════════════════════════════════════════
   NO PRODUCTS
   ══════════════════════════════════════════════════════════════════ */
.gt-no-products {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
    border: 1px dashed var(--border);
    border-radius: 16px;
}

.gt-no-products svg {
    margin: 0 auto 16px;
    color: var(--border-dark);
}

.gt-no-products h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.gt-no-products p { font-size: 14.5px; }
.gt-no-products a { color: var(--brand); font-weight: 600; }
.gt-no-products a:hover { color: var(--brand-hover); }

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .gt-archive-layout {
        grid-template-columns: 220px 1fr;
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .gt-archive-layout {
        display: block;
    }

    .gt-shop-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 300px;
        height: 100vh;
        background: var(--bg-body);
        z-index: 1200;
        overflow-y: auto;
        padding: 20px 16px 40px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 4px 0 24px rgba(0,0,0,0.18);
    }

    .gt-shop-sidebar.is-open {
        transform: translateX(0);
    }

    .gt-filter-toggle {
        display: inline-flex;
    }

    .gt-sidebar-close {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 16px;
        padding-bottom: 14px;
        border-bottom: 1px solid var(--border);
    }

    .gt-sidebar-close span {
        font-size: 15px;
        font-weight: 700;
        color: var(--text-primary);
    }

    .gt-sidebar-close button {
        background: none;
        border: none;
        cursor: pointer;
        color: var(--text-secondary);
        padding: 4px;
        display: flex;
        align-items: center;
    }
}

@media (max-width: 640px) {
    .gt-archive-wrap { padding-block: 24px 60px; }
    .gt-archive-toolbar { gap: 10px; }
}

/* ==========================================================================
   Shop AJAX Filters
   ========================================================================== */

/* ── Size filter grid ───────────────────────────────────────────── */
.gt-size-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.gt-size-btn {
    min-width: 42px;
    height: 36px;
    padding: 0 10px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    background: var(--bg-body);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.gt-size-btn:hover,
.gt-size-btn.active {
    border-color: var(--brand);
    background: var(--bg-brand);
    color: var(--brand);
}

/* ── Category as buttons ────────────────────────────────────────── */
.gt-sidebar-cats {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gt-cat-btn {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 10px;
    border: none;
    border-radius: 8px;
    background: transparent;
    font-size: 13.5px;
    color: var(--text-secondary);
    cursor: pointer;
    text-align: left;
    transition: all var(--transition);
    font-weight: 500;
}

.gt-cat-btn:hover,
.gt-cat-btn.active {
    background: var(--bg-brand);
    color: var(--brand);
    font-weight: 600;
    transition: all var(--transition);
}

.gt-cat-btn.active .gt-cat-count,
.gt-cat-btn:hover .gt-cat-count {
    background: var(--brand);
    color: #fff;
    transition: all var(--transition);
}

/* ── Custom price range slider ──────────────────────────────────── */
.gt-price-slider-wrap {
    position: relative;
    height: 28px;
    margin-bottom: 10px;
}

.gt-price-track {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--border);
    border-radius: 4px;
    transform: translateY(-50%);
}

.gt-price-range-fill {
    position: absolute;
    top: 0;
    height: 100%;
    background: var(--brand);
    border-radius: 4px;
}

.gt-price-range {
    position: absolute;
    width: 100%;
    height: 4px;
    top: 50%;
    transform: translateY(-50%);
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    pointer-events: none;
    outline: none;
}

.gt-price-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--brand);
    border: 2px solid #fff;
    box-shadow: 0 1px 6px rgba(0,0,0,0.18);
    cursor: pointer;
    pointer-events: all;
}

.gt-price-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--brand);
    border: 2px solid #fff;
    box-shadow: 0 1px 6px rgba(0,0,0,0.18);
    cursor: pointer;
    pointer-events: all;
}

.gt-price-labels {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.gt-price-labels span { font-weight: 600; color: var(--text-primary); }

.gt-price-apply {
    width: 100%;
    height: 38px;
    border: none;
    border-radius: 9px;
    background: var(--brand);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.gt-price-apply:hover { background: var(--brand-hover); }

/* ── Shop grid loading state ────────────────────────────────────── */
#gt-shop-grid.gt-loading {
    opacity: 0.4;
    pointer-events: none;
    min-height: 300px;
}

/* ── Load More button ───────────────────────────────────────────── */
.gt-load-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 32px;
}

.gt-load-more-btn {
    height: 46px;
    padding: 0 40px;
    border: 1.5px solid var(--brand);
    border-radius: 10px;
    background: transparent;
    color: var(--brand);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.gt-load-more-btn:hover {
    background: var(--brand);
    color: #fff;
}

.gt-load-more-btn:disabled {
    opacity: 0.5;
    pointer-events: none;
}
