*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Plus Jakarta Sans", Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
}

a {
    text-decoration: none;
}

.pg-products {
    max-width: 1380px;
    margin: 0 auto;
    padding: 28px 20px 60px;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
    align-items: start;
}

/* ── Sidebar ── */
.pg-sidebar {
    position: sticky;
    top: 16px;
}

.pg-filter-box {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #ebebeb;
    padding: 16px 14px;
    margin-bottom: 12px;
}

.pg-filter-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pg-filter-title a {
    font-size: 11px;
    color: #c86118;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

/* Price slider */
.price-track {
    position: relative;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    margin: 22px 0 16px;
}

.price-range-fill {
    position: absolute;
    height: 100%;
    background: #c86118;
    border-radius: 2px;
}

.price-track input[type=range] {
    position: absolute;
    width: 100%;
    height: 4px;
    appearance: none;
    background: transparent;
    pointer-events: none;
    top: 0;
    left: 0;
    margin: 0;
}

.price-track input[type=range]::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #c86118;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    pointer-events: all;
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.price-inputs input[type=number] {
    width: 70px;
    height: 32px;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 0 8px;
    font-size: 13px;
    color: #333;
    font-family: inherit;
}

.price-inputs span {
    font-size: 13px;
    color: #aaa;
    flex: 1;
    text-align: center;
}

/* Subcategory accordion in sidebar */
.sb-filter-cat {
    border-bottom: 1px solid #f5f5f5;
    padding-bottom: 2px;
    margin-bottom: 2px;
}

.sb-filter-cat:last-child {
    border-bottom: none;
}

.sb-filter-cat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 0;
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 600;
    color: #424242;
    user-select: none;
    gap: 6px;
}

.sb-filter-cat-row:hover {
    color: #c86118;
}

.sb-filter-cat-row.active {
    color: #c86118;
}

.sb-filter-cat-left {
    display: flex;
    align-items: center;
    gap: 7px;
    flex: 1;
}

.sb-filter-cat-row input[type=checkbox] {
    width: 15px;
    height: 15px;
    accent-color: #c86118;
    cursor: pointer;
    flex-shrink: 0;
}

.sb-filter-arrow {
    font-size: 12px;
    color: #bbb;
    transition: transform .2s;
    flex-shrink: 0;
}

.sb-filter-arrow {
    font-size: 12px;
    color: #bbb;
    transition: transform .2s;
    flex-shrink: 0;
}

.sb-filter-cat-row.open .sb-filter-arrow {
    transform: rotate(180deg);
    color: #c86118;
}

.sb-filter-mini-list {
    display: none;
    padding: 0 0 6px 22px;
}

.sb-filter-mini-list.open {
    display: block;
}

.sb-filter-mini-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 0;
    gap: 6px;
}

.sb-filter-mini-item label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: #444;
    cursor: pointer;
    flex: 1;
}

.sb-filter-mini-item input[type=checkbox] {
    width: 14px;
    height: 14px;
    accent-color: #c86118;
    cursor: pointer;
}

.sb-filter-mini-item input[type=checkbox]:checked+span {
    color: #c86118;
    font-weight: 600;
}

/* Generic filter item */
.filter-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 0;
    gap: 8px;
}

.filter-item label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13.5px;
    color: #333;
    flex: 1;
}

.filter-item input[type=checkbox] {
    width: 15px;
    height: 15px;
    accent-color: #c86118;
    cursor: pointer;
    flex-shrink: 0;
}

.filter-item input[type=checkbox]:checked+span {
    font-weight: 600;
    color: #c86118;
}

.filter-count {
    font-size: 12px;
    color: #aaa;
    flex-shrink: 0;
}

/* Color swatches */
.color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 0;
}

.color-swatch {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color .15s, transform .15s;
    position: relative;
    flex-shrink: 0;
}

.color-swatch:hover {
    transform: scale(1.15);
}

.color-swatch.selected {
    border-color: #c86118;
    box-shadow: 0 0 0 2px #fff inset;
}

.color-swatch-check {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #fff;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
    opacity: 0;
}

.color-swatch.selected .color-swatch-check {
    opacity: 1;
}

.show-more-btn {
    background: none;
    border: none;
    color: #c86118;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 0 0;
    font-family: inherit;
}

/* ── Right main ── */
.pg-breadcrumb {
    font-size: 13px;
    color: #888;
    margin-bottom: 16px;
}

.pg-breadcrumb a {
    color: #888;
    text-decoration: none;
}

.pg-breadcrumb a:hover {
    color: #c86118;
}

.pg-breadcrumb span {
    margin: 0 6px;
}

.pg-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    gap: 12px;
    flex-wrap: wrap;
}

.pg-topbar h1 {
    font-size: 20px;
    font-weight: 700;
    color: #424242;
}

.pg-topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pg-count {
    font-size: 13px;
    color: #888;
}

.pg-sort select {
    height: 36px;
    padding: 0 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    color: #333;
    font-family: inherit;
    background: #fff;
    cursor: pointer;
    outline: none;
}

/* Product grid */
.pg-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.pg-card {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #ebebeb;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s, transform .2s;
}

.pg-card:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.pg-card-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f5f5f5;
    overflow: hidden;
    position: relative;
}

.pg-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform .3s;
}

.pg-card:hover .pg-card-img img {
    transform: scale(1.05);
}

.pg-card-img .no-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 48px;
}

.badge-custom {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    color: #c86118;
    display: flex;
    align-items: center;
    gap: 4px;
}

.badge-custom::before {
    content: '';
    width: 8px;
    height: 8px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B92C45' stroke-width='2'%3E%3Cpath d='M12 20h9M16.5 3.5a2.121 2.121 0 013 3L7 19l-4 1 1-4L16.5 3.5z'/%3E%3C/svg%3E") center/contain no-repeat;
    display: inline-block;
}

.pg-card-body {
    padding: 12px 12px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pg-card-subcat {
    font-size: 11.5px;
    color: #999;
    font-weight: 500;
}

.pg-card-name {
    font-size: 13.5px;
    font-weight: 600;
    color: #424242;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pg-card-pricing {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    flex-wrap: wrap;
    filter: blur(4px);
}

.pg-card-price {
    font-size: 14px;
    font-weight: 700;
    color: #424242;
}

.pg-card-mrp {
    font-size: 12px;
    color: #aaa;
    text-decoration: line-through;
}

.pg-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px 10px;
    border-top: 1px solid #f0f0f0;
    gap: 8px;
}

.pg-card-moq-label {
    font-size: 11.5px;
    color: #888;
}

.pg-card-moq-label strong {
    color: #333;
}

/* Color dots on card */
.pg-card-colors {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.pg-card-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.pg-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #aaa;
}

.pg-empty h3 {
    font-size: 18px;
    color: #555;
    margin-bottom: 8px;
}

/* Pagination */
.pg-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.pg-pagination a,
.pg-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid #ddd;
    color: #555;
    background: #fff;
    transition: all .15s;
}

.pg-pagination a:hover {
    border-color: #c86118;
    color: #c86118;
}

.pg-pagination .active {
    background: #c86118;
    color: #fff;
    border-color: #c86118;
}

.pg-pagination .dots {
    border: none;
    background: none;
}

/* Mobile filter toggle */
.pg-filter-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: #333;
    font-family: inherit;
}

/* Responsive */
@media (max-width: 1100px) {
    .pg-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .pg-products {
        grid-template-columns: 1fr;
    }

    .pg-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100vh;
        background: #fff;
        z-index: 99999;
        overflow-y: auto;
        padding: 16px;
        transform: translateX(-100%);
        transition: transform .3s ease;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.12);
    }

    .pg-sidebar.open {
        transform: translateX(0);
    }

    .pg-filter-toggle {
        display: flex;
    }

    .pg-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 99998;
    }

    .sidebar-overlay.open {
        display: block;
    }
}

@media (max-width: 480px) {
    .pg-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .pg-products {
        padding: 16px 12px 40px;
    }
}

/* ── Scrollable Filter Lists ── */
.pg-filter-scroll {
    max-height: 260px;
    /* height adjust kar sakta hai */
    overflow-y: auto;
    padding-right: 6px;
}

/* Custom scrollbar (optional nice look) */
.pg-filter-scroll::-webkit-scrollbar {
    width: 5px;
}

.pg-filter-scroll::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.pg-filter-scroll::-webkit-scrollbar-thumb:hover {
    background: #c86118;
}


/* ── Mobile Bottom Bar ── */
.pg-mobile-bar {
    display: none;
}

@media (max-width: 900px) {

    /* Bottom bar show */
    .pg-mobile-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 9999;
        background: #fff;
        border-top: 1px solid #e0e0e0;
        height: 54px;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
    }

    .pg-mb-btn {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        background: none;
        border: none;
        border-right: 1px solid #f0f0f0;
        font-size: 11px;
        font-weight: 600;
        color: #555;
        cursor: pointer;
        font-family: "Plus Jakarta Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
        padding: 6px 0;
        text-decoration: none;
    }

    .pg-mb-btn:last-child {
        border-right: none;
    }

    .pg-mb-btn:hover {
        color: #c86118;
    }

    .pg-mb-btn svg {
        color: #555;
    }

    /* Page ke neeche space taaki content bar ke peeche na chhuppe */
    .pg-products {
        padding-bottom: 70px;
    }

    /* Topbar ka Filter button hide karo */
    .pg-filter-toggle {
        display: none !important;
    }
}

/* ── Bottom Sheet (Sort) ── */
.pg-sheet-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 99990;
}

.pg-sheet-overlay.open {
    display: block;
}

.pg-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 16px 16px 0 0;
    z-index: 99991;
    transform: translateY(100%);
    transition: transform .3s ease;
    max-height: 60vh;
    overflow-y: auto;
}

.pg-sheet.open {
    transform: translateY(0);
}

.pg-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
}

.pg-sheet-head button {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #555;
}

.pg-sheet-body {
    padding: 8px 0 16px;
}

.pg-sort-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    border-bottom: 1px solid #f8f8f8;
    font-family: "Plus Jakarta Sans", Arial, sans-serif;
}

.pg-sort-option:hover {
    background: #fafafa;
    color: #c86118;
}

.pg-sort-option.active {
    color: #c86118;
    font-weight: 600;
}