* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: Arial, sans-serif;
    background-color: #f8f9fa;
    color: #333;
}
/* Banner - Cement category */
.banner {
    background: url('../load/images/cement-banner.webp') center/cover no-repeat;
    height: auto;
    color: #fff;
    padding: 95px 40px 70px;
    text-align: left;
    position: relative;
}
.banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.38);
}
.banner > div {
    position: relative;
    z-index: 2;
}
.banner h1 {
    font-size: 52px;
    margin-bottom: 6px;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Category content with filters + products */
.category-content {
    background: #fff;
    padding: 40px 1.5% 55px;
}

.category-wrapper {
    max-width: 1550px;
    margin: 0 auto;
    display: flex;
    gap: 24px;
}
.cart-page {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}
      
.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
    padding-bottom: 20px;
}
      
.cart-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    border-bottom: 1px solid #eee;
    align-items: center;
}
      
.cart-item-image img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
}
      
.cart-item-details {
    flex: 1;
}
      
.quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}
      
.qty-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 4px;
}
      
.remove-btn {
    background: #222;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
}
      
.clear-filters {
    background: #222;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
}
      
.cart-summary {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    margin-top: 40px;
    text-align: right;
}
      
.total-amount {
    font-size: 28px;
    font-weight: 700;
    color: #222;
}
      
.checkout-btn {
    background: #ffd700;
    color: #222;
    font-weight: bold;
    padding: 16px 40px;
    font-size: 18px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 20px;
}
      
.empty-cart {
    text-align: center;
    padding: 80px 20px;
    color: #666;
}

.search-container {
    position: relative;
    width: 100%;
    max-width: 420px;
}
       
.suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    max-height: 320px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 6px;
    display: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}
       
.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
    font-size: 15px;
    color: #333;
}
       
.suggestion-item:last-child {
    border-bottom: none;
}
       
.suggestion-item:hover {
    background-color: #f5f7fa;
    padding-left: 20px;
}
       
.suggestion-item strong {
    font-weight: 500;
    color: #222;
}
       
/* Scrollbar styling */
.suggestions-dropdown::-webkit-scrollbar {
    width: 6px;
}
       
.suggestions-dropdown::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}
       
.search-container input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

/* ========== LOGGED-IN USER ACCOUNT STYLES ========== */
.user-account {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-right: 8px;
}

.account-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px 6px 10px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    font-size: 14px;
}

.account-btn:hover {
    background-color: #000;
    border-color: #000;
}

.user-name {
    font-weight: 600;
    color: #222;
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .user-name {
display: none !important;
    }
}
.account-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 14px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    min-width: 265px;
    z-index: 2000;
    display: none;
    overflow: hidden;
}

.account-dropdown.show {
    display: block;
    animation: fadeInDropdown 0.18s ease forwards;
}

@keyframes fadeInDropdown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-header {
    padding: 16px 18px;
    background: linear-gradient(to bottom, #f8f9fa, #ffffff);
    border-bottom: 1px solid #eee;
}

.dropdown-header strong {
    font-size: 15.5px;
    color: #111;
}

.dropdown-header small {
    color: #666;
    font-size: 13px;
}

.account-dropdown a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px 18px;
    color: #333;
    text-decoration: none;
    font-size: 14.2px;
    transition: background-color 0.2s;
}

.account-dropdown a:hover {
    background-color: #f7f9fc;
}

.account-dropdown a i {
    width: 20px;
    color: #555;
    font-size: 15px;
}

.dropdown-divider {
    height: 1px;
    background: #eee;
    margin: 5px 0;
}

.logout-link {
    color: #c0392b !important;
    font-weight: 700;
}

.logout-link:hover {
    background-color: #fdf0f0 !important;
}

.auth-buttons {
    display: inline-flex;
    align-items: center;
    margin-right: 8px;
}


/* Responsive optimization */
@media (max-width: 1200px) {
    .category-content {
        padding: 35px 3% 50px;
    }
    .category-wrapper {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .category-content {
        padding: 30px 4% 45px;
    }
}

/* Filter Sidebar */
.filter-sidebar {
    width: 255px;
    flex-shrink: 0;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 22px 20px;
    align-self: flex-start;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.filter-sidebar h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 18px;
    color: #222;
    letter-spacing: 0.5px;
}
.filter-group {
    margin-bottom: 22px;
}
.filter-group h4 {
    font-size: 12.5px;
    font-weight: 700;
    color: #444;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}
.filter-group label {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #444;
    margin-bottom: 7px;
    cursor: pointer;
    line-height: 1.3;
}
.filter-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-right: 9px;
    accent-color: #ffd700;
    cursor: pointer;
}
.price-range {
    padding: 4px 0 8px;
}
.price-range input[type="range"] {
    width: 100%;
    height: 5px;
    background: #ddd;
    border-radius: 3px;
    outline: none;
}
.price-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12.5px;
    color: #555;
    margin-top: 6px;
}
.btn-apply-filters {
    background: #ffd700;
    color: #000;
    border: none;
    width: 100%;
    padding: 13px 0;
    font-size: 14px;
    font-weight: 700;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.3s;
}
.btn-apply-filters:hover {
    background: #e6c200;
}
.clear-filters {
    display: block;
    text-align: center;
    margin-top: 12px;
    font-size: 13px;
    color: #fff;
    text-decoration: none;
}

/* Products Main */
.products-main {
    flex: 1;
    min-width: 0;
}
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 12px;
}
.results-count {
    font-size: 14.5px;
    color: #555;
}
.sort-by {
    font-size: 14px;
    color: #444;
}
.sort-by select {
    padding: 9px 14px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
    min-width: 170px;
}

/* Product Grid - 4 columns (5 rows = 20 items per page) */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}
.product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.14);
}
.product-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
}
.product-info {
    padding: 14px 16px 16px;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 10px;
}
.product-details {
    flex: 1;
}
.product-info h4 {
    display: -webkit-box;
    -webkit-line-clamp: 2;          /* max 3 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    /* optional: make sure it wraps properly */
    word-break: break-word;
    line-height: 1.3;
    margin: 12px 0 8px;
    font-size: 14px;
}
.price {
    font-size: 18px;
    font-weight: 700;
    color: #111;
}
.add-to-cart-btn {
    width: 42px;
    height: 42px;
    background: #000;
    color: #ffd700;
    border: none;
    border-radius: 8px;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    transition: all 0.25s ease;
    flex-shrink: 0;
}
.add-to-cart-btn i {
    font-size: 18px;
}
.add-to-cart-btn:hover {
    background: #ffd700;
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.add-to-cart-btn:focus,
.add-to-cart-btn:active {
    background: #000;
    color: #ffd700;
    outline: none;
}

/* Pagination */
.pagination {
    text-align: center;
    margin-top: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.page-link {
    display: inline-block;
    padding: 8px 13px;
    margin: 0 2px;
    border: 1px solid #d0d0d0;
    border-radius: 5px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    min-width: 36px;
    text-align: center;
    transition: all 0.2s;
}
.page-link:hover {
    background: #f5f5f5;
    border-color: #bbb;
}
.page-link.active {
    background: #ffd700;
    color: #000;
    font-weight: 700;
    border-color: #ffd700;
}
.page-dots {
    padding: 0 8px;
    color: #888;
    font-size: 15px;
}

/* Help / Need Help Choosing section */
.help-section {
    background: #111;
    color: #fff;
    padding: 40px 50px;
}
.help-wrapper {
    max-width: 90%;
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    gap: 60px;
}
.help-left {
    flex: 0 0 280px;
}
.help-left h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}
.help-left p {
    font-size: 13.5px;
    opacity: 0.85;
    margin-bottom: 18px;
    line-height: 1.4;
}
.btn-request-quote {
    display: inline-block;
    background: transparent;
    color: #fff;
    border: 1.5px solid #fff;
    padding: 10px 22px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
}
.btn-request-quote:hover {
    background: #fff;
    color: #111;
}

.benefits-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 15px;
}

.benefit-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-align: left;
}

.benefit-icon {
    font-size: 28px;
    flex-shrink: 0;
    margin-top: 2px;
    width: 32px;
    color: #f4b400;
}

.benefit-card h4 {
    color: #fff;
    font-size: 13.5px;
    font-weight: 700;
    margin-bottom: 5px;
}

.benefit-card p {
    font-size: 12.5px;
    line-height: 1.45;
    opacity: 0.9;
    margin: 0;
}

/* Footer */
footer {
    background: #000;
    color: #ddd;
    padding: 55px 40px 25px;
}
.footer-grid {
    max-width: 90%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(195px, 1fr));
    gap: 38px;
}
.footer-col {
    font-size: 14px;
}
.footer-col h4 {
    color: #fff;
    font-size: 14px;
    margin-bottom: 16px;
    font-weight: 700;
    letter-spacing: 0.3px;
}
.footer-col p {
    margin-bottom: 7px;
    line-height: 1.5;
    font-size: 13.8px;
}
.footer-col p i {
    width: 18px;
    color: #f4b400;
    text-align: center;
}
.footer-col a {
    display: block;
    color: #ccc;
    text-decoration: none;
    margin-bottom: 7px;
    font-size: 13.8px;
    transition: color 0.2s;
}
.bulk-note{
    display:block;
    margin-top:4px;
    color:#000;
    font-size:12px;
    font-weight:500;
}
.footer-col a:hover {
    color: #ffd700;
}
.footer-logo {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 14px;
}
.footer-logo span {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.4px;
}
.social-icons {
    display: flex;
    gap: 16px;
    margin-top: 16px;
    font-size: 17px;
}
.social-icons a {
    color: #ccc;
    transition: color 0.2s;
}
.social-icons a:hover {
    color: #ffd700;
}
.newsletter-col p {
    margin-bottom: 12px;
    font-size: 13.5px;
}
.newsletter-form {
    display: flex;
}
.newsletter-form input {
    flex: 1;
    padding: 11px 14px;
    border: none;
    border-radius: 5px 0 0 5px;
    font-size: 13.5px;
    background: #fff;
}
.newsletter-form button {
    background: #ffd700;
    color: #000;
    border: none;
    padding: 0 18px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background 0.3s;
}
.newsletter-form button:hover {
    background: #e6c200;
}
.footer-bottom {
    max-width: 1320px;
    margin: 45px auto 0;
    padding-top: 22px;
    border-top: 1px solid #333;
    text-align: center;
    font-size: 12.5px;
    color: #888;
}

/* ==================== TABLET / DESKTOP FILTER BEHAVIOUR ==================== */
@media (max-width: 1100px) {
    .category-wrapper {
        flex-direction: column;
    }
    .filter-sidebar {
        width: 100%;
        max-width: 100%;
    }
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==================== MOBILE ONLY ==================== */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    .banner h1 {
        font-size: 36px;
    }
    
    /* Mobile product grid */
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .product-info {
        padding: 5px 10px 16px;
        text-align: left;
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
        gap: 10px;
    }
    .product-card img {
        width: 100%;
        height: 200px;
        object-fit: cover;
    }
    /* Help section */
    .help-section {
        padding: 30px 15px;
    }
    .help-wrapper {
        flex-direction: column;
        gap: 25px;
    }
    .help-left {
        flex: none;
        width: 100%;
    }
    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    .newsletter-col {
        grid-column: span 2;
    }
    footer {
        padding: 40px 15px 20px;
    }

    /* ==================== MOBILE HEADER - EXACT IMAGE MATCH ==================== */
    .header {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        padding: 12px 16px !important;
        gap: 8px 12px !important;
        background-color: #000000 !important;
    }

    .logo {
        order: 1 !important;
        flex: none !important;
    }

    .nav-menu {
        display: none !important;
    }

    /* Hide desktop auth */
    .user-auth {
        display: none !important;
    }

    .user-account {
        order: 2 !important;
        margin-left: auto !important;
        flex-shrink: 0 !important;
        display: block !important;
    } 
       /* Show mobile auth (icon + Login) */
    .mobile-user-account {
        order: 2 !important;
        margin-left: auto !important;
        flex-shrink: 0 !important;
        display: block !important;
    }

    .cart {
        order: 3 !important;
        flex-shrink: 0 !important;
        margin-left: 8px !important;
    }

    /* Search full width + centered */
    .search-container {
        order: 4 !important;
        flex: 0 0 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 8px 0 0 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    .search-container input {
        width: 100% !important;
        padding: 12px 16px !important;
        font-size: 16px !important;
        border-radius: 8px !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }

    /* Mobile Login button */
    .account-btn {
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        padding: 6px 12px !important;
        font-size: 14px !important;
        color: #ffffff !important;
        background: transparent !important;
        border: none !important;
        text-decoration: none !important;
    }

    .account-btn i {
        color: #facc15 !important;
        font-size: 18px !important;
    }

    /* Logo tweak */
    .logo img {
        height: 36px !important;
    }
    .logo span {
        font-size: 14px !important;
        margin-left: 8px !important;
    }

    /* ========== MOBILE FILTER DRAWER ========== */
    .category-wrapper {
        flex-direction: column;
        gap: 0;
    }

    /* Sidebar becomes off-canvas drawer */
    .filter-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 90%;
        max-width: 340px;
        z-index: 2500;
        transform: translateX(-105%);
        transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1);
        border-radius: 0;
        border: none;
        box-shadow: 8px 0 30px rgba(0, 0, 0, 0.18);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 20px 18px 100px;
        background: #fff;
        align-self: auto;
    }

    .filter-sidebar.open {
        transform: translateX(0);
    }

    .filter-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.55);
        z-index: 2490;
        display: none;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .filter-overlay.show {
        display: block;
        opacity: 1;
    }

    .close-filter-btn {
        display: block !important;
        background: none;
        border: none;
        font-size: 28px;
        line-height: 1;
        color: #555;
        cursor: pointer;
        padding: 0 4px;
    }

    .filter-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        padding-bottom: 12px;
        border-bottom: 1px solid #eee;
        position: sticky;
        top: 0;
        background: #fff;
        z-index: 2;
    }

    .filter-header h3 {
        margin: 0;
        font-size: 16px;
        font-weight: 700;
    }

    /* Sticky results header with Filter button */
    .results-header {
        position: sticky;
        top: 0;
        background: #fff;
        z-index: 50;
        padding: 12px 0;
        margin-bottom: 14px;
        border-bottom: 1px solid #eee;
        display: flex;
        align-items: center;
        gap: 10px;
        flex-wrap: nowrap;
    }

    .mobile-filter-btn {
        display: inline-flex !important;
        align-items: center;
        gap: 7px;
        background: #111;
        color: #fff;
        border: none;
        padding: 10px 14px;
        border-radius: 6px;
        font-weight: 600;
        font-size: 13.5px;
        cursor: pointer;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .mobile-filter-btn i {
        font-size: 13px;
    }

    .results-count {
        font-size: 13px;
        color: #666;
        flex: 1;
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .sort-by {
        font-size: 13px;
        flex-shrink: 0;
    }

    .sort-by select {
        padding: 8px 10px;
        min-width: 120px;
        font-size: 13px;
    }

    /* Make apply / clear more prominent in drawer */
    .btn-apply-filters {
        position: sticky;
        bottom: 12px;
        margin-top: 20px;
        box-shadow: 0 -4px 12px rgba(0,0,0,0.08);
    }

    .clear-filters {
        display: block;
        text-align: center;
        margin-top: 14px;
        margin-bottom: 20px;
        font-size: 14px;
        color: #c0392b;
        text-decoration: none;
        font-weight: 600;
    }
}

/* Desktop: ensure mobile-only elements stay hidden */
@media (min-width: 769px) {
    .mobile-filter-btn {
        display: none !important;
    }
    .close-filter-btn {
        display: none !important;
    }
    .filter-overlay {
        display: none !important;
    }
}