/* --- Category Banner Section --- */
.category-banner {
    position: relative;
    width: 100%;
    height: 310px;

    background-image: url('../images/tback.png');
    /* User will change this later */
    background-size: cover;
    background-position: center;

    display: flex;
    align-items: center;
    justify-content: center;
}


.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(16, 38, 64, 0.4);
    z-index: 1;
}

.banner-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1400px;
    padding: 0 5%;
    text-align: center;
}


.breadcrumb {
    position: absolute;
    top: -100px;
    left: 5%;
    color: #ffffff;
    font-size: 11px;
    font-family: 'Segoe UI', Roboto, sans-serif;
    letter-spacing: 1px;
    text-transform: capitalize;
}

.breadcrumb a {
    color: #dddddd;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #ffffff;
}

/* Main Title Styling */
.banner-title {
    color: #ffffff;
    font-size: 42px;
    font-weight: 800;
    letter-spacing: 4px;
    text-transform: uppercase;
    font-family: 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* --- Mobile Responsiveness --- */

@media (max-width: 992px) {
    .category-banner {
        height: 280px;
    }

    .banner-title {
        font-size: 36px;
    }

    .breadcrumb {
        top: -80px;
    }
}

/* Mobile Phones */
@media (max-width: 576px) {
    .category-banner {
        height: 200px;

    }

    .banner-title {
        font-size: 26px;
        letter-spacing: 2px;
    }

    .breadcrumb {
        top: -60px;
        font-size: 9px;
    }
}


/* --- Product Listing Section --- */
.product-listing-section {
    padding: 40px 0 80px 0;
    font-family: 'Segoe UI', Roboto, sans-serif;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
}

/* Toolbar Styling */
.shop-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eeeeee;
}

.toolbar-left,
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    color: #333;
}

.view-toggles {
    display: flex;
    gap: 5px;
}

.view-btn {
    background: #f5f5f5;
    border: 1px solid #ddd;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #888;
    transition: all 0.2s ease;
}

.view-btn.active,
.view-btn:hover {
    background: #ffffff;
    border-color: #333;
    color: #333;
}

.sort-box {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    color: #555;
}

.sort-box select {
    border: none;
    background: none;
    font-size: 11px;
    font-weight: 600;
    color: #333;
    outline: none;
    cursor: pointer;
}

.product-count {
    font-size: 11px;
    color: #888;
}

/* Grid Layout (Default 4 Columns) */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px 20px;
    /* row-gap 30px, column-gap 20px */
}

/* Individual Card Styling */
.shop-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #ddd;
}

.shop-img-wrapper {
    background-color: #f2f2f2;
    width: 100%;
    aspect-ratio: 3/4;
    /* ඡායාරූපයේ හැඩය පවත්වා ගනී */
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

.shop-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.shop-info {
    text-align: center;
    padding: 10px;
}

.shop-info h2 {
    font-size: 24px;
    font-weight: 700;
    color: #111;
    margin-bottom: 8px;
}

.shop-info h3 {
    font-size: 14px;
    font-weight: 700;
    color: #111;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.shop-info p {
    font-size: 16px;
}

.shop-info .price {
    font-size: 16px;
    color: #333;
    margin-bottom: 4px;
}

.shop-info .installment {
    font-size: 14px;
    color: #888;
    margin-bottom: 10px;
}

/* Color Dots */
.shop-colors {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 5px;
}

.color-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid #ddd;
    cursor: pointer;
}

.color-dot.active-color {
    outline: 1px solid #333;
    outline-offset: 2px;
}

/* --- Mobile Responsiveness --- */

/* Tablets (Max 992px) */
@media (max-width: 992px) {
    .product-listing-section {
        padding: 20px 0 60px 0;
    }

    .shop-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px 15px;
    }

    .view-toggles {
        display: none;
        /* Hide grid toggles on mobile/tablet */
    }
}

/* Landscape Phones & Small Tablets (Max 768px) */
@media (max-width: 768px) {
    .shop-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .banner-title {
        font-size: 30px;
    }
}

/* Mobile Phones (Max 576px) */
@media (max-width: 576px) {
    .container {
        padding: 0 15px;
    }

    .shop-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        padding-bottom: 15px;
    }

    .toolbar-left {
        justify-content: space-between;
        width: 100%;
    }

    .toolbar-right {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
        gap: 10px;
    }

    .sort-box {
        background: #f9f9f9;
        padding: 8px 12px;
        border-radius: 4px;
        border: 1px solid #eee;
    }

    .shop-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px 10px;
    }

    .shop-info {
        padding: 5px;
    }

    .shop-info h3 {
        font-size: 9px;
        line-height: 1.3;
        min-height: 24px;
        /* Ensure alignment */
    }

    .shop-info .price {
        font-size: 10px;
        font-weight: 700;
    }

    .shop-info .installment {
        font-size: 8px;
        display: none;
        /* Hide installments on very small screens to save space */
    }

    .color-dot {
        width: 12px;
        height: 12px;
    }
}

/* Very Small Mobile Phones (Max 375px) */
@media (max-width: 375px) {
    .shop-grid {
        gap: 10px 8px;
    }

    .shop-info h3 {
        font-size: 8.5px;
    }
}

/* --- Filter Drawer Styling --- */
.filter-drawer {
    position: fixed;
    top: 0;
    left: -350px;
    /* Hidden by default */
    width: 320px;
    height: 100vh;
    background: #ffffff;
    z-index: 2000;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
}

.filter-drawer.active {
    left: 0;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.drawer-header h3 {
    margin: 0;
    font-size: 16px;
    letter-spacing: 1px;
}

.close-drawer {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: #333;
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.filter-group {
    margin-bottom: 30px;
}

.filter-group h4 {
    font-size: 14px;
    font-weight: 700;
    color: #888;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
}

.filter-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #333;
}

.filter-item span {
    font-weight: 500;
}

.filter-item small {
    color: #aaa;
}

.drawer-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.apply-btn {
    background: #111;
    color: #fff;
    border: none;
    padding: 12px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 1px;
}

.clear-btn {
    background: none;
    border: 1px solid #ddd;
    color: #666;
    padding: 10px;
    font-size: 12px;
    cursor: pointer;
}

/* Overlay */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Adjustments for Drawer */
@media (max-width: 576px) {
    .filter-drawer {
        width: 100%;
        /* Take full width on mobile */
        left: -100%;
    }
}