.products-header {
    text-align: center;
    padding: 52px 40px 38px;
    border-bottom: 1px solid var(--light-sand);
}

.products-header h1 {
    font-family: 'Nunito', sans-serif;
    font-size: 40px;
    font-weight: 400;
    color: var(--dark);
    letter-spacing: .05em;
}

.products-header p {
    margin-top: 8px;
    font-size: 13px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--taupe);
    font-weight: 600;
}

.products-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    max-width: 1100px;
    margin: 0 auto;
    padding: 44px 40px 60px;
    gap: 48px;
}

.filters h4 {
    font-size: 11px;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--taupe);
    margin-bottom: 18px;
    font-weight: 700;
}

.filter-btn {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    padding: 8px 14px;
    border-radius: 8px;
    margin-bottom: 4px;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: var(--light-sand);
}

.filter-btn.active {
    background: var(--sand);
    color: #fff;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px 24px;
}

.product-card {
    cursor: pointer;

}

.product-card-img-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    transition: transform .45s ease;
}

.product-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s ease;

}

.product-card-img-wrap img:hover {
    transform: scale(1.05);
}


.product-img-box {
    width: 100%;
    aspect-ratio: .85;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .45s ease;
    background: linear-gradient(135deg, #e0d8c8 0%, #c8b098 100%);
}

.product-card:hover .product-img-box {
    transform: scale(1.05);
}

.product-img-box svg {
    width: 72px;
    height: 72px;
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--brown);
    color: #fff;
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: 3px 8px;
    font-weight: 700;
}

.product-card-info {
    margin-top: 13px;
}

.product-card-info h5 {
    font-family: 'Nunito', sans-serif;
    font-size: 17px;
    font-weight: 400;
    color: var(--dark);
}

.product-card-info .material {
    font-size: 12px;
    color: var(--taupe);
    letter-spacing: .06em;
}

.product-card-info .price {
    margin-top: 6px;
    font-size: 14px;
    color: var(--brown);
    font-weight: 700;
}

.add-to-cart {
    margin-top: 10px;
    width: 100%;
    padding: 11px;
    border: 1px solid var(--sand);
    background: transparent;
    color: var(--brown);
    font-family: 'Nunito', sans-serif;
    font-size: 11px;
    letter-spacing: .14em;
    text-transform: uppercase;
    font-weight: 700;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.add-to-cart:hover {
    background: var(--brown);
    color: #fff;
    border-color: var(--brown);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(122, 92, 66, 0.25);
}

.qty-control {
    display: flex;
    align-items: center;
    margin-top: 10px;
    border: 1px solid var(--sand);
    border-radius: 8px;
    overflow: hidden;
    width: 100%;
}

.qty-btn {
    flex: 0 0 38px;
    height: 36px;
    background: var(--cream);
    border: none;
    color: var(--brown);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, color .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.qty-btn:hover:not(:disabled) {
    background: var(--brown);
    color: #fff;
}

.qty-btn:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.qty-value {
    flex: 1;
    text-align: center;
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--dark);
    background: #fff;
    height: 36px;
    line-height: 36px;
    border-left: 1px solid var(--light-sand);
    border-right: 1px solid var(--light-sand);
}

.out-of-stock-btn {
    margin-top: 10px;
    width: 100%;
    padding: 11px;
    border: 1px solid var(--light-sand);
    background: var(--cream);
    color: var(--taupe);
    font-family: 'Nunito', sans-serif;
    font-size: 11px;
    letter-spacing: .14em;
    text-transform: uppercase;
    font-weight: 700;
    cursor: not-allowed;
    border-radius: 8px;
}

.cart-icon-wrap {
    position: relative;
    display: inline-flex;
}

.cart-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: var(--brown);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    padding: 0 4px;
    display: none;
    align-items: center;
    justify-content: center;
}


.no-products-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--taupe);
    grid-column: 1 / -1;
}

.no-products-state i {
    font-size: 48px;
    opacity: .3;
    margin-bottom: 16px;
    display: block;
}

.no-products-state p {
    font-size: 14px;
}


.product-img-uploaded {
    width: 100%;
    aspect-ratio: .85;
    object-fit: cover;
    display: block;
    transition: transform .45s ease;
}

/* ── Mobile filter toggle button ── */
.filter-toggle-btn {
    display: none;
    width: 100%;
    padding: 11px 18px;
    background: var(--cream);
    border: 1px solid var(--light-sand);
    font-family: 'Nunito', sans-serif;
    font-size: 12px;
    letter-spacing: .16em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--brown);
    cursor: pointer;
    text-align: left;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.filter-toggle-btn i {
    margin-right: 8px;
}

.filter-toggle-btn:hover {
    background: var(--light-sand);
}

/* ════════════════════════════
   TABLET  (769 – 1024 px)
════════════════════════════ */
@media (max-width: 1024px) {
    .products-layout {
        grid-template-columns: 160px 1fr;
        padding: 36px 28px 50px;
        gap: 32px;
    }

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

    .products-header {
        padding: 44px 28px 30px;
    }
}

/* ════════════════════════════
   MOBILE  (≤ 768 px)
════════════════════════════ */
@media (max-width: 768px) {
    .products-header {
        padding: 36px 18px 24px;
    }

    .products-header h1 {
        font-size: 28px;
    }

    .products-layout {
        grid-template-columns: 1fr;
        padding: 20px 18px 50px;
        gap: 0;
    }

    /* Filter sidebar: collapsible on mobile */
    .filter-toggle-btn {
        display: flex;
        align-items: center;
    }

    .filters {
        overflow: hidden;
        max-height: 0;
        transition: max-height 0.35s ease;
        margin-bottom: 0;
    }

    .filters.open {
        max-height: 500px;
        margin-bottom: 20px;
    }

    .filters h4 {
        margin-top: 4px;
    }

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

    .sort-bar {
        flex-wrap: wrap;
        gap: 8px;
    }

    .sort-bar select {
        min-width: 0;
        flex: 1;
    }

    .product-card-info h5 {
        font-size: 15px;
    }
}

.sort-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--light-sand);
}

.sort-bar label {
    font-size: 11px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--taupe);
    font-weight: 700;
    white-space: nowrap;
}

.sort-bar select {
    padding: 10px 32px 10px 16px;
    border: 1px solid var(--light-sand);
    background: var(--warm-white);
    font-family: 'Nunito', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    border-radius: 8px;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23b09070' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: all 0.3s ease;
    min-width: 180px;
}

.sort-bar select:focus {
    border-color: var(--taupe);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(176, 144, 112, 0.1);
}

.fetch-loading {
    grid-column: 1/-1;
    text-align: center;
    padding: 50px;
    color: var(--text-muted);
}

.product-icon-placeholder {
    color: rgba(255, 255, 255, 0.55);
}

.cart-btn-wrapper {
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 990;
    animation: fadeIn 0.5s ease backwards 0.3s;
}

.cart-btn-wrapper .btn-primary {
    padding: 14px 26px;
    border-radius: 8px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

@media (max-width: 768px) {
    .cart-btn-wrapper {
        bottom: 20px;
        right: 20px;
    }
}