
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
    background: #f5f5f5;
    padding-bottom: 70px; /* Space for mobile bottom bar */
}

/* Container - Full width fix for mobile */
.container-products {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Fix for mobile white screen issue */
html, body {
    max-width: 100%;
    overflow-x: hidden;
    background: #f5f5f5;
}





/* Breadcrumb - Enhanced */
.breadcrumb {
    background: #ffffff;
    padding: 12px 20px;
    margin: 20px 0;
    border-radius: 12px;
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid #eef2f6;
}

.breadcrumb a {
    color: #333333;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: #e55a00;
}

.breadcrumb span {
    color: #e55a00;
    font-size: 13px;
    font-weight: 500;
}

/* Back Button - Enhanced */
.back-button {
    margin: 20px 0;
}





/* ============================================ */
/* PRODUCTS GRID - 6 COLUMNS ON DESKTOP */
/* ============================================ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    margin: 30px 0 50px;
    width: 100%;
}

/* Product Card - Enhanced */
.product-card {
    background: #ffffff;
    border-radius: 0px;
    overflow: hidden;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #eef2f6;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.12);
    border-color: #e55a00;
}

.product-image-link {
    display: block;
    text-decoration: none;
    width: 100%;
}

.product-image {
    height: 200px;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-image img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transition: transform 0.4s cubic-bezier(0.2, 0, 0, 1);
}

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

/* Badges */
.badge-new {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #e55a00;
    color: #ffffff;
    font-size: 10px;
    padding: 4px 10px;
    font-weight: 700;
    border-radius: 20px;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.product-category {
    display: none;
    
}

/* Product Info */
.product-info-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-info {
    padding: 12px;
}

.product-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 8px;
    min-height: 40px;
    overflow: hidden;
    line-height: 1.4;
    display: -webkit-box;
   
    -webkit-box-orient: vertical;
    transition: color 0.2s;
}

.product-title:hover {
    color: #e55a00;
}

.product-price {
    font-size: 18px;
    font-weight: 800;
    color: #e55a00;
    margin-bottom: 4px;
}

.compare-price {
    font-size: 12px;
    color: #999999;
    text-decoration: line-through;
    margin-left: 6px;
    font-weight: normal;
}

.stock-warning {
    font-size: 10px;
    color: #e55a00;
    display: block;
    margin-top: 4px;
    font-weight: 500;
}

.out-of-stock {
    font-size: 10px;
    color: #dc3545;
    display: block;
    margin-top: 4px;
    font-weight: 500;
}

/* Product Actions */
.product-actions {
    display: flex;
    gap: 8px;
    padding: 0 12px 12px 12px;
}

.btn-cart {
    flex: 1;
    background: #1a1a2e;
    color: #ffffff;
    border: none;
    padding: 8px 10px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    border-radius: 30px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-cart:hover {
    background: #e55a00;
    transform: translateY(-2px);
}

.btn-cart:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
}

.btn-wishlist {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 12px;
    border-radius: 30px;
    transition: all 0.3s ease;
    color: #666;
}

.btn-wishlist:hover {
    border-color: #e55a00;
    color: #e55a00;
    transform: scale(1.05);
}

.btn-view {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 12px;
    border-radius: 30px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #666;
}

.btn-view:hover {
    border-color: #e55a00;
    color: #e55a00;
    transform: scale(1.05);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 30px;
    background: #ffffff;
    border-radius: 16px;
    margin: 50px 0;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #eef2f6;
}

.empty-state i {
    font-size: 64px;
    color: #dee2e6;
    margin-bottom: 20px;
}

.empty-state h4 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #1a1a2e;
}

.empty-state p {
    color: #666666;
    font-size: 14px;
    margin-bottom: 25px;
}

.btn-primary {
    background: #e55a00;
    color: #ffffff;
    border: none;
    padding: 12px 28px;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    border-radius: 40px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #c44d00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(229,90,0,0.3);
}

/* Toast Notifications */
.toast-message {
    position: fixed;
    top: 25px;
    right: 25px;
    background: #28a745;
    color: white;
    padding: 14px 24px;
    border-radius: 0px;
    font-size: 14px;
   
    z-index: 10000;
    animation: slideInRight 0.3s ease;
   
    text-align: left;
}

.toast-message.error {
    display: none;
}

.toast-message.warning {
    background: #ffc107;
    color: #000000;
}

.toast-message.info {
    background: #17a2b8;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============================================ */
/* RESPONSIVE DESIGN - GRID BREAKPOINTS */
/* ============================================ */

/* Large Desktop (1200px - 1400px) - 6 columns */
@media (min-width: 1200px) and (max-width: 1400px) {
    .products-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 18px;
    }
    
    .product-image {
        height: 190px;
    }
    
    .product-title {
        font-size: 13px;
    }
    
    .product-price {
        font-size: 16px;
    }
}

/* Desktop (992px - 1199px) - 5 columns */
@media (min-width: 992px) and (max-width: 1199px) {
    .products-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 18px;
    }
    
    .product-image {
        height: 180px;
    }
    
    .product-title {
        font-size: 13px;
    }
}

/* Tablet Landscape (768px - 991px) - 4 columns */
@media (min-width: 768px) and (max-width: 991px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }
    
    .product-image {
        height: 170px;
    }
    
    .supplier-header-info h1 {
        font-size: 26px;
    }
    
    .supplier-header-logo {
        width: 95px;
        height: 95px;
    }
}

/* Tablet Portrait (576px - 767px) - 3 columns */
@media (min-width: 576px) and (max-width: 767px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
    
    .product-image {
        height: 160px;
    }
    
    .product-title {
        font-size: 12px;
    }
    
    .product-price {
        font-size: 15px;
    }
    
    .btn-cart {
        font-size: 10px;
        padding: 6px 8px;
    }
    
    .supplier-header {
        padding: 30px 0;
    }
    
    .supplier-header-info h1 {
        font-size: 24px;
    }
    
    .container-products {
        padding: 0 15px;
    }
}

/* ============================================ */
/* MOBILE (BELOW 576px) - 2 COLUMNS */
/* ============================================ */
@media (max-width: 575px) {
    /* Container full width */
    .container-products {
        padding: 0;
        max-width: 100%;
    }
    
    /* Supplier Header - Compact */
    .supplier-header {
        padding: 25px 15px;
        margin-bottom: 0;
        width: 100%;
    }
    
    .supplier-header-content {
        gap: 15px;
        flex-direction: column;
        text-align: center;
    }
    
    .supplier-header-logo {
        width: 85px;
        height: 85px;
    }
    
    .supplier-header-logo i {
        font-size: 42px;
    }
    
    .supplier-header-info {
        text-align: center;
        padding: 0 10px;
    }
    
    .supplier-header-info h1 {
        font-size: 22px;
    }
    
    .supplier-meta {
        justify-content: center;
        gap: 10px;
    }
    
    .supplier-meta span {
        font-size: 11px;
        padding: 4px 10px;
    }
    
    .supplier-description {
        font-size: 12px;
        text-align: center;
        padding: 0 5px;
    }
    
    /* Breadcrumb */
    .breadcrumb {
        margin: 12px 0;
        padding: 10px 15px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    /* Back button */
    .back-button {
        margin: 12px 15px;
    }
    
    .back-btn {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    /* Results info */
    .results-info {
        margin: 12px 15px;
        padding: 10px 0;
        flex-direction: column;
        align-items: flex-start;
    }
    
    /* ============================================ */
    /* GRID - 2 COLUMN ON MOBILE */
    /* ============================================ */
    .products-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0;
        margin: 0;
        width: 100%;
    }
    
    /* Product Card */
    .product-card {
        border-radius: 0;
        border: none;
        border-bottom: 1px solid #eef2f6;
        border-right: 1px solid #eef2f6;
        margin: 0;
        width: 100%;
        display: flex;
        flex-direction: column;
        box-shadow: none;
    }
    
    /* Remove right border on every 2nd card */
    .product-card:nth-child(even) {
        border-right: none;
    }
    
    /* Full screen images */
    .product-image-link {
        width: 100%;
        display: block;
    }
    
    .product-image {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
        background: #fafafa;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .product-image img {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        object-fit: cover;
    }
    
    /* Badges */
    .badge-new {
        top: 8px;
        left: 8px;
        font-size: 9px;
        padding: 3px 8px;
    }
    
    .product-category {
        top: 8px;
        right: 8px;
        font-size: 8px;
        padding: 3px 8px;
    }
    
    /* Product Info */
    .product-info {
        padding: 10px;
    }
    
    .product-title {
        font-size: 13px;
        min-height: auto;
        margin-bottom: 5px;
    }
    
    .product-price {
        font-size: 16px;
        margin-bottom: 3px;
    }
    
    .compare-price {
        font-size: 11px;
        margin-left: 5px;
    }
    
    .stock-warning,
    .out-of-stock {
        font-size: 9px;
    }
    
    /* Product Actions */
    .product-actions {
        padding: 0 10px 12px 10px;
        gap: 6px;
    }
    
    .btn-cart {
        font-size: 10px;
        padding: 8px 6px;
        border-radius: 30px;
    }
    
    .btn-wishlist,
    .btn-view {
        padding: 6px 10px;
        font-size: 11px;
        border-radius: 30px;
    }
    
    /* Empty State */
    .empty-state {
        margin: 20px 15px;
        padding: 40px 20px;
        width: auto;
        border-radius: 12px;
    }
    
    .empty-state i {
        font-size: 48px;
    }
    
    .empty-state h4 {
        font-size: 18px;
    }
    
    /* Toast notifications */
    .toast-message {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: calc(100% - 20px);
        font-size: 12px;
        padding: 12px 18px;
        border-radius: 10px;
    }
}

/* ============================================ */
/* BELOW 400px - EXTRA SMALL (still 2 columns) */
/* ============================================ */
@media (max-width: 400px) {
    .product-title {
        font-size: 12px;
    }
    
    .product-price {
        font-size: 14px;
    }
    
    .product-actions {
        gap: 5px;
    }
    
    .btn-cart {
        font-size: 9px;
        padding: 6px 4px;
    }
    
    .btn-wishlist,
    .btn-view {
        padding: 5px 8px;
        font-size: 10px;
    }
    
    .badge-new {
        font-size: 8px;
        padding: 2px 6px;
    }
    
    .product-category {
        font-size: 7px;
        padding: 2px 6px;
    }
    
    .supplier-header-logo {
        width: 70px;
        height: 70px;
    }
    
    .supplier-header-info h1 {
        font-size: 18px;
    }
}

/* ============================================ */
/* LANDSCAPE MODE FIX FOR MOBILE */
/* ============================================ */
@media (max-width: 768px) and (orientation: landscape) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .product-image {
        aspect-ratio: 1 / 1;
    }
    
    .mobile-bottom-nav {
        padding: 4px 12px;
    }
    
    .mobile-nav-item {
        padding: 4px 8px;
    }
    
    .mobile-nav-item i {
        font-size: 18px;
    }
    
    .supplier-header {
        padding: 20px 0;
    }
}

/* ============================================ */
/* UTILITY FIXES */
/* ============================================ */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Prevent horizontal scroll on all devices */
body,
.container-products,
.products-grid,
.product-card {
    overflow-x: hidden;
}

/* Ensure no white gap on the right side */
@media (max-width: 575px) {
    body {
        overflow-x: hidden;
        width: 100%;
    }
    
    .container-products {
        overflow-x: hidden;
    }
    
    * {
        max-width: 100%;
        box-sizing: border-box;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .product-card:hover {
        transform: none;
    }
    
    .product-card:active {
        transform: scale(0.98);
        background: #fafafa;
    }
    
    .btn-cart:active {
        background: #e55a00;
        transform: scale(0.97);
    }
    
    .mobile-nav-item {
        min-height: 44px;
    }
}

/* Scroll to Top Button */
.scroll-top {
    position: fixed;
    bottom: 85px;
    right: 25px;
    width: 48px;
    height: 48px;
    background: #e55a00;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(229,90,0,0.3);
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background: #c44d00;
    transform: translateY(-4px);
}

@media (max-width: 575px) {
    .scroll-top {
        bottom: 75px;
        right: 15px;
        width: 42px;
        height: 42px;
        font-size: 18px;
    }
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px;
}

.spinner {
    width: 45px;
    height: 45px;
    border: 3px solid #eef2f6;
    border-top-color: #e55a00;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}