/* ========== SLIDESHOW ========== */
.slideshow-container {
    width: 80%; 
    margin: 35px auto;
    position: relative;
    overflow: hidden;
    text-align: center;
} 

.slideshow-container img {
    width: auto;
    max-width: 100%;
    max-height: 40vh;     /* 40% of screen height */
    height: auto;
    display: block;
    margin: 0 auto;       /* center horizontally */
    object-fit: contain; /* no cropping, no distortion */
    border-radius: 12px;
} 

.mySlide {
    display: none;
}

/* ========== TITLE BAR ========== */
.titleCatecory {
    width: 100%;
    padding: 25px;
    display: flex;
    justify-content: space-between;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-variant));
} 

.navbarsection h5{
    color: var(--color-icon);
    font-size: 14px;
}
.navbarsection span{
    color: var(--color-bg);
    font-weight: bolder;
}
.catecoryname{
    color: var(--color-bg);
    font-weight: bolder;
    font-size: 24px;
}

/* ========== LAYOUT ========== */
main {
    width: 80%;
    margin: 0 auto;
    display: flex;
    gap: 20px;
}

aside {
    width: 250px;
}
.cat-wrapper {
    margin-bottom: 10px;
}

.cat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-family: Outfit, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 21px;
    padding: 8px 0;
    
}
.cat-name{
    font-family: Outfit, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 21px;
}

.cat-header:hover {
    color: var(--color-primary);
}

.cat-arrow {
    transition: transform 0.3s;
}

.cat-header.active .cat-arrow {
    transform: rotate(180deg);
}

.subcats {
    display: none;
    padding-left: 15px;
    margin-top: 5px;
}

.subcats label {
    display: block;
    color: var(--color-muted);
    font-family: Inter;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    cursor: pointer;
    margin-bottom: 5px;
}

.catecories, .price, .rating, .brands {
    padding: 15px;
    border-bottom: 1px solid var(--color-muted);
}

.catecories h3, .price h3, .rating h3, .brands h3 {
    font-family: Outfit, sans-serif;
    font-size: 20px;
    font-weight: 600;
    line-height: 28px;
}

.catecories label, .price label, .rating label, .brands label {
    font-family: Outfit, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 21px;
}

/* Range slider */
#rangeSlider .noUi-connect {
  background: var(--color-primary);
}

#rangeSlider .noUi-handle {
  border: 2px solid var(--color-primary);
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
}

.price_input label {
    margin-top: 16px;
}

/* ========== ITEMS CONTAINER ========== */
.container_items {
    flex: 1;
    width: 100%;
}

.items_cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 per row on big screens */
    gap: 25px;
}

/* ========== CARD ========== */
.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
}
.card .promotional {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: red;
    color: #fff;
    padding: 5px 10px;
    font-weight: bold;
    border-radius: 4px;
    font-size: 0.9rem;
    z-index: 10;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.card-image {
    position: relative;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 220px; /* fixed height */
    object-fit: cover;
    transition: transform 0.3s;
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-overlay {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: rgba(0,0,0,0.6);
    color: #fff;
    text-align: center;
    padding: 10px 0;
    opacity: 0;
    transition: opacity 0.3s;
}

.card:hover .card-overlay { 
    opacity: 1;
}

.card-body {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.item-title {
    display: flex;
    justify-content: space-between; /* name left, rating right */
    align-items: center;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
    height: 40px;
}

.item-rating {
    color: #f5c518;
    font-weight: bold;
    font-size: 14px;
}

.item-desc {
    font-size: 14px;
    color: #666;
    min-height: 40px;
}

.price {
    font-size: 16px;
    font-weight: 700;
    color: #28a745;
    margin-bottom: 8px;
}

.price.login-required {
    color: #ff4d4f;
    font-weight: 600;
}

.price .original-price {
    text-decoration: line-through;
    color: #888;
    margin-right: 8px;
}

.price .discounted-price {
    color: red;
    font-weight: bold;
}


.btn-cart {
    padding: 10px;
    width: 100%;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-cart:hover {
    background-color: #0056b3;
}

/* remove overlay completely */
.card-overlay {
    display: none;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1200px) {
    .items_cards {
        grid-template-columns: repeat(2, 1fr); /* 2 per row */
    }
}

@media (max-width: 992px) {
    .slideshow-container {
        width: 90%;
    }
    .card-image img {
        height: 200px;
    }
}

@media (max-width: 768px) {
    main {
        flex-direction: column;
    }
    aside {
        width: 100%; 
        display: flex;
        flex-wrap: wrap; 
        justify-content: space-around; 
        margin-bottom: 20px;
    }
    .catecories, .price, .rating, .brands {
        flex: 1 1 45%;
        margin: 5px;
        border: 1px solid var(--color-muted);
        border-radius: 8px;
    }
    .items_cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .slideshow-container {
        width: 100%;
    }
    aside {
        flex-direction: column;
        align-items: stretch;
    }
    .catecories, .price, .rating, .brands {
        flex: 1 1 100%;
        margin: 5px 0;
    }
    .items_cards {
        grid-template-columns: 1fr; /* 1 per row */
    }
    .card-image img {
        height: 180px;
    }
}

@media (max-width: 448px) {
    .titleCatecory {
        flex-direction: column;
        align-items: center;
    }
    .items_cards {
        gap: 15px;
    }
}
