/* ============================================
   BRANDS PAGE STYLES
   ============================================ */

/* Brands Section */
.brands-section {
    padding: 60px 0;
    background: #f9fafb;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h1 {
    font-size: 42px;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 15px;
}

.section-header p {
    font-size: 18px;
    color: #6b7280;
    margin-bottom: 30px;
}

.brands-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.brands-stats .stat {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: white;
    border-radius: 50px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.brands-stats .stat i {
    color: #10b981;
    font-size: 20px;
}

.brands-stats .stat span {
    font-weight: 600;
    color: #1f2937;
    font-size: 16px;
}

/* Brands Grid */
.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.brand-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.brand-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #10b981, #059669);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.brand-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.15);
    border-color: #10b981;
}

.brand-card:hover::before {
    transform: scaleX(1);
}

.brand-logo {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
}

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

.brand-info h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 10px;
}

.brand-info .product-count {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.brand-info .product-count i {
    color: #10b981;
}

.brand-info .price-range {
    color: #059669;
    font-size: 13px;
    font-weight: 600;
}

.brand-arrow {
    margin-top: 15px;
    width: 40px;
    height: 40px;
    background: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
}

.brand-card:hover .brand-arrow {
    background: #059669;
    transform: translateX(5px);
}

/* Brand Products Section */
.brand-products-section {
    padding: 60px 0;
    background: white;
}

.brand-header {
    margin-bottom: 40px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 20px;
    transition: color 0.3s;
}

.back-link:hover {
    color: #10b981;
}

.brand-title-section {
    display: flex;
    align-items: center;
    gap: 30px;
}

.brand-logo-large {
    width: 150px;
    height: 150px;
    background: #f9fafb;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.brand-logo-large img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.brand-title-text h1 {
    font-size: 36px;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 8px;
}

.brand-title-text p {
    color: #6b7280;
    font-size: 16px;
}

/* Products Grid (reuse from products page) */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.15);
}

.product-image {
    width: 100%;
    height: 280px;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    padding: 20px;
}

.product-details {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-brand-badge {
    display: inline-block;
    background: #e0f2fe;
    color: #0369a1;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
    width: fit-content;
}

.product-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
    flex: 1;
}

.product-name a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.3s;
}

.product-name a:hover {
    color: #10b981;
}

.product-quantity {
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 12px;
}

.product-price {
    margin-bottom: 15px;
}

.price-retail {
    font-size: 20px;
    font-weight: 700;
    color: #10b981;
    display: block;
    margin-bottom: 5px;
}

.price-trade {
    font-size: 13px;
    color: #6b7280;
}

.product-actions {
    display: flex;
    gap: 10px;
}

.product-actions .btn-primary {
    flex: 1;
}

.product-actions .btn-cart {
    width: 45px;
    height: 45px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* No Products State */
.no-products {
    text-align: center;
    padding: 80px 20px;
}

.no-products i {
    font-size: 64px;
    color: #d1d5db;
    margin-bottom: 20px;
}

.no-products h3 {
    font-size: 24px;
    color: #1f2937;
    margin-bottom: 10px;
}

.no-products p {
    color: #6b7280;
    margin-bottom: 30px;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablets and small desktops */
@media (max-width: 992px) {
    .brands-section,
    .brand-products-section {
        padding: 40px 0;
    }

    .section-header {
        margin-bottom: 35px;
    }

    .section-header h1 {
        font-size: 34px;
    }

    .section-header p {
        font-size: 16px;
    }

    .brands-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 20px;
    }

    .brand-title-text h1 {
        font-size: 30px;
    }
}

/* Tablets / large phones */
@media (max-width: 768px) {
    .brands-section,
    .brand-products-section {
        padding: 30px 0;
    }

    .section-header {
        margin-bottom: 25px;
    }

    .section-header h1 {
        font-size: 26px;
        margin-bottom: 10px;
    }

    .section-header p {
        font-size: 14px;
        margin-bottom: 18px;
    }

    .brands-stats {
        gap: 10px;
        margin-top: 20px;
    }

    .brands-stats .stat {
        padding: 10px 16px;
        flex: 1 1 auto;
    }

    .brands-stats .stat i {
        font-size: 16px;
    }

    .brands-stats .stat span {
        font-size: 13px;
    }

    .brands-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 14px;
        margin-top: 25px;
    }

    .brand-card {
        padding: 18px 14px;
        border-radius: 12px;
    }

    .brand-logo {
        width: 84px;
        height: 84px;
        padding: 10px;
        margin-bottom: 14px;
        border-radius: 10px;
    }

    .brand-info h3 {
        font-size: 16px;
        margin-bottom: 6px;
    }

    .brand-info .product-count {
        font-size: 13px;
    }

    .brand-info .price-range {
        font-size: 12px;
    }

    .brand-arrow {
        margin-top: 12px;
        width: 34px;
        height: 34px;
        font-size: 12px;
    }

    /* Brand-specific products view */
    .brand-header {
        margin-bottom: 25px;
    }

    .brand-title-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 16px;
    }

    .brand-logo-large {
        width: 100px;
        height: 100px;
        padding: 14px;
    }

    .brand-title-text h1 {
        font-size: 24px;
    }

    .brand-title-text p {
        font-size: 14px;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
        margin-top: 25px;
    }
}

/* Small phones — horizontal compact brand cards so the list isn't
   a tall column of squashed, centred blocks. */
@media (max-width: 480px) {
    .brands-section,
    .brand-products-section {
        padding: 20px 0;
    }

    .section-header {
        margin-bottom: 20px;
    }

    .section-header h1 {
        font-size: 22px;
    }

    .section-header p {
        font-size: 13px;
        margin-bottom: 16px;
    }

    /* Two stats per row so labels stay readable */
    .brands-stats {
        gap: 8px;
    }

    .brands-stats .stat {
        padding: 8px 10px;
        gap: 6px;
        flex: 1 1 calc(50% - 8px);
        justify-content: center;
    }

    .brands-stats .stat span {
        font-size: 12px;
    }

    /* One column, horizontal card */
    .brands-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: 20px;
    }

    .brand-card {
        flex-direction: row;
        align-items: center;
        text-align: left;
        padding: 14px;
        gap: 14px;
    }

    .brand-logo {
        width: 64px;
        height: 64px;
        padding: 8px;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .brand-info {
        flex: 1;
        min-width: 0;
    }

    .brand-info h3 {
        font-size: 15px;
        margin-bottom: 4px;
        text-align: left;
    }

    .brand-info .product-count {
        justify-content: flex-start;
        font-size: 12px;
        margin-bottom: 4px;
    }

    .brand-info .price-range {
        text-align: left;
        font-size: 12px;
    }

    .brand-arrow {
        margin-top: 0;
        width: 30px;
        height: 30px;
        font-size: 11px;
        flex-shrink: 0;
    }

    /* Brand-specific products view */
    .back-link {
        margin-bottom: 14px;
        font-size: 14px;
    }

    .brand-logo-large {
        width: 84px;
        height: 84px;
        padding: 10px;
        border-radius: 12px;
    }

    .brand-title-text h1 {
        font-size: 20px;
    }

    .brand-title-text p {
        font-size: 13px;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

