/* =======================================================
   BRANDS PAGE SPECIFIC
   ======================================================= */
.brand-directory-container {
    width: 100% !important; background-color: #F9F8F6 !important; position: relative !important; z-index: 10 !important;
}

body:not(.menu-open) .brand-directory-container {
    height: calc(100vh - 50px) ; 
    max-height: calc(100vh - 50px) ;
}

/* Contextual Hide for Desktop */
@media (min-width: 1025px) {
    .brand-directory-container .fs-utility-nav { display: none !important; } 
}

.fs-brands-content {
    flex: 1 !important; display: flex !important; flex-direction: column !important; 
    height: 100% !important; overflow: hidden !important;
}
.box-brands-filter-bar {
    display: flex; flex-wrap: wrap; gap: 15px; padding-bottom: 20px; flex-shrink: 0; align-items: center;
}

.filter-btn { background: transparent; border: none; padding: 0; font-family: inherit; font-size: 16px; letter-spacing: 0.5px; font-weight: 400; color: #000; cursor: pointer; text-transform: uppercase; }
.filter-btn.active { text-decoration: underline; font-weight: 500; }
.filter-btn.disabled { color: #CCC; pointer-events: none; }

/* The Scrollable Area */
.box-brands-list-container { flex-grow: 1; overflow-y: auto; scroll-behavior: smooth; scrollbar-width: none; }
.box-brands-list-container::-webkit-scrollbar { display: none; }

.box-brand-section { margin-bottom: 20px; }
.box-brand-letter-title { font-family: inherit; font-size: 16px; font-weight: 400; margin: 0 0 10px 0; text-transform: uppercase; color: #000; }
.box-brand-letter-title.active-letter { border-bottom: 1px solid #000; display: inline-block; }

/* Desktop Grid */
.box-brand-grid { 
    display: grid !important; 
    grid-template-columns: repeat(3, 250px) !important; /* Precise width to match design spacing */
    column-gap: 80px !important; 
    row-gap: 8px !important; 
}

.box-brand-link { text-decoration: none; color: #000; font-size: 14px; text-transform: uppercase; line-height: 1.2; display: block !important; }
.box-brand-link:hover { opacity: 0.6; }

/* =======================================================
   MOBILE OPTIMIZATIONS FOR BRANDS PAGE
   ======================================================= */
@media (max-width: 1024px) {
    
    /* Hide brands filter bar & newsletter on mobile */
    .box-brands-filter-bar, 
    .fs-newsletter { display: none !important; } 

    /* 1. Resize the Sidebar to make room for the Brands List */
    .fs-sidebar {
        flex: 0 0 150px !important; 
        max-width: 150px !important;
		
    }

    /* 2. THE FIX: Force Brands Grid to 1 Column so it stops blowing out the screen */
    .box-brand-grid {
        grid-template-columns: 1fr !important;
        column-gap: 0 !important;
    }
    
    /* 3. Guarantee the list container handles the vertical scroll properly */
    .box-brands-list-container {
        overflow-y: auto !important;
        overflow-x: hidden !important;
        width: 100% !important;
        padding-right: 5px !important; /* Breathing room for scrolling */
    }
	body:not(.menu-open) .brand-directory-container {
    height: calc(100dvh - 65px) ; 
    max-height: calc(100dvh -65px) ;
		margin-top: 15px;
}
}