main{
    padding:8%;
}
.product-header{
    background-color: #f2f2f2;
    padding: 10px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 5px;
}
.product-header .menu-icon{
    display: flex;
    align-items: center;
    font-size: 28px;
    cursor: pointer;
    visibility:hidden;
}
.product-header-right{
    display: flex;
    justify-content: center;
    align-items: center;
}
.product-header-right span{
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    margin-right: 4px;
}
.product-header-right #sort{   
    border-radius: 0;
    min-width: auto;
    min-height: auto;
    border: none;
    background-color: transparent;
    font-size: 14px;
    font-weight: 300;
    margin: 0;
    padding: 12px;
    color: #000;
}
#productCount{
    margin-left: 6px;
}
main .container{
    position: relative;
}
/* Categories sidebar: card-style panel with modern typography and link states. */
.aside {
    width: 260px;
    position: absolute;
    top: 20px;
    left: 0;
    background-color: var(--color-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-subtle);
    border: 1px solid var(--border-subtle);
    overflow-x: hidden;
    transition: box-shadow 0.3s ease, transform 0.5s ease;
    padding: 28px 20px 32px;
    z-index: 1;
}
.aside h2 {
    font-size: 1.25rem;
    font-weight: 600;
    font-family: "Josefin Sans", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--color-text);
    margin-bottom: 1.25rem;
    letter-spacing: 0.02em;
}
.shop_categories {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.shop_categories a {
    padding: 12px 16px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    color: var(--color-muted);
    display: block;
    border-radius: var(--radius-sm);
    transition: background-color 0.2s ease, color 0.2s ease;
}
.shop_categories a:hover {
    background-color: var(--color-primary-soft);
    color: var(--color-primary);
}
.shop_categories a.active {
    background-color: var(--color-primary);
    color: #fff;
}

/*---------------- products ---------------------*/
.products{
        margin-left: 0;
        padding: 16px;
        flex-grow: 1;
        transition: margin-left 0.5s;
        width: 100%;
        padding-left: 270px;
}
.products .content{
    /* Match home-page "Trending Products" grid spacing for consistency. */
    display: grid;
    gap: 26px;
    padding: 16px 0.75rem;
}

.product-card {
    /* Reuse trending card visual language: soft radius, surface color, subtle shadow. */
    overflow: hidden;
    border-radius: var(--radius-md);
    background-color: var(--color-surface);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-img{
    position: relative;
    overflow: hidden;
}
.card-img img {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    transition: all 1s linear;
}
.card-img:hover img {
    transform: scale(1.1);
}
.card-img .addToCart {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    font-size: 20px;
    color: #333;
    cursor: pointer;
    transition: all .4s;
}
.card-img .addToCart:hover{
    background-color: #000000dc;
    color: #fff;
}
.card-info {
    /* Align inner spacing with trending product cards for balanced text-block. */
    padding: 16px 18px 18px;
}

.product-name {
    font-size: 14px;
    font-weight: 400;
    color: #222;
    margin: 0 0 8px;
}

/* Product card pricing: matches product details page structure. */
.price_wrapper{
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}
.product-price {
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text);
    margin: 0;
}
.original-price{
    font-size: 13px;
    font-weight: 400;
    color: #868686;
    text-decoration: line-through;
    display: none;
}
.discount-chip{
    background-color: var(--color-primary-soft);
    color: var(--color-primary);
    font-size: 11px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    display: none;
}

@media screen and (max-width: 768px) {
    main {
        padding: 1.5rem 1rem;
    }
    .product-header .menu-icon{
        visibility: visible;
    }
    .sortBy{
        display: none;
    }
    .aside {
        width: 100%;
        left: -200%;
    }
    .aside.open {
        left: 0;
    }
    .products {
        padding-left: 0;
        padding-right: 0;
    }
    .products .content {
        padding: 0 0.25rem;
        gap: 0.5rem;
    }
}
