﻿/* ----------------------------- */
/* PRODUCTS GRID */
/* ----------------------------- */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

/* ----------------------------- */
/* PRODUCT CARD */
/* ----------------------------- */
.product-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-radius: 14px;
    padding: 14px;
    background: #fff;
    border: 1px solid #eee;
    transition: transform .25s ease, box-shadow .25s ease;
    box-shadow: 0 14px 30px rgba(0,0,0,.08);
}

    .product-card:hover {
        box-shadow: 0 18px 40px rgba(0,0,0,.08);
    }

/* IMAGE */
.product-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.product-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform .4s ease;
}

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

/* FEATURED BADGE */
.featured-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 999px;
    background: #ffc107;
    color: #111;
    display:none; 
}

/* TEXT */
.product-card h3 {
    font-size: 17px;
    font-weight: 600;
    margin: 6px 0 2px;
    line-height: 1.3;
}

.product-card .category {
    font-size: 13px;
    color: #777;
}

.product-card .description {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    margin: 6px 0;
}

/* META */
.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.price {
    font-size: 17px;
    font-weight: 700;
}

.stock {
    font-size: 13px;
}

.in-stock {
    color: #2e7d32;
}

.out-of-stock {
    color: #c62828;
}

/* SKELETON */
.product-skeleton {
    height: 340px;
    border-radius: 8px;
    background: linear-gradient(90deg, #eee 25%, #f5f5f5 37%, #eee 63%);
    background-size: 400% 100%;
    animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
    from {
        background-position: -400px 0;
    }

    to {
        background-position: 400px 0;
    }
}

/* ----------------------------- */
/* LAYOUT */
/* ----------------------------- */
.products-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

/* Sidebar */
#categories-container {
    flex: 0 0 200px;
}

/* Products */
.products-content {
    flex: 1;
}

/* Desktop category list */
.category-list {
    padding: 0;
    color: #525252;
}

    .category-list li {
        margin-bottom: 5px;
    }

.subcategory-list {
    margin-left: 1.5rem;
    border-left: 1px solid #dee2e6;
    padding-left: 1rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* ----------------------------- */
/* MOBILE CATEGORY FILTER (PILLS) */
/* ----------------------------- */
.mobile-categories {
    display: none;
}

/* ----------------------------- */
/* MOBILE ONLY */
/* ----------------------------- */
@media (max-width: 768px) {

    /* Layout */
    .products-layout {
        flex-direction: column;
        gap: 0;
    }

    /* Kill sidebar completely */
    #categories-container,
    .category-list {
        display: none !important;
        pointer-events: none;
        height: 0;
        overflow: hidden;
    }

    /* Mobile filters */
    .mobile-categories {
        display: block;
        margin-bottom: 1rem;
    }

    .mobile-categories-inner {
        gap: 10px;
        padding: 8px 2px;
        -webkit-overflow-scrolling: touch;
    }

        .mobile-categories-inner::-webkit-scrollbar {
            display: none;
        }

    /* Pills */
    .category-pill {
        flex: 0 0 auto;
        padding: 8px 14px;
        margin: 5px;
        border-radius: 999px;
        border: 1px solid #ddd;
        background: #fff;
        font-size: 14px;
        font-weight: 500;
        white-space: nowrap;
        cursor: pointer;
        transition: all .2s ease;
    }

        .category-pill.active {
            background: #111;
            color: #fff;
            border-color: #111;
        }

        .category-pill:active {
            transform: scale(.95);
        }

    /* Products */
    .products-grid {
        display: block;
    }

    .product-card {
        margin-bottom: 1rem;
    }
}
