/**
 * Brands Section Styles
 * Matching the design from the image
 *
 * @package MadePrompt
 */

/* Brands Section Wrapper */
.brands-section-wrapper {
    width: 100%;
    margin: var(--section-gap) 0;
}

.brands-section-container {
    width: 100%;
}

/* Brands Section Box (glassmorphism) */
.brands-section-box {
    background: rgba(28, 28, 30, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--box-border-radius);
    padding: 2.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Box Header */
.brands-section-box-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 2.5rem;
    gap: 1.25rem;
}

/* Section Title */
.brands-section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* View All Button in Header - Unified style with articles button */
.brands-view-all-btn-header {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    color: #ffffff;
    background: rgba(28, 28, 30, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
}

.brands-view-all-btn-header:hover {
    background: rgba(44, 44, 46, 0.75);
    backdrop-filter: blur(25px) saturate(200%);
    -webkit-backdrop-filter: blur(25px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
    color: #ffffff;
}

@media (max-width: 768px) {
    .brands-section-box {
        padding: 1.5rem 1rem;
        border-radius: var(--box-border-radius-mobile);
    }
    
    .brands-section-box-header {
        margin-bottom: 1.5rem;
        gap: 1rem;
    }
    
    .brands-section-title {
        font-size: 1.5rem;
        letter-spacing: 2px;
    }
    
    .brands-view-all-btn-header {
        font-size: 0.8rem;
        padding: 0.7rem 1.5rem;
        text-align: center;
    }
}

/* Brands Grid */
.brands-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

/* Brand Card */
.brand-card {
    position: relative; /* Needed for badge positioning */
    background: rgba(28, 28, 30, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: var(--box-border-radius-mobile);
    padding: 2rem;
    padding-top: 2.5rem; /* Extra space for badge */
    margin-top: 0.75rem; /* Space for badge overflow */
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.brand-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    background: rgba(44, 44, 46, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Brand Card Title */
.brand-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, 
        #ffffff 0%, 
        var(--brand-accent-color, #ffffff) 50%, 
        #ffffff 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    text-align: center;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
}

/* Brand Card Image Container */
.brand-card-image-container {
    width: 100%;
    height: 350px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background: transparent;
    border: none;
    border-radius: var(--box-border-radius);
    margin: 0;
}

.brand-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: var(--box-border-radius);
}

/* Brand Card Description (legacy - now using features) */
/* Brand Card Description Box - Mini version */
.brand-card-description-box {
    width: 100%;
    margin: 1rem 0;
    padding: 1rem;
    background: rgba(28, 28, 30, 0.4);
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.brand-card-description-text {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.8rem;
    line-height: 1.5;
    text-align: left;
    margin: 0;
}

.brand-card-description-text p {
    margin: 0;
    color: rgba(255, 255, 255, 0.75);
}

/* Brand Card Features - Elegant preview tags */
.brand-card-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin: 0.5rem 0;
    flex-grow: 1;
}

.brand-card-feature-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.35rem 0.65rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
    transition: all 0.2s ease;
}

.brand-card-feature-tag:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.brand-card-feature-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
}

/* Responsive Features */
@media (max-width: 768px) {
    .brand-card-features {
        gap: 0.4rem;
    }
    
    .brand-card-feature-tag {
        padding: 0.3rem 0.5rem;
        font-size: 0.65rem;
    }
    
    .brand-card-feature-more {
        padding: 0.3rem 0.4rem;
        font-size: 0.6rem;
    }
}

/* Brand Card Button */
.brand-card-button {
    display: block;
    width: 100%;
    padding: 1rem 2rem;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    text-decoration: none;
    color: #ffffff;
    background: var(--brand-accent-color, rgba(28, 28, 30, 0.6));
    border: 1px solid color-mix(in srgb, var(--brand-accent-color, #ffffff) 30%, transparent);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.3),
        0 0 20px color-mix(in srgb, var(--brand-accent-color, transparent) 30%, transparent);
}

.brand-card-button:hover {
    background: color-mix(in srgb, var(--brand-accent-color, #ffffff) 110%, #000);
    border-color: color-mix(in srgb, var(--brand-accent-color, #ffffff) 50%, transparent);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.4),
        0 0 30px color-mix(in srgb, var(--brand-accent-color, transparent) 50%, transparent);
    transform: translateY(-2px);
    color: #ffffff;
}

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

.brands-page-wrapper {
    width: 100%;
    min-height: 60vh;
    padding: var(--page-padding-desktop);
}

.brands-page-container {
    max-width: var(--box-max-width);
    margin: 0 auto;
    padding: var(--wrapper-padding-desktop);
}

.brands-page-header {
    margin-bottom: 0;
}

.brands-page-header-content {
    text-align: center;
    margin-bottom: 0;
}

.brands-page-title {
    font-size: 3rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 1rem 0;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.brands-page-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    line-height: 1.6;
}

/* Filters integrated in header */
.brands-page-header .brands-categories-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
    padding: var(--wrapper-padding-mobile);
}

/* Desktop filter buttons - larger */
@media (min-width: 769px) {
    .brands-page-header .brands-categories-filter .category-filter-btn {
        padding: 1rem 2rem;
        font-size: 0.9rem;
    }
}

/* Section divider - Bold Engraved Style */
.brands-section-divider {
    margin: calc(var(--section-gap) * 0.75) 0;
    text-align: center;
    position: relative;
    transition: margin-top 0.3s ease, padding-top 0.3s ease;
}

/* When divider is inside related-brands-section, adjust spacing */
.related-brands-section .brands-section-divider {
    margin-top: calc(var(--section-gap) * 0.75);
    margin-bottom: calc(var(--section-gap) * 0.75);
}

/* When divider follows category-description-box, spacing is handled by divider */
.category-description-box.visible + .related-brands-section .brands-section-divider {
    margin-top: calc(var(--section-gap) * 0.75);
}

/* When dropdown is open, JavaScript handles margin-bottom on dropdown container */
/* This pushes all content below (description + brands) automatically */
.brands-filter-dropdown.dropdown-open {
    /* JavaScript will set exact margin-bottom based on menu height */
    /* This is a fallback minimum */
    transition: margin-bottom 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.brands-section-label {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 800;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 4px;
    padding: 0;
    background: transparent;
    position: relative;
    margin: 0;
    text-shadow: 
        0 0 10px rgba(255, 255, 255, 0.4),
        0 0 20px rgba(255, 255, 255, 0.2),
        0 0 30px rgba(255, 255, 255, 0.1);
}

/* Featured section - bright white neon */
.brands-section-featured-divider .brands-section-label {
    color: #ffffff;
    text-shadow: 
        0 0 10px rgba(255, 255, 255, 0.5),
        0 0 20px rgba(255, 255, 255, 0.3),
        0 0 40px rgba(255, 255, 255, 0.15);
}

/* Others section - slightly dimmer */
.brands-section-others-divider .brands-section-label {
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 
        0 0 8px rgba(255, 255, 255, 0.3),
        0 0 15px rgba(255, 255, 255, 0.15);
}

/* Featured brands inline (no separate section) */
.featured-brands-inline {
    margin-bottom: 0;
}

/* Brand Badge */
.brand-badge {
    position: absolute;
    top: -0.75rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 6px;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

/* Mobile badge adjustments */
@media (max-width: 768px) {
    .brand-badge {
        top: -0.5rem;
        right: 0.75rem;
        padding: 0.4rem 0.75rem;
        font-size: 0.65rem;
    }
}

.brand-badge-popular {
    background: rgba(255, 193, 7, 0.9);
    color: #000;
}

.brand-badge-new {
    background: rgba(40, 167, 69, 0.9);
    color: #ffffff;
}

.brand-badge-top-rated {
    background: rgba(255, 87, 34, 0.9);
    color: #ffffff;
}

.brand-badge-editor-choice {
    background: rgba(156, 39, 176, 0.9);
    color: #ffffff;
}

.brand-badge-free {
    background: rgba(76, 175, 80, 0.9);
    color: #ffffff;
}

.brand-badge-premium {
    background: rgba(255, 193, 7, 0.9);
    color: #000;
}

/* Brand Stats */
/* Brand Card Stats - Ultra minimal, inline, no box */
.brand-card-stats {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 1rem !important;
    margin: 0.75rem 0 !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
}

.brand-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
    white-space: nowrap;
}

.brand-stat-icon {
    font-size: 0.9rem;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .brand-card-stats {
        gap: 0.75rem;
        margin: 0.5rem 0;
}

    .brand-stat {
        font-size: 0.7rem;
}

    .brand-stat-icon {
        font-size: 0.85rem;
}
}

/* Responsive */
@media (max-width: 1024px) {
    .brands-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .featured-brands-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .brands-how-to-choose-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .brands-hero-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .brands-section-wrapper {
        margin: var(--section-gap-mobile) 0;
    }
    
    .brands-page-container {
        padding: var(--wrapper-padding-mobile);
    }
    
    .brands-page-wrapper {
        padding: var(--page-padding-mobile);
    }
    
    .brands-page-title {
        font-size: 2rem;
        letter-spacing: 2px;
    }
    
    .brands-page-subtitle {
        font-size: 1rem;
    }
    
    .brands-page-header .brands-categories-filter {
        gap: 0.5rem;
        padding: 0 0.5rem;
    }
    
    .brands-page-header .brands-categories-filter .category-filter-btn {
        padding: 0.6rem 1rem;
        font-size: 0.75rem;
    }
    
    .brands-grid {
        grid-template-columns: 1fr;
        gap: var(--section-gap-mobile);
    }
    
    .brand-card {
        padding: 1.5rem;
        gap: 1.5rem;
    }
    
    .brand-card-image-container {
        height: 350px;
    }
    
    .brand-card-description-box {
        padding: 0.85rem;
        margin: 0.85rem 0;
    }
    
    .brand-card-description-text {
        font-size: 0.75rem;
        line-height: 1.4;
    }
    
    .brands-section-divider {
        margin: calc(var(--section-gap-mobile) * 0.75) 0;
    }
    
    /* When divider is inside related-brands-section, adjust spacing */
    .related-brands-section .brands-section-divider {
        margin-top: calc(var(--section-gap-mobile) * 0.75);
        margin-bottom: calc(var(--section-gap-mobile) * 0.75);
    }
    
    /* When divider is present, spacing is handled by divider */
    .related-brands-section:has(.brands-section-divider) {
        margin-top: 0;
    }
    
    .category-description-box.visible {
        margin-bottom: 0;
    }
    
    .category-description-box.visible + .related-brands-section .brands-section-divider {
        margin-top: calc(var(--section-gap-mobile) * 0.75);
    }
}

/* Brands About Section */
.brands-about-section {
    width: 100%;
    margin: var(--section-gap) 0 0 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.brands-about-box {
    width: 100%;
    max-width: 100%;
    padding: var(--box-padding-desktop);
    background: rgba(28, 28, 30, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--box-border-radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.brands-about-title {
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
    text-align: center;
    margin: 0 0 1.5rem 0;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Content - Collapsible */
.brands-about-content {
    margin: 0;
    position: relative;
    max-height: 300px;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.brands-about-content.expanded {
    max-height: 5000px;
}

.brands-about-content-inner {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.05rem;
    line-height: 1.8;
}

.brands-about-content p {
    margin-bottom: 1rem;
}

.brands-about-content h2,
.brands-about-content h3 {
    color: #ffffff;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.brands-about-content ul,
.brands-about-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.brands-about-content li {
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.85);
}

.brands-about-content strong {
    color: #ffffff;
    font-weight: 700;
}

.brands-about-content a {
    color: #4A90E2;
    text-decoration: underline;
}

.brands-about-content a:hover {
    color: #50E3C2;
}

/* Toggle Button */
.brands-about-toggle-container {
    text-align: center;
    margin-top: 1.5rem;
}

.brands-about-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: rgba(28, 28, 30, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.3s ease;
}

.brands-about-toggle-btn:hover {
    background: rgba(44, 44, 46, 0.75);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.brands-toggle-icon {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

/* Mobile */
@media (max-width: 768px) {
    .brands-about-section {
        margin: var(--section-gap-mobile) 0 0 0;
    }
    
    .brands-about-box {
        padding: var(--box-padding-mobile);
        border-radius: var(--box-border-radius-mobile);
    }
    
    .brands-about-title {
        font-size: 1.5rem;
        letter-spacing: 1.5px;
        margin-bottom: 1.25rem;
    }
    
    .brands-about-content {
        max-height: 250px;
    }
    
    .brands-about-content-inner {
        font-size: 0.95rem;
        line-height: 1.7;
    }
    
    .brands-about-toggle-btn {
        padding: 0.65rem 1.5rem;
        font-size: 0.75rem;
    }
}

