/* =========================
   SHOP HERO
========================= */
.sago-shop-hero {
    background: linear-gradient(135deg, #fafafa 0%, #f0f0f0 100%);
    padding: 60px 0 50px;
    text-align: center;
    border-bottom: 1px solid var(--sago-border);
    position: relative;
    overflow: hidden;
}
.sago-shop-hero::before,
.sago-shop-hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(220,53,11,0.03);
    z-index: 0;
}
.sago-shop-hero::before {
    width: 300px;
    height: 300px;
    top: -100px;
    left: -80px;
}
.sago-shop-hero::after {
    width: 250px;
    height: 250px;
    bottom: -80px;
    right: -60px;
    background: rgba(10,136,64,0.03);
}
.sago-shop-hero .ast-container {
    position: relative;
    z-index: 1;
}
.sago-shop-hero h1 {
    font-size: clamp(28px,5vw,40px);
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--sago-text);
}
.sago-shop-hero p {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

/* =========================
   FILTER BAR
========================= */
.sago-filter-bar-new {
    background: var(--sago-white);
    padding: 12px 0;
    border-bottom: 1px solid var(--sago-border);
    position: sticky;
    top: 0;
    z-index: 99;
    backdrop-filter: blur(8px);
    background: rgba(255,255,255,0.95);
}
.sago-filter-bar-new .ast-container {
    display: flex;
flex-direction: row !important;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}
.filter-item select,
.sago-filter-bar-new select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--sago-border);
    border-radius: 40px;
    background: var(--sago-white);
    font-size: 0.85rem;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.filter-item select:focus,
.sago-filter-bar-new select:focus {
    outline: none;
    border-color: var(--sago-primary);
    box-shadow: 0 0 0 3px rgba(220,53,11,0.1);
}
.filter-btn-drawer,
.clear-filters-btn {
    background: var(--sago-light-bg);
    border: 1px solid var(--sago-border);
    border-radius: 40px;
    padding: 10px 18px;
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.filter-btn-drawer:hover,
.clear-filters-btn:hover {
    background: var(--sago-primary);
    color: #fff;
    border-color: var(--sago-primary);
    transform: translateY(-1px);
}

/* =========================
   SUB-CATEGORY STRIP – SINGLE ROW, CENTERED
========================= */
.sago-subcategory-strip-wrapper {
    width: 100%;
    background: var(--sago-white);
    border-bottom: 1px solid var(--sago-border);
}
.sago-subcategory-strip {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 12px;
    overflow-x: auto;
    padding: 12px 20px;
    scrollbar-width: thin;
}
.sago-subcategory-strip .subcat-chip {
    flex: 0 0 auto;
    white-space: nowrap;
    background: var(--sago-light-bg);
    border: 1px solid var(--sago-border);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    color: var(--sago-text);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}
.subcat-chip .count {
    font-size: 11px;
    color: #6c757d;
    font-weight: normal;
}
.subcat-chip:hover {
    background: var(--sago-primary);
    border-color: var(--sago-primary);
    color: #fff;
    transform: translateY(-2px);
}
.subcat-chip:hover .count {
    color: #fff;
}
@media (max-width: 768px) {
    .sago-subcategory-strip {
        justify-content: flex-start;
    }
}

/* =========================
   FILTER DRAWER
========================= */
.filter-drawer {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    max-width: 90vw;
    height: 100%;
    background: var(--sago-white);
    box-shadow: -5px 0 30px rgba(0,0,0,0.15);
    transition: right 0.35s cubic-bezier(0.4,0,0.2,1);
    z-index: 100000;
    display: flex;
    flex-direction: column;
}
.filter-drawer.open {
    right: 0;
}
.filter-drawer .drawer-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--sago-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.filter-drawer .drawer-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
}
.filter-drawer .drawer-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6b7280;
    transition: color 0.2s, transform 0.2s;
}
.filter-drawer .drawer-close:hover {
    color: var(--sago-primary);
    transform: rotate(90deg);
}
.filter-drawer .drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}
.filter-group h4 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: var(--sago-text);
}
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    cursor: pointer;
}
.checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}
.price-inputs {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 15px;
}
.price-inputs input {
    width: 100px;
    padding: 8px 10px;
    border: 1px solid var(--sago-border);
    border-radius: 8px;
    font-size: 0.85rem;
}
.filter-drawer .drawer-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--sago-border);
    background: var(--sago-light-bg);
    display: flex;
    gap: 12px;
}
.filter-drawer .drawer-footer .button {
    flex: 1;
    text-align: center;
    padding: 12px;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.filter-drawer .drawer-footer .button.primary {
    background: var(--sago-primary);
    color: #fff;
    border: none;
}
.filter-drawer .drawer-footer .button.primary:hover {
    background: var(--sago-orange);
    transform: translateY(-1px);
}
.filter-drawer .drawer-footer .button.secondary {
    background: transparent;
    border: 1px solid var(--sago-border);
    color: var(--sago-text);
}
.filter-drawer .drawer-footer .button.secondary:hover {
    background: var(--sago-primary);
    color: #fff;
    border-color: var(--sago-primary);
}

/* Backdrop overlay */
.drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    backdrop-filter: blur(2px);
}
.drawer-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

/* =========================
   PRODUCT AREA & GRID
========================= */
#sago-products-shop {
    padding: 30px 0 60px;
}
.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.sago-product-card {
    margin: 0 !important;
}
.woocommerce-pagination {
    margin-top: 40px;
    text-align: center;
}
.woocommerce-pagination .page-numbers {
    display: inline-flex;
    gap: 8px;
    list-style: none;
    padding: 0;
}
.woocommerce-pagination .page-numbers a,
.woocommerce-pagination .page-numbers span {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid var(--sago-border);
    border-radius: 30px;
    text-decoration: none;
    color: var(--sago-text);
    transition: all 0.2s;
}
.woocommerce-pagination .page-numbers a:hover,
.woocommerce-pagination .page-numbers span.current {
    background: var(--sago-primary);
    color: #fff;
    border-color: var(--sago-primary);
}

/* =========================
   RESPONSIVE (tablet & mobile)
========================= */
@media (max-width: 1024px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(4,1fr);
        gap: 20px;
    }
}
@media (max-width: 768px) {
    .sago-shop-hero {
        padding: 40px 0 30px;
    }
    .sago-shop-hero h1 {
        font-size: 26px;
    }
    .sago-filter-bar-new .ast-container {
        gap: 8px;
flex-direction: row !important;
    }
    .sago-filter-bar-new select {
        font-size: 12px;
        padding: 8px 12px;
    }
    .filter-btn-drawer span,
    .clear-filters-btn span {
        display: none;
    }
    .filter-btn-drawer,
    .clear-filters-btn {
        padding: 10px 14px;
    }
    .filter-btn-drawer i,
    .clear-filters-btn i {
        font-size: 1.2rem;
        margin: 0;
    }
    .woocommerce ul.products {
        grid-template-columns: repeat(2,1fr);
        gap: 16px;
    }
    .filter-drawer {
        width: 100%;
        max-width: 100vw;
        right: -100%;
    }
    .filter-drawer .drawer-body {
        padding: 20px;
    }
    .checkbox-group {
        gap: 10px;
    }
    /* Hide dropdowns on mobile except sort */
    .sago-filter-bar-new .filter-category,
    .sago-filter-bar-new .filter-size,
    .sago-filter-bar-new .filter-colour,
    .sago-filter-bar-new .filter-stock {
        display: none;
    }
    .sago-filter-bar-new .ast-container {
        justify-content: space-between;
    }
    .filter-sort {
        flex: 1;
        min-width: 100px;
    }
}
@media (max-width: 480px) {
    .woocommerce ul.products {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .filter-btn-drawer,
    .clear-filters-btn {
        padding: 8px 12px;
    }
}

/* Pagination styling */
.sago-pagination {
    margin-top: 40px;
    text-align: center;
}
.sago-pagination .page-numbers {
    display: inline-flex;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.sago-pagination .page-numbers li {
    display: inline-block;
}
.sago-pagination .page-numbers a,
.sago-pagination .page-numbers span {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid var(--sago-border);
    border-radius: 30px;
    text-decoration: none;
    color: var(--sago-text);
    transition: all 0.2s;
    background: var(--sago-white);
    cursor: pointer;
}
.sago-pagination .page-numbers a:hover,
.sago-pagination .page-numbers span.current {
    background: var(--sago-primary);
    color: #fff;
    border-color: var(--sago-primary);
}
.sago-pagination .page-numbers span.current {
    cursor: default;
}