body {
    background-color: #ffffff;
}

.products-page-body {
    max-width: 1400px;
    margin: 0 auto 80px;
    padding: 0 24px;
}


.breadcrumb {
    max-width: 1400px;
    margin: 110px auto 0;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #64748b;
}

.breadcrumb a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: #2168ff;
}

.breadcrumb .current {
    color: #0f172a;
    font-weight: 600;
}

.category-hero {
    max-width: 1400px;
    margin: 10px auto 25px;
    padding: 24px 24px;
    background: url(/media/banners/product_bannerr.jpg);
    box-shadow: rgb(243, 242, 242) 0px 30px 60px -12px inset, rgb(251, 247, 247) 0px 18px 36px -18px inset;
    border: 1px solid #ffffff;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.category-hero-text h1 {
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.category-hero-text p {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

.category-hero-text p strong {
    color: #2168ff;
    font-weight: 700;
}

.category-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    font-size: 12px;
    color: #334155;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

/* -----------------------------------------------------
   FILTER BAR & BRAND CHIPS
----------------------------------------------------- */
.products-filter-bar {
    max-width: 1400px;
    margin: 0 auto 30px;
    padding: 0 24px;
}

.filter-form-wrapper {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 18px 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.filter-form {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-input-group {
    position: relative;
    flex: 1;
    min-width: 180px;
}

.filter-form input[type="text"],
.filter-form input[type="number"] {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-family: inherit;
    font-size: 13px;
    color: #0f172a;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.filter-form input:focus {
    background: #ffffff;
    border-color: #2168ff;
    box-shadow: 0 0 0 3px rgba(33, 104, 255, 0.12);
}

.filter-btn-submit {
    height: 44px;
    padding: 0 24px;
    background: #2168ff;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.filter-btn-submit:hover {
    background: #1455e6;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(33, 104, 255, 0.25);
}

.clear-filter-btn {
    height: 44px;
    padding: 0 16px;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.clear-filter-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.filter-discount-btn {
    height: 44px;
    padding: 0 16px;
    background: #fff1f2;
    color: #e11d48;
    border: 1px solid #fecdd3;
    border-radius: 10px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.filter-discount-btn:hover,
.filter-discount-btn.active {
    background: #e11d48;
    color: #ffffff;
    border-color: #e11d48;
}

/* Brand Quick Chips */
.brand-chips-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

.brand-chips-title {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    margin-left: 6px;
}

.brand-chip {
    padding: 6px 14px;
    border-radius: 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.brand-chip:hover {
    border-color: #2168ff;
    color: #2168ff;
    background: #eff6ff;
}

.brand-chip.active {
    background: #2168ff;
    border-color: #2168ff;
    color: #ffffff;
    font-weight: 600;
}

/* =====================================================
   CUSTOM DROPDOWN / SELECT COMPONENT
===================================================== */
.custom-select-wrapper {
    position: relative;
    width: 100%;
    user-select: none;
}

.custom-select-trigger {
    width: 100%;
    height: 44px;
    padding: 0 12px 0 14px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.custom-select-trigger:hover {
    background: #ffffff;
    border-color: #94a3b8;
}

.custom-select-wrapper.open .custom-select-trigger {
    background: #ffffff;
    border-color: #2168ff;
    box-shadow: 0 0 0 3px rgba(33, 104, 255, 0.14);
}

.custom-select-wrapper.has-value .custom-select-trigger {
    border-color: #2168ff;
    color: #2168ff;
    background: #f0f5ff;
}

.custom-select-icon {
    display: flex;
    align-items: center;
    color: #64748b;
    flex-shrink: 0;
}

.custom-select-wrapper.has-value .custom-select-icon {
    color: #2168ff;
}

.custom-select-label {
    flex: 1;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.custom-select-arrow {
    flex-shrink: 0;
    color: #64748b;
    transition: transform 0.25s ease;
}

.custom-select-wrapper.open .custom-select-arrow {
    transform: rotate(180deg);
    color: #2168ff;
}

/* Dropdown Menu */
.custom-select-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    min-width: 175px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow:
        0 14px 30px -4px rgba(15, 23, 42, 0.12),
        0 0 0 1px rgba(0, 0, 0, 0.04);
    padding: 6px;
    z-index: 1000;
    max-height: 250px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.custom-select-wrapper.open .custom-select-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-select-option {
    padding: 9px 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s ease;
}

.custom-select-option:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.custom-select-option.selected {
    background: #eff6ff;
    color: #2168ff;
    font-weight: 700;
}

.custom-select-option .check-icon {
    opacity: 0;
    color: #2168ff;
    flex-shrink: 0;
    transition: opacity 0.15s ease;
}

.custom-select-option.selected .check-icon {
    opacity: 1;
}

/* Loading state on products grid */
.products-grid.loading {
    opacity: 0.45;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/* -----------------------------------------------------
   PRODUCTS GRID
----------------------------------------------------- */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    width: 100%;
}

/* -----------------------------------------------------
   PRODUCT CARD (COMPACT & MODERN)
----------------------------------------------------- */
.product-card {
    background: #ffffff;
    border: 1px solid #eef2f6;
    border-radius: 16px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    min-width: 0;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: #cbd5e1;
    box-shadow: 0 14px 28px -4px rgba(15, 23, 42, 0.09);
}

/* Wishlist Button */
.product-card .wishlist {
    position: absolute;
    top: 10px;
    right: 10px;
    left: auto;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 15px;
    z-index: 5;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.product-card .wishlist:hover {
    color: #ef4444;
    border-color: #fecdd3;
    background: #fff1f2;
    transform: scale(1.1);
}


.discount-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    right: auto;
    background: #e11d48;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 0 6px;
    height: 20px;
    line-height: 20px;
    min-width: 54px;
    box-sizing: border-box;
    border-radius: 999px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap !important;
    word-break: keep-all;
    gap: 2px;
    box-shadow: 0 2px 6px rgba(225, 29, 72, 0.25);
    flex-shrink: 0;
}

/* Product Image */
.product-card>a:not(.wishlist) {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.product-image {
    width: 100%;
    height: 155px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: #f8fafc;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 10px;
}

.product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.35s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.06);
}

.product-no-image {
    width: 100%;
    height: 100%;
    border: 1.5px dashed #cbd5e1;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #94a3b8;
    background: #f8fafc;
}

.product-no-image svg {
    width: 32px;
    height: 32px;
    stroke: currentColor;
}

.product-no-image span {
    font-size: 11px;
    font-weight: 600;
}

/* Product Info */
.product-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.product-brand {
    font-size: 10.5px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.product-name {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.4;
    min-height: 36px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

.product-card:hover .product-name {
    color: #2168ff;
}

/* Rating */
.product-rating {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 11.5px;
    color: #64748b;
    margin-top: 1px;
}

.product-rating .star {
    color: #f59e0b;
    font-size: 12.5px;
}

/* Price */
.product-price {
    margin-top: auto;
    padding-top: 6px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    min-height: 40px;
    gap: 3px;
    width: 100%;
    overflow: hidden;
}

.product-price del {
    color: #94a3b8;
    font-size: 11px;
    text-decoration: line-through;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1.2;
}

.product-price-current {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    max-width: 100%;
    overflow: hidden;
}

.product-price strong {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.product-price span {
    font-size: 10.5px;
    color: #64748b;
    white-space: nowrap;
}

/* Add to Cart Button */
.product-card form {
    margin-top: auto;
    width: 100%;
}

.product-card .add-cart {
    width: 100%;
    height: 36px;
    border-radius: 9px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #0f172a;
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.product-card .add-cart svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    transition: transform 0.2s ease;
}

.product-card .add-cart:hover {
    background: #2168ff;
    border-color: #2168ff;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(33, 104, 255, 0.22);
}

.product-card .add-cart:hover svg {
    transform: scale(1.15);
}

.product-card .add-cart.add-cart-disabled,
.product-card .add-cart.add-cart-disabled:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
    cursor: not-allowed;
    box-shadow: none;
    text-decoration: none;
    font-weight: 800;
}

.unavailable-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.unavailable-filter-chip input {
    width: 14px;
    height: 14px;
    accent-color: #2168ff;
    cursor: pointer;
    margin: 0;
}

.unavailable-filter-chip:hover {
    border-color: #cbd5e1;
    color: #0f172a;
}

.unavailable-filter-chip.active {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.out-of-stock-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(185, 28, 28, 0.94);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.2px;
}

/* -----------------------------------------------------
   EMPTY STATE (NO PRODUCTS)
----------------------------------------------------- */
.no-products-msg {
    grid-column: 1 / -1;
    text-align: center;
    padding: 70px 20px;
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    border-radius: 18px;
}

.no-products-msg p {
    font-size: 17px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 12px;
}

.no-products-msg a {
    display: inline-block;
    padding: 10px 22px;
    background: #2168ff;
    color: #ffffff;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.no-products-msg a:hover {
    background: #1455e6;
}

/* -----------------------------------------------------
   RESPONSIVE (TABLET & MOBILE)
----------------------------------------------------- */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 14px;
    }

    .product-image {
        height: 145px;
    }
}

@media (max-width: 768px) {
    .breadcrumb {
        margin-top: 80px;
        padding: 10px 16px;
    }

    .category-hero {
        margin: 10px 15px 20px;
        padding: 12px 10px;
    }

    .category-hero-text h1 {
        font-size: 20px;
    }

    .products-filter-bar {
        padding: 0 16px;
        margin-bottom: 20px;
    }

    .filter-form-wrapper {
        padding: 14px;
    }

    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-btn-submit,
    .clear-filter-btn,
    .filter-discount-btn {
        width: 100%;
        justify-content: center;
    }

    .products-page-body {
        padding: 0 16px 50px;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .product-card {
        padding: 10px;
        border-radius: 14px;
    }

    .product-image {
        height: 130px;
        padding: 6px;
    }

    .product-name {
        font-size: 12px;
        min-height: 32px;
    }

    .product-price {
        min-height: 34px;
    }

    .product-price strong {
        font-size: 13.5px;
    }

    .product-card form {
        margin-top: auto;
        width: 100%;
    }

    .product-card .add-cart {
        height: 34px;
        font-size: 11px;
    }

    .product-card .wishlist {
        top: 8px;
        right: 8px;
        left: auto;
        width: 28px;
        height: 28px;
    }

    .discount-badge {
        top: 8px;
        left: 8px;
        right: auto;
        font-size: 9.5px;
        height: 18px;
        line-height: 18px;
        min-width: 50px;
        padding: 0 5px;
        white-space: nowrap !important;
    }
}

@media (max-width: 420px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .product-card {
        padding: 8px;
    }

    .product-image {
        height: 115px;
    }

    .product-price {
        min-height: 30px;
    }

    .product-card form {
        margin-top: auto;
        width: 100%;
    }

    .product-card .wishlist {
        top: 6px;
        right: 6px;
        left: auto;
        width: 24px;
        height: 24px;
    }

    .discount-badge {
        top: 6px;
        left: 6px;
        right: auto;
        font-size: 8.5px;
        height: 17px;
        line-height: 17px;
        min-width: 46px;
        padding: 0 4px;
        white-space: nowrap !important;
    }
}