:root {
    --primary-color: #5bb318;
    --primary-dark: #3d8010;
    --text-dark: #1a2e1a;
    --text-light: #666;
    --border-color: #e8f0e4;
}

.shop-hero {
    background: linear-gradient(135deg, #0d1f12 0%, #1a3a1e 50%, #0f2a14 100%);
    padding: 40px 0;
    position: relative;
}

.shop-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('https://images.unsplash.com/photo-1500382017468-9049fed747ef?auto=format&fit=crop&w=1600&q=40') center/cover no-repeat;
    opacity: 0.12;
}

.shop-hero .hero-inner {
    position: relative;
    z-index: 1;
}

.shop-search-bar {
    background: rgba(255, 255, 255, 0.1);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    backdrop-filter: blur(10px);
    overflow: hidden;
    max-width: 560px;
    margin: 0 auto;
}

.shop-search-bar input {
    background: transparent;
    border: none;
    color: white;
    padding: 14px 20px;
}

.shop-search-bar input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Focus effect on group (.shop-search-bar) is in global style.css */
.shop-search-bar input:focus {
    outline: none;
}

.shop-search-bar .search-btn {
    background: var(--primary-color);
    border: none;
    padding: 0 24px;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    margin: 6px;
    border-radius: 40px;
    transition: background 0.2s;
}

.shop-search-bar .search-btn:hover {
    background: var(--primary-dark);
}

.cat-pill-strip {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 2px 12px;
    scrollbar-width: none;
}

.cat-pill-strip::-webkit-scrollbar {
    display: none;
}

.cat-pill {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 50px;
    border: 2px solid var(--border-color);
    background: white;
    color: var(--text-dark);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    white-space: nowrap;
}

.cat-pill:hover, .cat-pill.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.cat-pill-img {
    width: 24px;
    height: 24px;
    object-fit: cover;
    border-radius: 50%;
}

.shop-toolbar {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 14px 20px;
    margin-bottom: 24px;
}

.filter-sidebar {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-section {
    background: white;
    border: 1px solid var(--border-color, #e8f0e4);
    border-radius: 16px;
    overflow: hidden;
}

.filter-search-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 16px;
}

.filter-search-icon {
    color: #aaa;
    font-size: 0.85rem;
}

.filter-search-input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 0.875rem;
    background: transparent;
    color: var(--text-dark, #1a2e1a);
}

.filter-search-input::placeholder {
    color: #bbb;
}

.filter-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}

.filter-section-header:hover {
    background: #f8fdf5;
}

.filter-icon-wrap {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--primary-color, #5bb318);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    flex-shrink: 0;
}

.filter-section-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-dark, #1a2e1a);
}

.filter-chevron {
    font-size: 0.7rem;
    color: #aaa;
    transition: transform 0.25s;
}

.filter-section-header[aria-expanded="false"] .filter-chevron {
    transform: rotate(-90deg);
}

.filter-section-body {
    padding: 4px 14px 14px;
}

.filter-cat-tree {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.filter-cat-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-dark, #1a2e1a);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.18s;
    border-left: 3px solid transparent;
}

.filter-cat-row:hover {
    background: #f1fae8;
    border-left-color: var(--primary-color, #5bb318);
    color: var(--primary-color, #5bb318);
}

.filter-cat-row.active {
    background: #edfad6;
    border-left-color: var(--primary-color, #5bb318);
    color: var(--primary-color, #5bb318);
    font-weight: 700;
}

.filter-cat-icon {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
    color: #888;
    transition: all 0.18s;
}

.filter-cat-icon .filter-cat-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 7px;
}

.filter-cat-row:hover .filter-cat-icon,
.filter-cat-row.active .filter-cat-icon {
    background: var(--primary-color, #5bb318);
    color: white;
}

.filter-cat-label {
    flex-grow: 1;
}

.filter-cat-count {
    font-size: 0.72rem;
    background: #f0f0f0;
    color: #888;
    border-radius: 20px;
    padding: 1px 8px;
    font-weight: 600;
    flex-shrink: 0;
}

.filter-cat-row.active .filter-cat-count {
    background: #d4f5a0;
    color: var(--primary-dark, #3d8010);
}

.filter-parent-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark, #1a2e1a);
    cursor: pointer;
    transition: all 0.18s;
    border-left: 3px solid transparent;
    user-select: none;
}

.filter-parent-row:hover {
    background: #f1fae8;
    border-left-color: var(--primary-color, #5bb318);
    color: var(--primary-color, #5bb318);
}

.filter-parent-row[aria-expanded="true"] {
    background: #edfad6;
    border-left-color: var(--primary-color, #5bb318);
    color: var(--primary-color, #5bb318);
}

.filter-parent-row[aria-expanded="true"] .filter-cat-icon {
    background: var(--primary-color, #5bb318);
    color: white;
}

.filter-sub-chevron {
    font-size: 0.65rem;
    color: #bbb;
    margin-left: auto;
    transition: transform 0.25s;
    flex-shrink: 0;
}

.filter-parent-row[aria-expanded="true"] .filter-sub-chevron {
    transform: rotate(90deg);
    color: var(--primary-color, #5bb318);
}

.filter-sub-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 4px 0 6px 18px;
    border-left: 2px solid #d4f5a0;
    margin-left: 24px;
    margin-bottom: 4px;
}

.filter-sub-row {
    display: flex;
    align-items: center;
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #666;
    text-decoration: none;
    transition: all 0.15s;
}

.filter-sub-row:hover {
    background: #f1fae8;
    color: var(--primary-color, #5bb318);
}

.filter-sub-row.active {
    color: var(--primary-color, #5bb318);
    font-weight: 700;
    background: #edfad6;
}
.filter-sub-row .filter-sub-cat-img {
    width: 18px;
    height: 18px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}
.filter-sub-row .filter-sub-cat-icon {
    font-size: 1rem;
    color: inherit;
    flex-shrink: 0;
}

.price-display-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    justify-content: space-between;
}

.price-box {
    width: 42%;
    text-align: center;
    background: #f3f9ed;
    border: 1px solid var(--border-color, #e0ead8);
    border-radius: 8px;
    padding: 5px 12px;
    position: relative;
}

.price-box input {
    width: 100%;
    text-align: center;
    background: transparent;
    border: none;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-color, #5bb318);
}

.price-box:before {
    content: "৳";
    position: absolute;
    height: auto;
    width: 20px;
    left: 0px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    z-index: 9;
    color: var(--primary-color, #5bb318);
    padding-top: 3px;
}

.price-dash {
    color: #bbb;
    font-size: 1.1rem;
}

.modern-range {
    width: 100%;
    appearance: none;
    height: 5px;
    border-radius: 10px;
    background: linear-gradient(to right, var(--primary-color, #5bb318) 0%, var(--primary-color, #5bb318) 100%, #e0ead8 100%);
    outline: none;
    cursor: pointer;
}

.modern-range::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--primary-color, #5bb318);
    box-shadow: 0 2px 6px rgba(91, 179, 24, 0.3);
    cursor: pointer;
}

.modern-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.modern-toggle-info {
    display: flex;
    flex-direction: column;
}

.modern-toggle-label {
    font-size: 0.85rem;
    font-weight: 600;
}

.modern-toggle-sub {
    font-size: 0.72rem;
    color: #aaa;
    margin-top: 1px;
}

.rating-row-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rating-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s;
    border-left: 3px solid transparent;
    text-decoration: none;
}

.rating-row:hover {
    background: #f1fae8;
    border-left-color: var(--primary-color, #5bb318);
}

.rating-row.active {
    background: #edfad6;
    border-left-color: var(--primary-color, #5bb318);
}

.rating-stars {
    display: flex;
    gap: 2px;
    color: #f5a623;
    font-size: 0.78rem;
}

.rating-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-dark, #1a2e1a);
    flex-grow: 1;
}

.rating-count {
    font-size: 0.72rem;
    background: #f0f0f0;
    color: #888;
    border-radius: 20px;
    padding: 1px 8px;
}

.btn-filter-reset {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 13px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, var(--primary-color, #5bb318), #3d8010);
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
    box-shadow: 0 4px 14px rgba(91, 179, 24, 0.3);
    text-decoration: none;
}

.btn-filter-reset:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    color: white;
}

.product-card .vendor-strip {
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
    margin-top: 12px;
}

.shop-active-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 50px;
    background: #edfad6;
    color: var(--primary-dark, #3d8010);
    font-size: 0.78rem;
    font-weight: 600;
}

.shop-active-chip a {
    color: inherit;
    text-decoration: none;
    opacity: 0.6;
    transition: opacity 0.15s;
}

.shop-active-chip a:hover {
    opacity: 1;
}

/* ── Shop Mobile: Header & Filter Sidebar ── */
@media (max-width: 991.98px) {
    .shop-hero {
        padding: 1.5rem 0;
    }

    .shop-hero .display-5 {
        font-size: 1.5rem;
    }

    .shop-hero .hero-inner .row.g-3 {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }

    .shop-hero .hero-inner .col-auto .text-white.opacity-25 {
        display: none;
    }

    .shop-search-bar {
        border-radius: 16px;
        padding: 0.25rem;
    }

    .shop-search-bar input {
        padding: 12px 16px;
        font-size: 0.95rem;
    }

    .shop-search-bar .search-btn {
        padding: 0 1rem;
        font-size: 0.8rem;
    }

    /* Filter Sidebar - Modern mobile */
    #filterSidebar.offcanvas {
        width: min(360px, 92vw) !important;
        max-width: 92vw;
        border-radius: 0 20px 20px 0;
        box-shadow: 16px 0 56px rgba(0, 0, 0, 0.12);
    }

    #filterSidebar .offcanvas-header {
        padding: 1rem 1.25rem;
        border-radius: 0 20px 0 0;
    }

    #filterSidebar .offcanvas-body {
        padding: 1rem 1.25rem 2rem;
    }

    #filterSidebar .filter-section {
        border-radius: 14px;
    }

    #filterSidebar .btn-filter-reset {
        border-radius: 14px;
        padding: 14px;
    }

    .btn[data-bs-target="#filterSidebar"] {
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
        color: white !important;
        border: none;
        padding: 0.5rem 1rem;
        font-weight: 600;
        box-shadow: 0 4px 12px rgba(91, 179, 24, 0.25);
    }

    .btn[data-bs-target="#filterSidebar"]:hover {
        background: linear-gradient(135deg, var(--primary-dark) 0%, #2d6a0e 100%);
        color: white !important;
        transform: translateY(-1px);
        box-shadow: 0 6px 16px rgba(91, 179, 24, 0.3);
    }
}

@media (max-width: 575.98px) {
    .shop-hero {
        padding: 1.25rem 0;
    }

    .shop-hero .display-5 {
        font-size: 1.35rem;
    }

    .shop-search-bar {
        flex-direction: column;
        border-radius: 14px;
    }

    .shop-search-bar .search-btn {
        width: 100%;
        justify-content: center;
        margin: 0;
        border-radius: 0 0 14px 14px;
    }

    .shop-search-bar input {
        border-radius: 14px 14px 0 0;
    }

    .cat-pill-strip {
        padding: 4px 0 10px;
        margin: 0 -0.5rem;
    }

    .cat-pill {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
}
