:root {
    --primary-red: #d42027;
    --dark-bg: #231f20;
    --dark-text: #231f20;
    --light-bg: #ffffff;
    --accent-blue: #2a5caa;
    --accent-green: #3fa43d;
    --gray-light: #f8f9fa;
    --gray-border: #e5e7eb;
    --gray-text: #6c757d;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--light-bg);
    color: var(--dark-text);
    padding-top: 80px;
    line-height: 1.6;
}

/* Compact Header */
.compact-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--light-bg);
    box-shadow: 0 2px 10px rgba(35, 31, 32, 0.08);
    z-index: 1000;
    padding: 10px 0;
    transition: all 0.3s ease;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    gap: 15px;
}

.logo-compact {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon img {
    height: 28px;
    width: auto;
}

.logo-text-compact h2 {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary-red);
    margin: 0;
    line-height: 1.1;
}

.logo-text-compact span {
    font-size: 10px;
    color: var(--gray-text);
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Compact Search */
.search-compact {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.search-input-compact {
    width: 100%;
    padding: 10px 45px 10px 15px;
    border: 1px solid var(--gray-border);
    border-radius: 25px;
    font-size: 13px;
    background: var(--gray-light);
    transition: all 0.3s ease;
}

.search-input-compact:focus {
    outline: none;
    border-color: var(--primary-red);
    background: white;
}

.search-btn-compact {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-red);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Header Actions Compact */
.header-actions-compact {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.btn-compact {
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-post-compact {
    background: var(--primary-red);
    color: white;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-login-compact {
    background: transparent;
    color: var(--accent-blue);
    border: 1.5px solid var(--accent-blue);
}

.btn-seller-compact {
    background: var(--accent-blue);
    color: white;
}

.btn-compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Contact Mini */
.contact-mini {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-left: 10px;
}

.contact-mini-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--gray-text);
}

.contact-mini-item i {
    color: var(--primary-red);
    font-size: 10px;
}

/* Main Content Layout */
.main-container {
    padding: 20px 15px;
}

.content-grid {
    display: grid;
    grid-template-columns: 250px 1fr 300px;
    gap: 20px;
    margin-bottom: 30px;
}

/* Categories Sidebar */
.categories-sidebar {
    background: white;
    border-radius: 12px;
    /* padding: 20px; */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--gray-border);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.categories-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark-text);
    /* margin-bottom: 20px; */
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-red);
    display: flex;
    align-items: center;
    gap: 10px;
}

.categories-title i {
    color: var(--primary-red);
}

.categories-list {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 10px;
}

.category-item {
    padding: 12px 15px;
    margin-bottom: 8px;
    background: var(--gray-light);
    border: 1px solid var(--gray-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.category-item:hover,
.category-item.active {
    background: var(--primary-red);
    color: white;
    border-color: var(--primary-red);
    transform: translateX(5px);
}

.category-name {
    font-size: 14px;
    font-weight: 500;
}

.category-count {
    font-size: 12px;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
}

/* Banner Slider Section */
.banner-section {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--gray-border);
    height: 400px;
}

.banner-slider {
    width: 100%;
    height: 100%;
}

.swiper-slide {
    position: relative;
    height: 100%;
}

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

.banner-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 30px;
    color: white;
}

.banner-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
    color: white;
}

.banner-description {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 15px;
    max-width: 500px;
}

.banner-btn {
    background: var(--primary-red);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.banner-btn:hover {
    background: var(--primary-red-dark);
    transform: translateY(-2px);
}

.swiper-pagination-bullet {
    background: white !important;
    opacity: 0.5;
}

.swiper-pagination-bullet-active {
    background: var(--primary-red) !important;
    opacity: 1;
}

/* Company Logos Section */
.companies-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--gray-border);
    height: 400px;
    overflow: hidden;
}

.companies-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark-text);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-blue);
    display: flex;
    align-items: center;
    gap: 10px;
}

.companies-title i {
    color: var(--accent-blue);
}

.company-logos-container {
    height: calc(100% - 50px);
    position: relative;
}

.company-logos-slider {
    height: 100%;
}

.company-logo-slide {
    height: 80px;
    background: white;
    border: 1px solid var(--gray-border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    transition: all 0.3s ease;
}

.company-logo-slide:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-red);
}

.company-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Featured Section Below */
.featured-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-top: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--gray-border);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--dark-text);
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--primary-red);
    border-radius: 2px;
}

.view-all-btn {
    color: var(--primary-red);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-quote {
    width: 100%;
    background: var(--accent-blue);
    color: white;
    border: none;
    padding: 8px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-quote:hover {
    background: #1e4a8a;
}

/* Footer */
.main-footer {
    background: var(--dark-bg);
    color: white;
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h5 {
    color: var(--primary-red);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-red);
    padding-left: 5px;
}

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}

/* Modal Styles */
.modal-content {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-bottom: none;
    border-radius: 15px 15px 0 0;
    padding: 20px 25px;
}

.modal-body {
    padding: 25px;
}

.modal-title {
    font-weight: 700;
    font-size: 18px;
}

.form-label {
    font-weight: 600;
    color: var(--dark-text);
    margin-bottom: 8px;
}

.form-control {
    border: 2px solid var(--gray-border);
    border-radius: 10px;
    padding: 12px 15px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(212, 32, 39, 0.1);
}

.input-group-text {
    background: var(--gray-light);
    border: 2px solid var(--gray-border);
    border-right: none;
    border-radius: 10px 0 0 10px;
    font-weight: 600;
    color: var(--dark-text);
}

.input-group .form-control {
    border-left: none;
    border-radius: 0 10px 10px 0;
}

.btn {
    border-radius: 10px;
    padding: 12px 20px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Modal Header Styles */
#buyerLoginModal .modal-header {
    background: linear-gradient(135deg, var(--accent-green) 0%, #2f7d32 100%);
    color: white;
}

#sellerLoginModal .modal-header {
    background: linear-gradient(135deg, var(--primary-red) 0%, #b52c32 100%);
    color: white;
}

/* Modal Button Styles */
#buyerSendOtp,
#buyerVerifyOtp {
    background: linear-gradient(135deg, var(--accent-green) 0%, #2f7d32 100%);
    color: white;
    border: none;
}

#sellerSendOtp,
#sellerVerifyOtp {
    background: linear-gradient(135deg, var(--primary-red) 0%, #b52c32 100%);
    color: white;
    border: none;
}

/* Requirement Modal Styles */
#requirementModal .modal-dialog {
    max-width: 600px;
}

#requirementModal .modal-content {
    border: none;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

#requirementModal .modal-header {
    background: linear-gradient(135deg, var(--primary-red) 0%, #b52c32 100%);
    color: white;
    border: none;
    padding: 20px 25px;
    position: relative;
}

#requirementModal .modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="80" cy="40" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="40" cy="80" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
    opacity: 0.3;
}

#requirementModal .modal-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    position: relative;
    z-index: 1;
}

#requirementModal .modal-header p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

#requirementModal .btn-close {
    position: relative;
    z-index: 1;
    opacity: 0.8;
}

/* Progress Steps */
.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.4;
    transition: all 0.4s ease;
    position: relative;
}

.step-indicator.active {
    opacity: 1;
    color: var(--primary-red);
    transform: scale(1.05);
}

.step-indicator.completed {
    opacity: 1;
    color: var(--accent-green);
}

.step-circle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #f8f9fa;
    border: 3px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.step-indicator.active .step-circle {
    background: linear-gradient(135deg, var(--primary-red) 0%, #b52c32 100%);
    color: white;
    border-color: var(--primary-red);
    box-shadow: 0 8px 25px rgba(212, 32, 39, 0.3);
}

.step-indicator.completed .step-circle {
    background: linear-gradient(135deg, var(--accent-green) 0%, #2f7d32 100%);
    color: white;
    border-color: var(--accent-green);
    box-shadow: 0 8px 25px rgba(63, 164, 61, 0.3);
}

.step-indicator small {
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}

.step-line {
    flex: 1;
    height: 3px;
    background: linear-gradient(90deg, #e9ecef 0%, #dee2e6 100%);
    margin: 0 15px;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.step-line::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-red), var(--accent-green));
    transition: left 0.6s ease;
}

.step-indicator.completed+.step-line::before {
    left: 0;
}

/* Form Styling */
#requirementModal .modal-body {
    padding: 0;
}

#requirementModal .step-content {
    padding: 15px;
    min-height: 250px;
}

#requirementModal .form-label {
    font-weight: 600;
    color: var(--dark-text);
    margin-bottom: 10px;
    font-size: 14px;
}

#requirementModal .form-control {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 12px 15px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #fafbfc;
}

#requirementModal .form-control:focus {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 4px rgba(212, 32, 39, 0.1);
    background: white;
    transform: translateY(-1px);
}

#requirementModal .form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.1);
}

/* Selection Boxes */
.selection-boxes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
    max-height: 120px;
    overflow-y: auto;
    padding: 5px;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    background: #fafbfc;
}

.selection-boxes::-webkit-scrollbar {
    width: 4px;
}

.selection-boxes::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.selection-boxes::-webkit-scrollbar-thumb {
    background: var(--primary-red);
    border-radius: 2px;
}

.selection-box {
    padding: 8px 16px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    background: white;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    user-select: none;
    color: var(--dark-text);
}

.selection-box:hover {
    border-color: var(--primary-red);
    background: rgba(212, 32, 39, 0.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212, 32, 39, 0.15);
    color: var(--primary-red);
}

.selection-box.selected {
    background: var(--primary-red);
    color: white;
    border-color: var(--primary-red);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212, 32, 39, 0.3);
}

/* Modal Footer */
#requirementModal .modal-footer {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: none;
    padding: 15px 25px;
    border-radius: 0 0 20px 20px;
}

#requirementModal .btn {
    border-radius: 25px;
    padding: 12px 25px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

#requirementModal .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    transition: left 0.3s ease;
}

#requirementModal .btn:hover::before {
    left: 0;
}

#requirementModal .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

#requirementModal .btn-outline-secondary {
    background: white;
    color: #6c757d;
    border: 2px solid #e9ecef;
}

#requirementModal .btn-outline-secondary:hover {
    background: #6c757d;
    color: white;
    border-color: #6c757d;
}

#requirementModal .btn-primary {
    background: linear-gradient(135deg, var(--primary-red) 0%, #b52c32 100%);
    color: white;
}

#requirementModal .btn-success {
    background: linear-gradient(135deg, var(--accent-green) 0%, #2f7d32 100%);
    color: white;
}

/* Validation Errors */
.validation-error {
    font-size: 12px;
    margin-top: 5px;
}

.validation-error.alert {
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-left: 4px solid #ffc107;
    font-size: 13px;
}

/* Loading Animation */
@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

.selection-box:has(.fa-spinner) {
    animation: pulse 1.5s infinite;
}

/* Responsive */
@media (max-width: 768px) {
    #requirementModal .modal-dialog {
        margin: 10px;
        max-width: calc(100% - 20px);
    }

    .step-indicator {
        gap: 5px;
    }

    .step-circle {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    .step-indicator small {
        font-size: 10px;
    }

    .selection-boxes {
        gap: 8px;
    }

    .selection-box {
        padding: 10px 15px;
        font-size: 12px;
    }
}

@media (max-width: 1200px) {
    .content-grid {
        grid-template-columns: 220px 1fr 250px;
    }
}

@media (max-width: 992px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .categories-sidebar,
    .companies-section {
        height: auto;
        position: static;
    }

    .banner-section {
        height: 300px;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }

    .header-inner {
        flex-wrap: wrap;
    }

    .search-compact {
        order: 3;
        flex: 100%;
        max-width: 100%;
        margin-top: 10px;
    }

    .contact-mini {
        display: none;
    }

    .banner-section {
        height: 250px;
    }

    .banner-title {
        font-size: 18px;
    }

    .banner-description {
        font-size: 12px;
    }
}

@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: 1fr;
    }

    .header-actions-compact {
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }

    .btn-compact {
        flex: 1;
        min-width: 120px;
        text-align: center;
        justify-content: center;
    }
}