@import url('theme.css');

/* Content Wrapper Override for Buyers Page */
.content-wrapper {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* Top Banner Section - Light Theme */
.buy-section {
    display: flex;
    padding: 80px 40px;
    background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-light) 100%);
    background-size: cover;
    background-position: center;
    color: #fff;
}

/* Statistics & Search Bar Container */
.top-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    margin: -40px 20px 40px;
    max-width: 1360px;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    position: relative;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    flex-wrap: wrap;
    gap: 20px;
}

@media (min-width: 1400px) {
    .top-section {
        margin-left: auto;
        margin-right: auto;
    }
}

/* Buyers Title Box */
.buyers-box {
    background-color: var(--color-navy);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 30px;
    height: 50px;
    border-radius: var(--radius-sm);
    flex: 1;
    min-width: 200px;
}

.buyers-box h3 {
    color: #fff !important;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    -webkit-text-fill-color: #fff;
}

/* Search Bar */
.search-box {
    flex: 2;
    min-width: 300px;
}

.search-form {
    display: flex;
    width: 100%;
}

.search-input {
    flex-grow: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    background: var(--bg-light);
    color: var(--color-text-main);
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    font-size: 14px;
    -webkit-text-fill-color: var(--color-text-main);
}

.search-input::placeholder {
    color: var(--color-text-light);
    -webkit-text-fill-color: var(--color-text-light);
    opacity: 1;
}

.search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-dim);
    color: var(--color-text-main);
    -webkit-text-fill-color: var(--color-text-main);
}

.search-btn {
    background-color: var(--color-primary);
    color: white;
    border: none;
    padding: 10px 30px;
    font-size: 15px;
    cursor: pointer;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-weight: 600;
    transition: background 0.3s;
}

.search-btn:hover {
    background-color: var(--color-primary-dark);
}

/* RFQs Count */
.rfq-box {
    flex: 1;
    text-align: center;
    min-width: 200px;
}

.rfq-box p {
    margin: 0 0 10px;
    font-size: 14px;
    color: var(--color-text-muted);
}

.rfq-count {
    display: flex;
    justify-content: center;
    gap: 5px;
}

.rfq-count span {
    background-color: var(--color-navy);
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    width: 35px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: var(--radius-sm);
}

/* Layout Grid */
.row {
    display: flex;
    gap: 30px;
    margin: 40px auto 0;
    max-width: 1400px;
    padding: 0 20px;
}

.md3 {
    flex: 1;
    min-width: 250px;
    padding: 25px;
    background-color: var(--bg-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    align-self: flex-start;
    box-shadow: var(--shadow-sm);
}

.md9 {
    flex: 3;
}

/* Sidebar Form */
.orange-text {
    color: var(--color-primary);
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
}

.black-text {
    color: var(--color-text-main);
    font-weight: normal;
    font-size: 14px;
    display: block;
    margin-bottom: 15px;
}

.form-section .form-input {
    width: 100%;
    margin-bottom: 15px;
    padding: 12px 14px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    color: var(--color-text-main);
    border-radius: var(--radius-sm);
    font-size: 14px;
    -webkit-text-fill-color: var(--color-text-main);
}

.form-section .form-input::placeholder {
    color: var(--color-text-light);
    -webkit-text-fill-color: var(--color-text-light);
}

.form-section .form-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-dim);
    outline: none;
    background: var(--bg-white);
}

.form-submit-btn {
    width: 100%;
    padding: 14px;
    background-color: var(--color-primary);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 600;
    border-radius: var(--radius-full);
    font-size: 14px;
    transition: all 0.3s;
}

.form-submit-btn:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
}

/* Buyer Product Card */
.product-card {
    display: flex;
    flex-wrap: wrap;
    padding: 25px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    transition: all 0.3s;
    box-shadow: var(--shadow-sm);
}

.product-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.product-info {
    flex: 3;
    min-width: 300px;
    margin-right: 20px;
}

.product-title {
    font-size: 18px;
    color: var(--color-navy);
    margin-bottom: 10px;
    display: block;
    font-weight: 600;
}

.product-title:hover {
    color: var(--color-primary);
}

.product-det {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-desc {
    font-size: 14px;
    color: var(--color-text-muted);
    margin-bottom: 15px;
    line-height: 1.6;
}

/* Buyer Details */
.buyer-name {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.buyer-initial {
    width: 40px;
    height: 40px;
    background-color: var(--color-primary);
    color: #fff;
    font-weight: bold;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 12px;
}

.date-posted {
    font-size: 12px;
    color: var(--color-text-light);
}

/* Actions */
.product-action {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-left: 1px solid var(--border-color);
    padding-left: 20px;
}

.contact-buyer-btn {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    padding: 12px 20px;
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 10px;
    width: 100%;
    border-radius: var(--radius-full);
    transition: all 0.3s;
    font-weight: 600;
}

.contact-buyer-btn:hover {
    background-color: var(--color-primary);
    color: #fff;
}

.quotes-received {
    font-size: 12px;
    color: var(--color-text-light);
}

/* =========================================
   Products Section (Country List)
   ========================================= */
.products-section {
    background-color: var(--bg-white);
    padding: 40px;
    margin: 30px auto;
    max-width: 1360px;
    margin-left: 20px;
    margin-right: 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

@media (min-width: 1400px) {
    .products-section {
        margin-left: auto;
        margin-right: auto;
    }
}

.products-section .products-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--color-navy);
    margin: 0 0 10px 0;
}

.products-section p {
    color: var(--color-text-muted);
    font-size: 14px;
    margin: 0 0 25px 0;
}

.products-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.product-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-main);
    cursor: pointer;
    transition: all 0.3s;
}

.product-item:hover {
    background: var(--color-primary-dim);
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.product-item .fi {
    font-size: 18px;
    flex-shrink: 0;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* =========================================
   Directory Section (Industry List)
   ========================================= */
.directory-section {
    padding: 40px;
    margin: 0 20px 30px;
    max-width: 1360px;
    background-color: var(--bg-body);
}

@media (min-width: 1400px) {
    .directory-section {
        margin-left: auto;
        margin-right: auto;
    }
}

.directory-heading {
    font-size: 22px;
    font-weight: 600;
    color: var(--color-navy);
    margin: 0 0 10px 0;
    border: none;
    padding: 0;
}

.directory-section > p {
    color: var(--color-text-muted);
    font-size: 14px;
    margin: 0 0 25px 0;
}

.directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.directory-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.3s;
    box-shadow: var(--shadow-sm);
}

.directory-item:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.directory-icon {
    color: var(--color-primary);
    font-size: 18px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.directory-link {
    color: var(--color-text-main);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.directory-item:hover .directory-link {
    color: var(--color-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .row {
        flex-direction: column;
    }

    .product-card {
        flex-direction: column;
    }

    .product-action {
        border-left: none;
        border-top: 1px solid var(--border-color);
        padding-left: 0;
        padding-top: 20px;
        margin-top: 20px;
        width: 100%;
    }
    
    .products-section,
    .directory-section {
        padding: 25px 20px;
        margin: 20px 15px;
    }
    
    .products-links {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .directory-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .products-links {
        grid-template-columns: 1fr;
    }
}
