/* ============================================
   Suppliers Page Styles - Agroking Uganda
   ============================================ */

/* Suppliers Hero Section */
.suppliers-hero {
    background: linear-gradient(135deg, rgba(42, 183, 55, 0.95), rgba(30, 139, 42, 0.95)),
                url('../images/hero-bg.png') center/cover no-repeat;
    padding: 100px 0 80px;
    color: white;
    position: relative;
    overflow: hidden;
}

.suppliers-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.suppliers-hero .container {
    position: relative;
    z-index: 2;
}

.suppliers-hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.suppliers-hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    opacity: 0.95;
}

/* Introduction Section */
.suppliers-intro {
    background: var(--off-white);
}

.intro-content {
    padding: 2rem 0;
}

.intro-feature-card {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.intro-feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(42, 183, 55, 0.2);
}

.intro-feature-card i {
    font-size: 3rem;
    color: var(--primary-green);
    margin-bottom: 1rem;
}

.intro-feature-card h5 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.intro-feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
}

/* Filters Section */
.suppliers-filters {
    border-bottom: 1px solid #e0e0e0;
}

.filters-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.filters-card h5 {
    color: var(--primary-green);
    font-weight: 600;
}

.filters-card .form-label {
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.filters-card .form-select,
.filters-card .form-control {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 0.6rem;
    transition: border-color 0.3s ease;
}

.filters-card .form-select:focus,
.filters-card .form-control:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 0.2rem rgba(42, 183, 55, 0.25);
}

/* Suppliers Grid */
.suppliers-grid {
    background: white;
}

#suppliersCount {
    color: var(--text-dark);
    font-weight: 600;
}

#suppliersCount #count {
    color: var(--primary-green);
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Supplier Card */
.supplier-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.supplier-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 25px rgba(42, 183, 55, 0.2);
}

.supplier-card-header {
    position: relative;
    background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
    padding: 1.5rem;
    text-align: center;
    min-height: 120px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.supplier-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    background: white;
    border-radius: 50%;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.supplier-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.supplier-badge {
    position: absolute;
    top: 10px;
    right: 10px;
}

.supplier-badge .badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
}

.supplier-card-body {
    padding: 1.5rem;
    flex-grow: 1;
}

.supplier-name {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.supplier-location {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.supplier-location i {
    color: var(--primary-green);
}

.supplier-description {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.supplier-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.tag-crop {
    background: rgba(42, 183, 55, 0.1);
    color: var(--primary-green);
}

.tag-animal {
    background: rgba(201, 169, 97, 0.1);
    color: #c9a961;
}

.tag-equipment {
    background: rgba(139, 111, 71, 0.1);
    color: var(--earth-brown);
}

.tag-organic {
    background: rgba(42, 183, 55, 0.15);
    color: var(--dark-green);
    border: 1px solid var(--primary-green);
}

.tag-conventional {
    background: rgba(108, 117, 125, 0.1);
    color: var(--text-muted);
}

.tag-hybrid {
    background: rgba(42, 183, 55, 0.1);
    color: var(--primary-green);
}

.supplier-products-preview {
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.supplier-card-footer {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.supplier-card-footer .btn {
    flex: 1;
    min-width: 100px;
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
}

.supplier-card-footer .btn-outline-dark,
.supplier-card-footer .btn[style*="background: #212529"],
.btn[style*="background: #212529"] {
    background: #212529 !important;
    color: white !important;
    border-color: #212529 !important;
}

.supplier-card-footer .btn-outline-dark:hover,
.supplier-card-footer .btn[style*="background: #212529"]:hover,
.btn[style*="background: #212529"]:hover {
    background: #000000 !important;
    color: white !important;
    border-color: #000000 !important;
}

.supplier-card-footer .btn[style*="background: #212529"] i,
.btn[style*="background: #212529"] i {
    color: white !important;
}

.btn[style*="background: #212529"]:hover i {
    color: white !important;
}

.supplier-card-footer .btn-success {
    background: #25D366;
    border-color: #25D366;
}

.supplier-card-footer .btn-success:hover {
    background: #20BA5A;
    border-color: #20BA5A;
}

/* No Results */
#noResults {
    padding: 3rem 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .suppliers-hero-title {
        font-size: 2.5rem;
    }

    .suppliers-hero-subtitle {
        font-size: 1.2rem;
    }

    .filters-card {
        padding: 1.5rem;
    }

    .supplier-card-footer {
        flex-direction: column;
    }

    .supplier-card-footer .btn {
        width: 100%;
    }

    .sort-options {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    #sortSuppliers {
        width: 100% !important;
    }
}

@media (max-width: 576px) {
    .suppliers-hero {
        padding: 80px 0 60px;
    }

    .suppliers-hero-title {
        font-size: 2rem;
    }

    .suppliers-hero-subtitle {
        font-size: 1rem;
    }

    .intro-feature-card {
        padding: 1.5rem;
    }

    .filters-card {
        padding: 1rem;
    }
    
    .supplier-card-header {
        min-height: 100px;
        padding: 1rem;
    }
    
    .supplier-logo {
        width: 60px;
        height: 60px;
    }
    
    .supplier-card-body {
        padding: 1rem;
    }
    
    .supplier-name {
        font-size: 1.1rem;
    }
}

/* View Supplier Store Page Responsive */
@media (max-width: 768px) {
    .supplier-store-header {
        min-height: 250px !important;
        padding: 2rem 0 !important;
    }
    
    .supplier-logo-large {
        width: 120px !important;
        height: 120px !important;
        margin-bottom: 1rem !important;
    }
    
    .supplier-contact-info {
        flex-direction: column !important;
        gap: 0.75rem !important;
        padding: 1rem !important;
    }
    
    .supplier-contact-info > div {
        font-size: 0.9rem !important;
    }
    
    .product-card {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .supplier-store-header {
        min-height: 200px !important;
        padding: 1.5rem 0 !important;
    }
    
    .supplier-logo-large {
        width: 100px !important;
        height: 100px !important;
    }
    
    .supplier-store-header h1 {
        font-size: 1.5rem !important;
    }
    
    .supplier-contact-info {
        padding: 0.75rem !important;
        font-size: 0.85rem !important;
    }
    
    .supplier-contact-info i {
        font-size: 0.9rem !important;
    }
}

/* View Product Page Responsive */
@media (max-width: 768px) {
    .product-detail-header {
        padding: 1rem 0 !important;
    }
    
    .product-image-large {
        margin-bottom: 1.5rem;
    }
    
    .product-price {
        padding: 1rem !important;
    }
    
    .product-price strong {
        font-size: 1.5rem !important;
    }
    
    .order-section {
        padding: 1.5rem !important;
    }
    
    .order-section .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .order-section .d-flex {
        flex-direction: column !important;
    }
}

@media (max-width: 576px) {
    .product-image-large {
        height: 300px !important;
    }
    
    .product-image-placeholder {
        height: 300px !important;
    }
    
    .product-price {
        padding: 0.75rem !important;
    }
    
    .product-price strong {
        font-size: 1.25rem !important;
    }
    
    .order-section {
        padding: 1rem !important;
    }
    
    .order-section h4 {
        font-size: 1.1rem !important;
    }
    
    .supplier-info-card {
        padding: 1rem !important;
    }
}

/* Animation for filter results */
.supplier-card-item {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hide filtered items */
.supplier-card-item.hidden {
    display: none !important;
}
