


/* ============================================
   2. BASE CONTAINER - NO WHITE SPACE
   ============================================ */
.container-products {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    overflow-x: hidden;
   
}

.products-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 20px;
    overflow-x: hidden;
    background-color:white;
}

@media (max-width: 768px) {
    .products-content {
        padding: 12px 15px;
    }
}

@media (max-width: 576px) {
    .products-content {
        padding: 10px 12px;
    }
}

/* ============================================
   3. SUPPLIER HEADER
   ============================================ */
.supplier-header {
    position: relative;
    background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
    overflow: hidden;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    border-radius: 0;
}

.supplier-header-banner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.supplier-header-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
}

.supplier-header-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 35px 25px;
    display: flex;
    align-items: center;
    gap: 25px;
}

@media (max-width: 768px) {
    .supplier-header-content {
        flex-direction: column;
        text-align: center;
        padding: 25px 15px;
        gap: 15px;
    }
}

.supplier-header-logo {
    width: 110px;
    height: 110px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: start;
    justify-content:start;
    overflow: hidden;
    border: 4px solid #fff;
    flex-shrink: 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s ease;
}

.supplier-header-logo:hover {
    transform: scale(1.05);
}

.supplier-header-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.supplier-header-logo i {
    font-size: 55px;
    color: #e67e22;
}

@media (max-width: 992px) {
    .supplier-header-logo {
        width: 95px;
        height: 95px;
    }

    .supplier-header-logo i {
        font-size: 48px;
    }
}

@media (max-width: 768px) {
    .supplier-header-logo {
        width: 80px;
        height: 80px;
    }

    .supplier-header-logo i {
        font-size: 40px;
    }
}

.supplier-header-info {
    color: #fff;
    flex: 1;
}

.supplier-header-info h1 {
    margin: 0 0 10px;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

@media (max-width: 992px) {
    .supplier-header-info h1 {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .supplier-header-info h1 {
        font-size: 22px;
    }
}

@media (max-width: 576px) {
    .supplier-header-info h1 {
        font-size: 20px;
    }
}

.supplier-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 12px;
}

.supplier-meta span {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0.9;
    background: rgba(70, 62, 62, 0.15);
    padding: 4px 12px;
    border-radius: 30px;
}

.supplier-description {
    font-size: 14px;
    opacity: 0.9;
    max-width: 650px;
    line-height: 1.5;
}

/* ============================================
   4. BREADCRUMB & QUICK STATS
   ============================================ */
.breadcrumb {
    margin-bottom: 20px;
    padding: 10px 0;
    font-size: 13px;
    background: transparent;
}

.breadcrumb a {
    color: #e67e22;
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.quick-stats {
    display: flex;
    flex-direction:row;
    align-items:end;
    justify-content:end;
    margin:0 auto;
    padding: 5px 8px;
    background:none;
    border-radius: 0px;

    border: 0px solid #e9ecef;
}

.browse-all-btn {
    background: #e67e22;
    color: #fff;
    padding: 5px 7px;
    border-radius: 0px;
    text-decoration: none;
    font-size:15px;
    margin:0;
    display: inline-flex;
    align-items:end;
    gap: 8px;
    transition: all 0.3s ease;
 
}

.browse-all-btn:hover {
    background: #d35400;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.3);
}

/* ============================================
   5. SECTION TITLES
   ============================================ */
.section-title {
    font-size: 22px;
    font-weight: 700;
    margin: 25px 0 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #e67e22;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2c3e50;
}

.section-title i {
    color: #e67e22;
    font-size: 22px;
}

@media (max-width: 768px) {
    .section-title {
        font-size: 18px;
    }
}

/* ============================================
   6. MAIN CATEGORY CARDS
   ============================================ */
.category-grid {
    display: flex;
    flex-direction: column;
    gap: 35px;
    margin-bottom: 50px;
    background-color:none;
}

.main-category-card {
  background-color:none;
   
    overflow: hidden;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 0px solid #eef2f6;
}

.main-category-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    transform: translateY(-3px);
    border-color: #e67e22;
}

.main-category-header {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 25px;
    background: linear-gradient(135deg, #fafbfc 0%, #ffffff 100%);
    border-bottom: 2px solid #e67e22;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .main-category-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 20px;
    }
}

.main-category-image {
    width: 110px;
    height: 110px;
    flex-shrink: 0;
    overflow: hidden;
   background-color: #dee2e6;
    border-radius: 16px;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.main-category-card:hover .main-category-image {
    transform: scale(1.03);
}

.main-category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.main-category-image i {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 55px;
    color: #e67e22;
    background:red;
}

@media (max-width: 992px) {
    .main-category-image {
        width: 90px;
        height: 90px;
    }

    .main-category-image i {
        font-size: 45px;
    }
}

@media (max-width: 768px) {
    .main-category-image {
        width: 80px;
        height: 80px;
    }

    .main-category-image i {
        font-size: 40px;
    }
}

.main-category-info {
    flex: 1;
}

.main-category-info h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 10px;
    color: #2c3e50;
}

.main-category-info h2 a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.2s;
}

.main-category-info h2 a:hover {
    color: #e67e22;
}

.main-category-desc {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 12px;
    line-height: 1.5;
}

.main-category-stats {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: #6c757d;
}

.main-category-stats span {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f8f9fa;
    padding: 4px 12px;
    border-radius: 20px;
}

@media (max-width: 768px) {
    .main-category-info h2 {
        font-size: 20px;
    }

    .main-category-desc {
        font-size: 13px;
    }
}

@media (max-width: 576px) {
    .main-category-info h2 {
        font-size: 18px;
    }
}

/* ============================================
   7. SUBCATEGORIES - VERTICAL LAYOUT (Image on top)
   ============================================ */
.subcategories-wrapper {
    padding: 25px;
    background: #fff;
}

.subcategories-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 10px;
}

.subcategories-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: #e67e22;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.subcategories-header h3 i {
    font-size: 16px;
    background: #fff0e6;
    padding: 6px;
    border-radius: 50%;
}

.view-all-subcategories {
    font-size: 13px;
    color: #e67e22;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    padding: 6px 12px;
    background: #fff0e6;
    border-radius: 25px;
    transition: all 0.2s;
}

.view-all-subcategories:hover {
    background: #e67e22;
    color: white;
    text-decoration: none;
}

.subcategories-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    margin-top: 10px;
}

.subcategory-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    background:none;
   background-color:none;
    border-radius: 16px;
    padding: 20px 12px 16px 12px;
    text-align: center;
   
}

.subcategory-card:hover {
    background: linear-gradient(135deg, #fff8f0, #fff0e6);
    border-color: #e67e22;
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(230, 126, 34, 0.15);
}

.subcategory-image {
    width: 100px;
    height: 100px;
    border-radius:0;
    overflow: hidden;
    background:none;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0px solid #f0e0d0;
    transition: all 0.3s ease;
    margin-bottom: 14px;
}

.subcategory-card:hover .subcategory-image {
    transform: scale(1.08);
    border-color: #e67e22;
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.2);
}

.subcategory-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.subcategory-image i {
    font-size: 48px;
    color: #e67e22;
}

.subcategory-info {
    width: 100%;
    text-align: center;
}

.subcategory-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 6px;
    line-height: 1.3;
    transition: color 0.2s;
}

.subcategory-card:hover .subcategory-name {
    color: #e67e22;
}

.subcategory-count {
    font-size: 11px;
    color: #7f8c8d;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.subcategory-count i {
    font-size: 10px;
    color: #e67e22;
}

/* Subcategories Responsive Grid */
@media (min-width: 1200px) {
    .subcategories-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 20px;
    }

    .subcategory-image {
        width: 100px;
        height: 100px;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .subcategories-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 18px;
    }

    .subcategory-image {
        width: 90px;
        height: 90px;
    }

    .subcategory-image i {
        font-size: 42px;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .subcategories-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }

    .subcategory-image {
        width: 85px;
        height: 85px;
    }

    .subcategory-image i {
        font-size: 38px;
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    .subcategories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }

    .subcategory-card {
        padding: 15px 10px 12px 10px;
    }

    .subcategory-image {
        width: 80px;
        height: 80px;
    }

    .subcategory-image i {
        font-size: 35px;
    }

    .subcategories-wrapper {
        padding: 20px;
    }
}

@media (max-width: 575px) {
    .subcategories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .subcategory-card {
        padding: 12px 8px 10px 8px;
        border-radius: 12px;
    }

    .subcategory-image {
        width: 70px;
        height: 70px;
        margin-bottom: 10px;
    }

    .subcategory-image i {
        font-size: 30px;
    }

    .subcategory-name {
        font-size: 11px;
    }

    .subcategory-count {
        font-size: 9px;
    }

    .subcategories-wrapper {
        padding: 15px;
    }
}

@media (max-width: 450px) {
    .subcategories-grid {
        gap: 10px;
    }

    .subcategory-image {
        width: 65px;
        height: 65px;
    }

    .subcategory-image i {
        font-size: 28px;
    }
}

@media (max-width: 360px) {
    .subcategories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .subcategory-image {
        width: 70px;
        height: 70px;
    }
}

@media (max-width: 768px) and (orientation: landscape) {
    .subcategories-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }

    .subcategory-image {
        width: 70px;
        height: 70px;
    }
}

/* ============================================
   8. EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: linear-gradient(135deg, #f8f9fa, #fff);
    margin: 30px 0;
    border-radius: 16px;
    border: 1px dashed #dee2e6;
}

.empty-state i {
    font-size: 80px;
    color: #dee2e6;
    margin-bottom: 20px;
    display: inline-block;
}

.empty-state h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
}

.empty-state p {
    font-size: 15px;
    color: #6c757d;
    margin-bottom: 25px;
}

/* ============================================
   9. SCROLL TO TOP BUTTON
   ============================================ */
.scroll-top {
    position: fixed;
    bottom: 85px;
    right: 25px;
    width: 48px;
    height: 48px;
    background: #e67e22;
    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(230, 126, 34, 0.3);
}

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

.scroll-top:hover {
    background: #d35400;
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(230, 126, 34, 0.4);
}

@media (max-width: 992px) {
    .scroll-top {
        bottom: 90px;
        right: 20px;
        width: 42px;
        height: 42px;
        font-size: 18px;
    }
}

@media (max-width: 576px) {
    .scroll-top {
        bottom: 80px;
        right: 15px;
        width: 38px;
        height: 38px;
        font-size: 16px;
    }
}

/* ============================================
   10. UTILITY CLASSES
   ============================================ */
.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 10px;
}

.mb-2 {
    margin-bottom: 10px;
}

.mb-3 {
    margin-bottom: 15px;
}

/* ============================================
   11. FIXES & OPTIMIZATIONS
   ============================================ */

/* Remove white screen overflow */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
        width: 100%;
    }

    .container-products,
    .products-content,
    .category-grid,
    .subcategories-grid,
    [class*="grid"] {
        max-width: 100%;
        overflow-x: hidden;
    }

    .main-category-info h2,
    .main-category-desc,
    .subcategory-name {
        word-break: break-word;
        overflow-wrap: break-word;
    }
}

/* Better touch targets on mobile */
@media (hover: none) and (pointer: coarse) {

    .main-category-card:active,
    .subcategory-card:active {
        transform: scale(0.98);
    }

    .browse-all-btn:active {
        transform: scale(0.97);
    }

    .mobile-nav-item {
        min-height: 44px;
    }

    /* Prevent hover effects on touch devices */
    .subcategory-card:hover {
        transform: none;
    }
}

/* Image loading optimization */
.main-category-image img,
.subcategory-image img,
.supplier-header-logo img {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Fade-in animation for images */
.main-category-image img.loaded,
.subcategory-image img.loaded {
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.98);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* No white space on small devices */
@media (max-width: 480px) {
    .products-content {
        padding: 8px 12px;
    }

    .main-category-header {
        padding: 15px;
    }

    .subcategories-wrapper {
        padding: 15px;
    }

    .quick-stats {
        flex-direction: column;
        text-align: center;
    }
}

/* Landscape mode fixes */
@media (max-width: 768px) and (orientation: landscape) {
    .main-category-header {
        flex-direction: row;
        text-align: left;
    }

    .subcategory-card {
        min-width: 150px;
    }

    .mobile-bottom-nav {
        padding: 4px 12px;
    }

    .mobile-nav-item {
        padding: 4px 8px;
    }

    .mobile-nav-item i {
        font-size: 18px;
    }
}

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

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

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