/* ============================================================
   PRODUCTS PAGE - AMAZON STYLE (5 Columns)
   ============================================================ */

.products-page {
    padding: 30px 0 50px;
    background: #f7f7f7;
}

.products-banner {
    background: #fff;
    padding: 18px 0 22px;
    border-bottom: 1px solid #ececec;
}

.breadcrumb-wrap {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
    font-size: 14px;
}

.breadcrumb-wrap a {
    text-decoration: none;
    color: #007185;
}

.breadcrumb-wrap a:hover {
    color: #c45500;
    text-decoration: underline;
}

.banner-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.banner-content h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 5px;
    color: #111;
}

.banner-content p {
    color: #666;
    margin: 0;
    font-size: 15px;
}

.product-count {
    font-size: 15px;
    font-weight: 600;
    color: #555;
}

.product-count span {
    color: #007185;
    font-weight: 700;
}

/* ============================================================
   LAYOUT
   ============================================================ */

.products-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

/* ============================================================
   SIDEBAR - COMPACT (More Space for Products)
   ============================================================ */

.products-sidebar {
    width: 200px;
    min-width: 200px;
    position: sticky;
    top: 20px;
    height: calc(100vh - 40px);
    overflow-y: auto;
    overflow-x: hidden;
}

.filter-box {
    background: #fff;
    border-radius: 8px;
    padding: 14px 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.filter-box h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #111;
    border-bottom: 1px solid #eee;
    padding-bottom: 6px;
}

/* Category Tree */
.category-item {
    margin-bottom: 2px;
}

.category-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.toggle-category {
    cursor: pointer;
    font-size: 9px;
    color: #555;
    width: 14px;
    text-align: center;
    user-select: none;
}

.toggle-empty {
    width: 14px;
    display: inline-block;
}

.filter-category {
    display: block;
    padding: 3px 0;
    text-decoration: none;
    color: #111;
    font-size: 13px;
    flex: 1;
    transition: color 0.2s;
}

.filter-category:hover {
    color: #c45500;
    text-decoration: underline;
}

.filter-category.active {
    color: #111;
    font-weight: 700;
}

.category-children {
    padding-left: 16px;
    margin-top: 1px;
}

.level-0 .category-row {
    font-weight: 500;
}

.level-1 .category-row {
    font-weight: 400;
}

.level-2 .category-row {
    font-weight: 400;
    font-size: 12px;
    padding-left: 6px;
}

/* Brand Radio Buttons */
#brandList label,
#mobileBrandList label {
    display: block;
    padding: 3px 0;
    font-weight: 400;
    cursor: pointer;
    font-size: 13px;
    color: #111;
}

#brandList label:hover,
#mobileBrandList label:hover {
    color: #c45500;
}

#brandList input[type="radio"],
#mobileBrandList input[type="radio"] {
    margin-right: 6px;
    accent-color: #ff9900;
    width: 14px;
    height: 14px;
    cursor: pointer;
}

/* Price Filter */
.filter-box .form-control {
    font-size: 13px;
    padding: 5px 8px;
    border-radius: 4px;
    border-color: #ddd;
}

.filter-box .form-control:focus {
    border-color: #ff9900;
    box-shadow: 0 0 0 2px rgba(255, 153, 0, 0.12);
}

.filter-box .btn-dark {
    background: #111;
    border-color: #111;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 8px;
    border-radius: 4px;
}

.filter-box .btn-dark:hover {
    background: #333;
    border-color: #333;
}

/* Stock Filter */
.filter-box label.d-block {
    font-size: 13px;
    color: #111;
    cursor: pointer;
}

.filter-box label.d-block input[type="checkbox"] {
    margin-right: 6px;
    accent-color: #ff9900;
    width: 14px;
    height: 14px;
    cursor: pointer;
}

/* ============================================================
   PRODUCTS CONTENT
   ============================================================ */

.products-content {
    flex: 1;
}

/* ============================================================
   TOPBAR
   ============================================================ */

.products-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.products-topbar .btn-dark {
    background: #111;
    border-color: #111;
    font-size: 13px;
    padding: 5px 12px;
    border-radius: 4px;
}

.products-topbar .btn-dark:hover {
    background: #333;
    border-color: #333;
}

.products-topbar select {
    width: 180px;
    padding: 5px 24px 5px 10px;
    border-radius: 4px;
    border: 1px solid #ddd;
    font-size: 13px;
    background-color: #fff;
}

.products-topbar select:focus {
    border-color: #ff9900;
    box-shadow: 0 0 0 2px rgba(255, 153, 0, 0.12);
}

/* ============================================================
   PRODUCT GRID - 5 COLUMNS
   ============================================================ */

.products-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    align-items: start;
}

/* ============================================================
   PRODUCT CARD - Position Relative (For Badge)
   ============================================================ */

.product-card {
    position: relative;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 6px;
    padding: 8px 8px 8px;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.product-card:hover {
    border-color: #bbb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ============================================================
   PRODUCT IMAGE - Position Relative (For Badge inside)
   ============================================================ */

.product-image-link {
    display: block;
    text-decoration: none;
}

.product-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f7f7f7;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
    overflow: hidden;
}

.product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    padding: 6px;
    transition: transform 0.2s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.02);
}

/* ============================================================
   FEATURED BADGE - Image ke upper-left corner
   ============================================================ */

.featured-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 10;
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    background: #ff6b35;
    padding: 2px 10px;
    border-radius: 3px;
    letter-spacing: 0.2px;
    text-transform: uppercase;
    box-shadow: 0 1px 6px rgba(255, 107, 53, 0.25);
}

/* ============================================================
   DEAL BADGE - Image ke upper-right corner
   ============================================================ */

.deal-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 10;
    display: inline-block;
    font-size: 8px;
    font-weight: 700;
    color: #cc0c39;
    background: rgba(252, 228, 228, 0.95);
    padding: 1px 8px;
    border-radius: 2px;
    letter-spacing: 0.1px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.deal-badge.prime {
    background: rgba(227, 240, 255, 0.95);
    color: #0066c0;
}

/* ============================================================
   BRAND NAME
   ============================================================ */

.product-brand {
    font-size: 12px;
    color: #007185;
    font-weight: 500;
    margin-bottom: 2px;
}

.product-brand:hover {
    color: #c45500;
    text-decoration: underline;
}

/* ============================================================
   PRODUCT TITLE
   ============================================================ */

.product-title {
    font-size: 13px;
    font-weight: 500;
    color: #111;
    line-height: 1.3;
    margin-bottom: 3px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 32px;
}

.product-title a {
    color: #111;
    text-decoration: none;
}

.product-title a:hover {
    color: #c45500;
}

/* ============================================================
   RATINGS
   ============================================================ */

.product-rating {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-bottom: 3px;
    font-size: 12px;
}

.product-rating .stars {
    color: #ffa41c;
    letter-spacing: 0.5px;
}

.product-rating .stars .empty-star {
    color: #ddd;
}

.product-rating .rating-count {
    color: #007185;
    font-size: 11px;
}

/* ============================================================
   PRICING
   ============================================================ */

.product-pricing {
    display: flex;
    align-items: baseline;
    gap: 5px;
    flex-wrap: wrap;
    margin: 3px 0 3px;
}

.current-price {
    font-size: 17px;
    font-weight: 700;
    color: #111;
}

.current-price .currency-symbol {
    font-size: 13px;
    font-weight: 400;
}

.mrp-price {
    font-size: 12px;
    color: #565959;
    text-decoration: line-through;
}

.discount-badge {
    font-size: 11px;
    color: #cc0c39;
    font-weight: 700;
    background: #fce4e4;
    padding: 0 5px;
    border-radius: 2px;
    line-height: 1.5;
}

/* ============================================================
   TAX INFO
   ============================================================ */

.tax-info {
    font-size: 11px;
    color: #565959;
    margin-bottom: 2px;
}

/* ============================================================
   STOCK STATUS
   ============================================================ */

.stock-status {
    font-size: 11px;
    font-weight: 500;
    margin-bottom: 2px;
}

.stock-status.in-stock {
    color: #067d62;
}

.stock-status.out-of-stock {
    color: #cc0c39;
}

.stock-status i {
    font-size: 10px;
}

/* ============================================================
   COLOUR OPTIONS
   ============================================================ */

.colour-options {
    font-size: 10px;
    color: #565959;
    margin-top: 1px;
}

/* ============================================================
   VIEW DETAILS
   ============================================================ */

.view-details {
    margin-top: auto;
    padding-top: 5px;
    border-top: 1px solid #eee;
}

.view-details a {
    font-size: 12px;
    color: #007185;
    text-decoration: none;
    font-weight: 500;
}

.view-details a:hover {
    color: #c45500;
    text-decoration: underline;
}

.view-details a i {
    font-size: 9px;
}

/* ============================================================
   NO IMAGE PLACEHOLDER
   ============================================================ */

.no-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #f5f5f5;
    color: #999;
    padding: 10px;
    text-align: center;
    min-height: 90px;
}

.no-image-placeholder i {
    color: #ddd;
    margin-bottom: 4px;
}

.no-image-placeholder span {
    font-size: 9px;
    color: #999;
    word-break: break-word;
    max-width: 90%;
}

/* ============================================================
   OFF CANVAS (MOBILE FILTERS)
   ============================================================ */

.offcanvas {
    width: 280px !important;
}

.offcanvas-body .form-check {
    margin-bottom: 4px;
}

.offcanvas-body .form-check-label {
    font-size: 14px;
}

.offcanvas-body h6 {
    font-weight: 700;
    color: #111;
    margin-bottom: 12px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* 1600px+ : 5 Columns */
@media (min-width: 1600px) {
    .products-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 14px;
    }
}

/* 1400px - 1599px : 5 Columns */
@media (max-width: 1599px) and (min-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 12px;
    }
}

/* 1200px - 1399px : 4 Columns */
@media (max-width: 1199px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }
    .product-card {
        padding: 10px 8px 8px;
    }
    .product-title {
        font-size: 13px;
        min-height: 32px;
    }
    .current-price {
        font-size: 17px;
    }
    .product-brand {
        font-size: 12px;
    }
}

/* 992px - 1199px : 3 Columns */
@media (max-width: 992px) {
    .products-sidebar {
        display: none;
    }
    .products-layout {
        flex-direction: column;
    }
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    .product-card {
        padding: 10px 8px 8px;
    }
    .product-title {
        font-size: 13px;
        min-height: 32px;
    }
    .current-price {
        font-size: 17px;
    }
    .product-brand {
        font-size: 12px;
    }
}

/* 768px - 991px : 2 Columns */
@media (max-width: 768px) {
    .banner-content {
        flex-direction: column;
        align-items: flex-start;
    }
    .products-topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .products-topbar select {
        width: 100%;
    }
    .banner-content h1 {
        font-size: 26px;
    }
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .product-card {
        padding: 8px 6px 6px;
    }
}

/* 576px - 767px : 2 Columns */
@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .product-card {
        padding: 6px 5px;
        border-radius: 4px;
    }
    .product-title {
        font-size: 12px;
        min-height: 28px;
    }
    .current-price {
        font-size: 15px;
    }
    .product-rating .stars {
        font-size: 10px;
    }
    .product-rating .rating-count {
        font-size: 10px;
    }
    .banner-content h1 {
        font-size: 22px;
    }
    .product-count {
        font-size: 14px;
    }
    .filter-box {
        padding: 12px;
    }
    .filter-box h4 {
        font-size: 14px;
    }
    .featured-badge {
        font-size: 8px;
        padding: 2px 8px;
        top: 5px;
        left: 5px;
    }
    .deal-badge {
        font-size: 7px;
        padding: 1px 6px;
        top: 5px;
        right: 5px;
    }
}

/* 400px - 575px : 2 Columns */
@media (max-width: 400px) {
    .products-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }
    .product-card {
        padding: 5px 4px;
        border-radius: 3px;
    }
    .product-title {
        font-size: 11px;
        min-height: 24px;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
    .current-price {
        font-size: 13px;
    }
    .current-price .currency-symbol {
        font-size: 11px;
    }
    .mrp-price {
        font-size: 10px;
    }
    .discount-badge {
        font-size: 9px;
        padding: 0 3px;
    }
    .view-details a {
        font-size: 10px;
    }
    .product-image {
        border-radius: 2px;
    }
    .product-image img {
        padding: 3px;
    }
    .product-brand {
        font-size: 10px;
    }
    .tax-info {
        font-size: 10px;
    }
    .stock-status {
        font-size: 10px;
    }
    .colour-options {
        font-size: 9px;
    }
    .product-rating {
        font-size: 10px;
    }
    .product-rating .stars {
        font-size: 9px;
    }
    .product-rating .rating-count {
        font-size: 9px;
    }
    .featured-badge {
        font-size: 7px;
        padding: 1px 6px;
        top: 4px;
        left: 4px;
    }
    .deal-badge {
        font-size: 6px;
        padding: 0px 4px;
        top: 4px;
        right: 4px;
    }
    .no-image-placeholder {
        padding: 6px;
        min-height: 60px;
    }
    .no-image-placeholder span {
        font-size: 8px;
    }
}