/* ========================================
   Shop Page - Exact Figma Implementation
   Based on Figma design: bYtEN8La5YSKK8ra6pV8jj node 150-12102
   ======================================== */

/* ----- Offer Banner (150:12104) ----- */
.khan-shop-offer {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #f7f7f7;
}

.khan-shop-offer__pattern {
    position: absolute;
    inset: 0;
    background-size: 55px 55px;
    background-repeat: repeat;
    background-position: top left;
    opacity: 0.15;
    mix-blend-mode: overlay;
    pointer-events: none;
}

.khan-shop-offer__gradient {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(255,255,255,1) 0%, rgba(0,0,0,1) 95.192%);
    mix-blend-mode: overlay;
    pointer-events: none;
}

.khan-shop-offer__figure {
    position: absolute;
    top: 0;
    height: 100%;
    pointer-events: none;
}

.khan-shop-offer__figure--left {
    left: 0;
    width: auto;
}

.khan-shop-offer__figure--left img {
    height: 100%;
    width: auto;
    object-fit: contain;
    object-position: center;
}

.khan-shop-offer__figure--center {
    left: 50%;
    transform: translateX(-50%);
    width: auto;
}

.khan-shop-offer__figure--center img {
    height: 100%;
    width: auto;
    object-fit: contain;
    object-position: center;
}

.khan-shop-offer__figure--right {
    right: 0;
    width: auto;
}

.khan-shop-offer__figure--right img {
    height: 100%;
    width: auto;
    object-fit: contain;
    object-position: center;
}

.khan-shop-offer__content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: #ffffff;
    z-index: 10;
}

.khan-shop-offer__eyebrow {
    font-family: 'Readex Pro', sans-serif;
    font-weight: 300;
    font-size: 21px;
    line-height: 1.5;
    margin: 0 0 4px 0;
    white-space: nowrap;
}

.khan-shop-offer__title {
    font-family: 'Fine Art Sans Serif', Georgia, 'Times New Roman', serif;
    font-size: 43.77px;
    font-weight: 400;
    line-height: 1;
    margin: 0 0 8px 0;
    white-space: nowrap;
}

.khan-shop-offer__link {
    font-family: 'Readex Pro', sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: auto;
    white-space: nowrap;
}

.khan-shop-offer__link:hover {
    opacity: 0.9;
}

@media (max-width: 1199.98px) {
    .khan-shop-offer {
        height: 160px;
    }

    .khan-shop-offer__eyebrow {
        font-size: 18px;
    }

    .khan-shop-offer__title {
        font-size: 36px;
    }
}

@media (max-width: 991.98px) {
    .khan-shop-offer {
        height: 140px;
    }

    .khan-shop-offer__eyebrow {
        font-size: 16px;
    }

    .khan-shop-offer__title {
        font-size: 28px;
    }

    .khan-shop-offer__link {
        font-size: 14px;
    }
}

@media (max-width: 767px) {
    .khan-shop-offer {
        height: 120px;
    }

    .khan-shop-offer__eyebrow {
        font-size: 14px;
    }

    .khan-shop-offer__title {
        font-size: 24px;
    }

    .khan-shop-offer__link {
        font-size: 13px;
    }

    .khan-shop-offer__figure--center {
        display: none;
    }
}

/* ----- Filters Bar (150:12117) - Horizontal Layout ----- */
.khan-shop-filters-bar {
    background: #ffffff;
    box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.04);
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
}

.khan-shop-filters-bar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    max-width: 1180px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    overflow: visible;
}

.khan-shop-filters-bar__all-filters {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 12px;
    background: transparent;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
}

.khan-shop-filters-bar__all-filters-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.khan-shop-filters-bar__all-filters-icon img {
    width: 24px;
    height: 24px;
}

.khan-shop-filters-bar__all-filters-text {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.4;
    color: #757575;
    white-space: nowrap;
}

.khan-shop-filters-bar__chips {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: nowrap;
    flex: 1;
    padding: 0 8px;
    position: static;
    overflow: visible;
    max-width: 836px;
}

.khan-shop-filters-bar__chips::-webkit-scrollbar {
    display: none;
}

.khan-shop-filters-bar__chip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 12px;
    background: #ffffff;
    border: 1px solid #e0e0e5;
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.2s ease, background 0.2s ease;
    overflow: clip;
}

.khan-shop-filters-bar__chip:hover {
    border-color: #222029;
}

.khan-shop-filters-bar__chip.active {
    border-color: var(--primary, #d43533);
}

.khan-shop-filters-bar__chip-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.khan-shop-filters-bar__chip-icon img {
    width: 24px;
    height: 24px;
}

.khan-shop-filters-bar__chip-text {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.4;
    color: #7f7b87;
    white-space: nowrap;
}

.khan-shop-filters-bar__chip.active .khan-shop-filters-bar__chip-text {
    color: var(--primary, #d43533);
}

.khan-shop-filters-bar__chip-arrow {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.khan-shop-filters-bar__chip-arrow img {
    width: 24px;
    height: 24px;
}

.khan-shop-filters-bar__chip.active .khan-shop-filters-bar__chip-arrow {
    transform: rotate(180deg);
}

.khan-shop-filters-bar__right {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-shrink: 0;
    width: 217px;
}

.khan-shop-filters-bar__view-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
}

.khan-shop-filters-bar__view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s ease;
    padding: 0;
}

.khan-shop-filters-bar__view-btn:hover,
.khan-shop-filters-bar__view-btn.active {
    opacity: 1;
}

.khan-shop-filters-bar__view-btn img {
    width: 24px;
    height: 24px;
}

/* Sort Dropdown (Figma: 150:12142) */
.khan-shop-filters-bar__sort-wrapper {
    position: relative;
}

.khan-shop-filters-bar__sort-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #ffffff;
    border: 1px solid #e0e0e5;
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.khan-shop-filters-bar__sort-btn:hover {
    border-color: #222029;
}

.khan-shop-filters-bar__sort-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.khan-shop-filters-bar__sort-icon img {
    width: 24px;
    height: 24px;
}

.khan-shop-filters-bar__sort-text {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.4;
    color: #7f7b87;
    white-space: nowrap;
}

.khan-shop-filters-bar__sort-arrow {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.khan-shop-filters-bar__sort-arrow img {
    width: 24px;
    height: 24px;
}

.khan-shop-filters-bar__sort-btn.active .khan-shop-filters-bar__sort-arrow {
    transform: rotate(180deg);
}

/* Legacy sort styles - keep for compatibility */
.khan-shop-filters-bar__sort {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #ffffff;
    border: 1px solid #e0e0e5;
    border-radius: 4px;
    cursor: pointer;
}

@media (max-width: 991.98px) {
    .khan-shop-filters-bar__chips {
        display: none;
    }

    .khan-shop-filters-bar__view-toggle {
        display: none;
    }

    .khan-shop-filters-bar__right {
        width: auto;
    }
}

@media (max-width: 767px) {
    .khan-shop-filters-bar {
        padding: 8px 12px;
    }

    .khan-shop-filters-bar__inner {
        justify-content: space-between;
    }

    .khan-shop-filters-bar__all-filters-text {
        display: none;
    }

    .khan-shop-filters-bar__sort-text {
        display: none;
    }

    .khan-shop-filters-bar__sort-btn {
        padding: 8px;
    }
}

/* ----- Product Card (150:12153) - Exact Figma Specs ----- */
.khan-shop-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 482px;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: -1px 3px 22px 0 rgba(65, 89, 96, 0.02);
    transition: box-shadow 0.2s ease;
}

.khan-shop-card:hover {
    box-shadow: -1px 3px 22px 0 rgba(65, 89, 96, 0.08);
}

.khan-shop-card__media {
    position: relative;
    width: 100%;
    height: 370px;
    overflow: hidden;
    background: #f5f5f5;
    flex-shrink: 0;
}

.khan-shop-card__image-link {
    display: block;
    width: 100%;
    height: 100%;
}

.khan-shop-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.khan-shop-card:hover .khan-shop-card__image {
    transform: scale(1.03);
}

.khan-shop-card__badges {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    z-index: 4;
    padding: 0;
}

.khan-shop-card__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 6px;
    font-family: 'Readex Pro', sans-serif;
    font-weight: 400;
    font-size: 13px;
    line-height: 1.5;
    color: #ffffff;
    white-space: nowrap;
}

.khan-shop-card__badge--soldout {
    background: #f00000;
}

.khan-shop-card__badge--exclusive {
    background: #007bff;
}

.khan-shop-card__badge--new {
    background: #17a2b8;
}

.khan-shop-card__badge--sale {
    background: #28a745;
}

.khan-shop-card__badge--back {
    background: #17a2b8;
}

.khan-shop-card__badge--todays-deal {
    background: #ff9800;
}

.khan-shop-card__badge--flash-deal {
    background: #e91e63;
}

.khan-shop-card__badge--inner-gift {
    background: #9c27b0;
}

.khan-shop-card__wishlist {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: none;
    border-radius: 7.53px;
    cursor: pointer;
    z-index: 5;
    box-shadow: 0 3.77px 7.53px -1.88px rgba(16, 24, 40, 0.1),
                0 1.88px 3.77px -1.88px rgba(16, 24, 40, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    padding: 8px;
}

.khan-shop-card__wishlist:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.khan-shop-card__wishlist svg {
    width: 16.94px;
    height: 16.94px;
    fill: none;
    stroke: #222222;
    stroke-width: 2;
    transition: fill 0.2s ease, stroke 0.2s ease;
}

.khan-shop-card__wishlist:hover svg,
.khan-shop-card__wishlist.active svg {
    fill: #d43533;
    stroke: #d43533;
}

.khan-shop-card__body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 12px;
    background: #ffffff;
    flex: 1;
}

.khan-shop-card__title {
    font-family: 'Readex Pro', sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.4;
    color: #212121;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
    margin: 0 0 2px 0;
}

.khan-shop-card__title:hover {
    color: var(--primary, #d43533);
}

.khan-shop-card__subtitle {
    font-family: 'Readex Pro', sans-serif;
    font-weight: 400;
    font-size: 13px;
    line-height: 1.5;
    color: #68656e;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.khan-shop-card__price {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    padding: 2px 0;
    flex-wrap: wrap;
}

.khan-shop-card__price-current {
    font-family: 'Readex Pro', sans-serif;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.5;
    color: #000000;
    white-space: nowrap;
}

.khan-shop-card__price-old {
    font-family: 'Readex Pro', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.5;
    color: #1b1b28;
    text-decoration: line-through;
    opacity: 0.5;
    white-space: nowrap;
}

.khan-shop-card__price-off {
    font-family: 'Readex Pro', sans-serif;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
    color: #0dac57;
    white-space: nowrap;
}

.khan-shop-card__swatches {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 24px;
    padding: 2px 0;
    margin-top: auto;
}

.khan-shop-card__swatch {
    width: 24px;
    height: 24px;
    border-radius: 20px;
    border: 1px solid #e3e3e3;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.khan-shop-card__swatch:hover {
    transform: scale(1.08);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.khan-shop-card__swatch--more {
    background: #bdbdbd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Readex Pro', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #222222;
}

/* Responsive Product Card */
@media (max-width: 1199.98px) {
    .khan-shop-card {
        min-height: 420px;
    }

    .khan-shop-card__media {
        height: 320px;
    }
}

@media (max-width: 991.98px) {
    .khan-shop-card {
        min-height: 380px;
    }

    .khan-shop-card__media {
        height: 280px;
    }

    .khan-shop-card__body {
        padding: 8px 10px 10px;
    }

    .khan-shop-card__title {
        font-size: 14px;
    }

    .khan-shop-card__subtitle {
        font-size: 12px;
    }
}

@media (max-width: 767px) {
    .khan-shop-card {
        min-height: 320px;
    }

    .khan-shop-card__media {
        height: 220px;
    }

    .khan-shop-card__wishlist {
        width: 36px;
        height: 36px;
        padding: 6px;
    }

    .khan-shop-card__wishlist svg {
        width: 14px;
        height: 14px;
    }

    .khan-shop-card__swatch {
        width: 20px;
        height: 20px;
    }
}

/* ----- Section Header (150:12149-150:12150) ----- */
.khan-shop-section__header {
    margin-bottom: 24px;
}

.khan-shop-section__title {
    font-family: 'Readex Pro', sans-serif;
    font-weight: 500;
    font-size: 28.8px;
    line-height: 1.2;
    color: #222029;
    margin: 0 0 8px 0;
}

.khan-shop-section__subtitle {
    font-family: 'Readex Pro', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.6;
    color: #68656e;
    margin: 0;
    max-width: 1028px;
}

@media (max-width: 767px) {
    .khan-shop-section__title {
        font-size: 22px;
    }

    .khan-shop-section__subtitle {
        font-size: 13px;
    }
}

/* ----- Products Section Container (Figma: 130px padding, 1180px max-width) ----- */
.khan-shop-section {
    padding: 0 130px;
    max-width: 100%;
}

.khan-shop-section__container {
    max-width: 1180px;
    margin: 0 auto;
}

@media (max-width: 1439.98px) {
    .khan-shop-section {
        padding: 0 64px;
    }
}

@media (max-width: 1199.98px) {
    .khan-shop-section {
        padding: 0 32px;
    }
}

@media (max-width: 767px) {
    .khan-shop-section {
        padding: 0 16px;
    }
}

/* ----- Filter Chip Wrapper (for dropdown positioning) ----- */
.khan-shop-filters-bar__chip-wrapper {
    position: relative;
    overflow: visible;
}

/* Sort wrapper also needs overflow visible */
.khan-shop-filters-bar__sort-wrapper {
    position: relative;
    overflow: visible;
}

/* ----- Filter Dropdown (for horizontal bar integration) ----- */
.khan-shop-filter-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: #ffffff;
    border: 1px solid #e0e0e5;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    max-width: 320px;
    max-height: 320px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 9999;
    display: none;
    padding: 8px;
    animation: dropdownFadeIn 0.15s ease;
    box-sizing: border-box;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.khan-shop-filter-dropdown.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    background: #ffffff !important;
    transform: none !important;
    clip: auto !important;
    clip-path: none !important;
}

.khan-shop-filter-dropdown__item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    font-family: 'Readex Pro', sans-serif;
    font-size: 14px;
    color: #212121;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.15s ease, color 0.15s ease;
    cursor: pointer;
}

.khan-shop-filter-dropdown__item:hover {
    background: #f5f5f5;
}

.khan-shop-filter-dropdown__item.active {
    background: var(--primary, #d43533);
    color: #ffffff;
}

.khan-shop-filter-dropdown__item--color {
    display: flex;
    align-items: center;
    gap: 8px;
}

.khan-shop-filter-dropdown__color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.khan-shop-filter-dropdown__divider {
    height: 1px;
    background: #e0e0e5;
    margin: 8px 0;
}

.khan-shop-filter-dropdown__item--clear {
    color: #757575;
    font-size: 13px;
}

.khan-shop-filter-dropdown__item--clear:hover {
    color: var(--primary, #d43533);
    background: transparent;
}

.khan-shop-filter-dropdown__item--clear i {
    font-size: 14px;
}

/* ----- Price Dropdown Specific Styles ----- */
.khan-shop-filter-dropdown--price {
    min-width: 280px;
    padding: 16px;
}

.khan-shop-filter-dropdown__price {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.khan-shop-filter-dropdown__price-slider {
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    position: relative;
}

/* noUiSlider styles for dropdown */
.khan-shop-filter-dropdown__price-slider .noUi-target {
    background: #e0e0e0;
    border-radius: 3px;
    border: none;
    box-shadow: none;
}

.khan-shop-filter-dropdown__price-slider .noUi-connect {
    background: #222029;
}

.khan-shop-filter-dropdown__price-slider .noUi-handle {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #222029;
    border: 2px solid #ffffff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    cursor: grab;
    right: -9px;
    top: -6px;
}

.khan-shop-filter-dropdown__price-slider .noUi-handle:after,
.khan-shop-filter-dropdown__price-slider .noUi-handle:before {
    display: none;
}

.khan-shop-filter-dropdown__price-slider .noUi-handle:active {
    cursor: grabbing;
    transform: scale(1.1);
}

.khan-shop-filter-dropdown__price-labels {
    display: flex;
    justify-content: space-between;
    font-family: 'Readex Pro', sans-serif;
    font-size: 13px;
    color: #68656e;
}

.khan-shop-filter-dropdown__price-labels strong {
    color: #212121;
    font-weight: 600;
}

.khan-shop-filter-dropdown__apply {
    width: 100%;
    padding: 10px 16px;
    background: var(--primary, #d43533);
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-family: 'Readex Pro', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.khan-shop-filter-dropdown__apply:hover {
    background: var(--primary-dark, #b32d2b);
}

/* ----- Price Input Fields ----- */
.khan-shop-filter-dropdown__price-inputs {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.khan-shop-filter-dropdown__price-input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.khan-shop-filter-dropdown__price-input-group label {
    font-family: 'Readex Pro', sans-serif;
    font-size: 12px;
    color: #68656e;
    margin: 0;
}

.khan-shop-filter-dropdown__price-input-group input {
    font-family: 'Readex Pro', sans-serif;
    font-size: 14px;
    padding: 8px 12px;
    border: 1px solid #e0e0e5;
    border-radius: 4px;
    background: #ffffff;
    color: #212121;
    width: 100%;
}

.khan-shop-filter-dropdown__price-input-group input:focus {
    border-color: #222029;
    outline: none;
}

/* ----- Dropdown Arrow Indicator ----- */
.khan-shop-filters-bar__chip-arrow {
    transition: transform 0.2s ease;
}

.khan-shop-filters-bar__chip.active .khan-shop-filters-bar__chip-arrow {
    transform: rotate(180deg);
}

/* ----- Product Grid Container ----- */
.khan-shop-products {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 16px;
}

@media (max-width: 1199.98px) {
    .khan-shop-products {
        padding: 0 12px;
    }
}

/* ----- Product Grid ----- */
.khan-shop-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.khan-shop-grid__item {
    width: 100%;
}

@media (max-width: 1199.98px) {
    .khan-shop-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 991.98px) {
    .khan-shop-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .khan-shop-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

/* ----- List View Modifier (4 items per row) ----- */
.khan-shop-grid--list {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 16px !important;
}

@media (max-width: 1199.98px) {
    .khan-shop-grid--list {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

@media (max-width: 991.98px) {
    .khan-shop-grid--list {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 767px) {
    .khan-shop-grid--list {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
}

/* ----- Infinite Scroll Loader ----- */
.khan-shop-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px;
    font-family: 'Readex Pro', sans-serif;
    font-size: 14px;
    color: #7f7b87;
}

.khan-shop-loader__spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #e0e0e5;
    border-top-color: var(--primary, #d43533);
    border-radius: 50%;
    animation: khan-spin 0.8s linear infinite;
}

@keyframes khan-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ----- Dropdown visibility fix ----- */
/* Ensure dropdowns are never clipped by parent containers */
.khan-shop-filters-bar,
.khan-shop-filters-bar *,
.khan-shop-filters-bar__inner,
.khan-shop-filters-bar__chips,
.khan-shop-filters-bar__chip-wrapper,
.khan-shop-filters-bar__sort-wrapper {
    overflow: visible !important;
}

/* Force dropdown to be visible when shown */
.khan-shop-filter-dropdown.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 99999 !important;
}