.page-banner {
    padding: 100px 0;
    text-align: center;
    background:
        linear-gradient(135deg,
            var(--primary),
            var(--secondary));
    color: white;
}

.products-page {
    padding: 80px 0;
}

.products-layout {
    display: grid;
    grid-template-columns:
        300px 1fr;
    gap: 40px;
}

.sidebar {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    height: fit-content;
}

.sidebar h3 {
    margin-bottom: 20px;
}

.sidebar label {
    display: block;
    margin: 12px 0;
}

.sidebar select,
.sidebar input[type="range"] {
    width: 100%;
    margin-top: 15px;
}

.sidebar hr {
    margin: 25px 0;
    border: none;
    border-top: 1px solid #eee;
}

.product-content {
    width: 100%;
}

.product-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 50px;
}

.pagination a {
    padding: 12px 18px;
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: #222;
}

.pagination a:hover {
    background: var(--primary);
    color: white;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.products-grid>.category-block {
    grid-column: 1 / -1;
}

.category-block {
    margin-bottom: 30px;
}

.category-header {
    margin-bottom: 18px;
}

.category-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: #1d1d1d;
}

.category-products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 22px;
    align-items: stretch;
}

.product-card {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: #fff;
    border: 1px solid #efefef;
    box-shadow: 0 10px 25px rgba(0, 0, 0, .04);
    transition: .3s;
    min-width: 0;
}

.product-card:hover {
    transform:
        translateY(-8px);
}

.discount-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
    background: #ff3158;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    padding: 8px 15px;
    border-radius: 30px;
}

.wishlist-count {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    background: #999;
    color: #ff9800;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    z-index: 2;
}

.product-image {
    background: #f4f4f4;
    margin: 12px;
    border-radius: 25px;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    max-width: 85%;
    max-height: 220px;
    object-fit: contain;
}

.placeholder-image {
    background: linear-gradient(135deg, #2a2a2a, #d32f2f);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.placeholder-image span {
    color: #fff;
    font-size: 42px;
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.product-info {
    padding: 18px;
}

.product-id,
.product-category {
    color: #8e97b3;
    margin-bottom: 8px;
    font-size: 14px;
}

.product-info h3 {
    color: #000;
    font-size: 15px;
    margin-bottom: 12px;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.old-price {
    color: #8d92a6;
    text-decoration: line-through;
}

.new-price {
    color: #ff9800;
    font-size: 15px;
    font-weight: 700;
}

.unit {
    color: #8d92a6;
}

.cart-wrapper {
    margin-top: 10px;
}

.add-btn {
    width: 100%;
    height: 42px;
    border: none;
    cursor: pointer;
    border-radius: 14px;
    background:
        linear-gradient(90deg,
            #ff6a00,
            #ff7e00);
    color: #fff;
    font-size: 22px;
    font-weight: 600;
}

.qty-box {
    display: none;
    align-items: center;
    justify-content: space-between;
    background:
        linear-gradient(90deg,
            #ff6a00,
            #ff7e00);
    border-radius: 14px;
    height: 42px;
    padding: 0 12px;
}

.qty-box button {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: rgba(255, 255, 255, .18);
    color: #fff;
    font-size: 22px;
    font-weight: 700;
}

.qty {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
}

@media(max-width:1200px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media(max-width:980px) {
    .products-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        order: 2;
    }

    .product-content {
        order: 1;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .page-banner {
        padding: 80px 0;
    }
}

@media(max-width:700px) {
    .product-top {
        justify-content: center;
        text-align: center;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        padding: 20px;
    }

    .product-image {
        height: 220px;
    }

    .cart-drawer {
        width: min(100vw, 420px);
    }

    .checkout-modal {
        width: min(95vw, 650px);
    }
}

@media(max-width:576px) {
    .page-banner {
        padding: 70px 0;
    }

    .page-banner h1 {
        font-size: 34px;
    }

    .page-banner p {
        font-size: 15px;
    }

    .products-page {
        padding: 60px 0;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .product-card {
        min-width: 0;
    }

    .cart-drawer {
        right: -100%;
        width: 100vw;
    }

    .checkout-modal {
        width: 94vw;
    }
}

/* CART SIDEBAR */

.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: .3s;
    z-index: 9998;
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: -450px;
    width: 420px;
    max-width: 100vw;
    height: 100vh;
    background: rgba(15, 20, 35, .96);
    backdrop-filter: blur(20px);
    transition: .4s;
    z-index: 9999;
    display: flex;
    flex-direction: column;
}

.cart-drawer.active {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.cart-header h3 {
    color: #fff;
}

.cart-header button {
    background: none;
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
}

#cartItems {
    flex: 1;
    overflow: auto;
    padding: 20px;
}

.cart-item {
    display: flex;
    gap: 15px;
    align-items: center;
    background: rgba(255, 255, 255, .05);
    padding: 12px;
    border-radius: 15px;
    margin-bottom: 15px;
}

.cart-item img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 10px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-info h4 {
    color: white;
    margin-bottom: 6px;
}

.cart-item-info p {
    color: #ff9800;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.cart-total {
    color: white;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 15px;
}

.checkout-btn {
    width: 100%;
    height: 55px;
    border: none;
    border-radius: 14px;
    background:
        linear-gradient(135deg,
            #ff6a00,
            #ff9800);
    color: white;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
}

.cart-total {
    color: #fff;
}

/* CHECKOUT MODAL  */
.close-checkout {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    cursor: pointer;
}

.checkout-btn {
    width: 100%;
    height: 55px;
    background: #d60000;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
}

.checkout-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .65);
    display: none;
    z-index: 9999;
}

.order-loader-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20000;
}

.loader-box {
    background: #fff;
    border-radius: 20px;
    padding: 30px 35px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.loader-spinner {
    width: 52px;
    height: 52px;
    border: 5px solid #f1f1f1;
    border-top-color: #d60000;
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: spin 1s linear infinite;
}

.loader-box p {
    margin: 0;
    font-weight: 600;
    color: #222;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.checkout-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 650px;
    max-width: 95vw;
    max-height: 85vh;
    background: #fff;
    border-radius: 20px;
    display: none;
    z-index: 10000;
    overflow: hidden;
}

.checkout-header {
    padding: 20px;
    background: #d60000;
    color: #fff;
    display: flex;
    justify-content: space-between;
}

.checkout-body {
    padding: 25px;
    max-height: calc(85vh - 90px);
    overflow-y: auto;
}

.checkout-error {
    margin-bottom: 15px;
    background: #fff1f1;
    border: 1px solid #f5b5b5;
    color: #b42318;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 600;
}

.order-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-field.full {
    grid-column: 1 / -1;
}

.form-field label {
    font-size: 13px;
    font-weight: 700;
    color: #222;
}

.form-field input,
.form-field textarea {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 12px 14px;
    font: inherit;
    background: #fff;
}

.form-field textarea {
    resize: vertical;
    min-height: 80px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin: 15px 0;
}

.discount-text {
    color: #1a9b32;
    font-weight: bold;
}

.total {
    font-size: 22px;
}

.minimum-order {
    margin-top: 20px;
    color: red;
    font-size: 17px;
    font-weight: bold;
}

.place-order-btn {
    margin-top: 25px;
    width: 100%;
    height: 55px;
    background: #d60000;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    cursor: pointer;

}

.checkout-product {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #ececec;
}

.checkout-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.checkout-product img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    border: 1px solid #eee;
    border-radius: 10px;
    background: #fff;
}

.checkout-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.checkout-info h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.checkout-info p {
    margin: 0;
    color: #666;
}

.checkout-info span {
    color: #e30000;
    font-weight: 700;
}

.checkout-right {
    font-size: 20px;
    font-weight: 700;
    color: #111;
}