/* ==========================================
   CSS CUSTOM PROPERTIES & EXTENSIBILITY _upd
   ==========================================
   These CSS variables support automatic scaling:
   - --brand-count, --visible-brand-count: Set dynamically by JavaScript
   - --category-count, --visible-category-count: Set dynamically by JavaScript
   Grid layout automatically adapts to any number of brands/categories
*/
:root {
    /* Color Scheme - Running Track Theme */
    --track-red: #d32f2f;
    --track-orange: #ff6b35;
    --track-dark-red: #b71c1c;
    --track-white: #ffffff;
    --grass-green: #2e7d32;
    --grass-light: #66bb6a;
    --lane-white: #f8f9fa;
    --asphalt-dark: #37474f;
    --asphalt-light: #546e7a;
    --shadow-dark: rgba(0, 0, 0, 0.3);
    --shadow-light: rgba(0, 0, 0, 0.1);
    --text-primary: #1a1a1a;
    --text-secondary: #37474f;
    --background-gradient: #c35037;
    --modal-backdrop: rgba(0, 0, 0, 0.8);
    
    /* Dynamic Grid Variables - Set by JavaScript for extensibility */
    --brand-count: 9;          /* Total brands (including collapsed) */
    --visible-brand-count: 9;  /* Currently visible brands */
    --category-count: 7;       /* Total categories (including collapsed) */
    --visible-category-count: 7; /* Currently visible categories */
}

/* Global Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

html {
    touch-action: manipulation;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background: var(--background-gradient);
    touch-action: manipulation;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Track Lane Lines Effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 120px,
            rgba(255, 255, 255, 0.2) 120px,
            rgba(255, 255, 255, 0.2) 124px,
            transparent 124px,
            transparent 240px
        );
    pointer-events: none;
    z-index: -1;
}

/* Header Styles */
.header {
    text-align: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #2e7d32 0%, #388e3c 50%, #43a047 100%);
    box-shadow: 
        0 4px 8px var(--shadow-dark),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-bottom: 3px solid var(--track-white);
    position: relative;
    z-index: 1000;
}

.header::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--lane-white);
}

.main-title {
    font-size: 2.5rem;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.subtitle {
    font-size: 1.2rem;
    color: #e8f5e9;
    margin-bottom: 2rem;
    font-weight: 300;
}

/* Search Container */
.search-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60px;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 600px;
    min-width: 400px;
}

.search-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-secondary);
    z-index: 2;
}

#search-bar {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 2px solid var(--metal-accent);
    border-radius: 25px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 
        inset 2px 2px 5px rgba(0, 0, 0, 0.1),
        0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

#search-bar:focus {
    outline: none;
    border-color: var(--wood-primary);
    box-shadow: 
        inset 2px 2px 5px rgba(0, 0, 0, 0.1),
        0 0 10px rgba(139, 69, 19, 0.3);
}

.search-clear {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    transition: color 0.3s ease;
}

.search-clear:hover {
    color: var(--wood-primary);
}

.search-clear.hidden {
    display: none;
}

/* Main Content */
.main-content {
    padding: 2rem 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* ==========================================
   MAIN GRID CONTAINER - FULLY EXTENSIBLE
   ==========================================
   This grid automatically adapts to any number of brands and categories:
   - grid-template-columns: Uses --visible-brand-count (set by JavaScript)
   - grid-template-rows: Uses --visible-category-count (set by JavaScript)
   - JavaScript dynamically updates these values based on data.js content
   - NO CSS CHANGES needed when adding new brands or categories
*/
.tier-grid-container {
    display: grid;
    /* AUTOMATIC COLUMN SCALING: 180px for category labels + dynamic brand columns */
    grid-template-columns: 180px repeat(var(--visible-brand-count, 9), 1fr);
    /* AUTOMATIC ROW SCALING: auto for brand headers + dynamic category rows */
    grid-template-rows: auto repeat(var(--visible-category-count, 4), minmax(160px, auto));
    gap: 2px;
    padding: 1rem;
    background: linear-gradient(135deg, var(--asphalt-light) 0%, var(--asphalt-dark) 100%);
    border-radius: 15px;
    box-shadow: 
        0 8px 25px var(--shadow-dark),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 3px solid var(--metal-accent);
    position: relative;
    min-height: 400px;
    transition: all 0.3s ease;
}

/* Hidden brand columns */
.brand-column.collapsed {
    display: none;
}

/* Rack Shelves Effect */
.tier-grid-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(
            0deg,
            transparent 0px,
            transparent 200px,
            rgba(139, 69, 19, 0.1) 200px,
            rgba(139, 69, 19, 0.1) 205px
        );
    pointer-events: none;
    border-radius: 12px;
    z-index: -1;
}

/* Grid Header - Top Left Corner */
.grid-header {
    background: #f6f7f8;
    color: #333;
    padding: 0.4rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 700;
    font-size: 1.2rem;
    line-height: 1.1;
    box-shadow: 0 2px 4px var(--shadow-dark);
    border: 2px solid var(--track-white);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
}

.color-legend {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 0.15rem;
    width: 100%;
    height: 100%;
}

.legend-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.3rem;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    color: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    line-height: 1;
}

.legend-item.beginner {
    background: linear-gradient(135deg, #f9a825 0%, #ffb74d 100%);
}

.legend-item.daily {
    background: linear-gradient(135deg, #1976d2 0%, #42a5f5 100%);
}

.legend-item.speed {
    background: linear-gradient(135deg, #d32f2f 0%, #f44336 100%);
}

.legend-item.race {
    background: linear-gradient(135deg, #212121 0%, #424242 100%);
}

/* Brand Headers - Top Row */
.brand-header {
    background: linear-gradient(135deg, #a03d2a 0%, #8b2f22 100%);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 700;
    font-size: 1.5rem;
    box-shadow: 0 2px 4px var(--shadow-dark);
    border: 2px solid var(--track-white);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    transition: all 0.3s ease;
    position: relative;
}

.brand-header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.brand-toggle-button {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 6px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
    color: white;
    position: absolute;
    top: 8px;
    right: 8px;
}

.brand-toggle-button:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

.brand-toggle-button:active {
    transform: scale(0.95);
}

.brand-header.collapsed {
    display: none;
}

/* Collapsed Categories Container */
.collapsed-categories-container {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
    max-width: 300px;
    justify-content: flex-start;
}

/* Collapsed Brands Container */
.collapsed-brands-container {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
    max-width: 300px;
    justify-content: flex-end;
}

.collapsed-brand-chip {
    background: linear-gradient(135deg, #a03d2a 0%, #8b2f22 100%);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid var(--track-white);
    box-shadow: 0 2px 4px var(--shadow-dark);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.collapsed-brand-chip:hover {
    background: linear-gradient(135deg, #c24932 0%, #a03d2a 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow-dark);
    color: white;
}

.collapsed-brand-chip .restore-icon {
    font-size: 0.7rem;
}

.collapsed-category-chip {
    background: linear-gradient(135deg, #a03d2a 0%, #8b2f22 100%);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid var(--track-white);
    box-shadow: 0 2px 4px var(--shadow-dark);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.collapsed-category-chip:hover {
    background: linear-gradient(135deg, #c24932 0%, #a03d2a 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow-dark);
    color: white;
}

.collapsed-category-chip .restore-icon {
    font-size: 0.7rem;
}


/* Category Labels - Left Column */
.category-label {
    background: linear-gradient(135deg, #a03d2a 0%, #8b2f22 100%);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 700;
    font-size: 1.5rem;
    box-shadow: 0 2px 4px var(--shadow-dark);
    border: 2px solid var(--track-white);
    display: flex;
    align-items: center;
    justify-content: center;
    writing-mode: horizontal-tb;
    line-height: 1.2;
    transition: all 0.3s ease;
    position: relative;
}

.category-label-content {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.category-toggle-button {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 6px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
    color: white;
    position: absolute;
    top: 8px;
    right: 8px;
}

.category-toggle-button:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

.category-toggle-button:active {
    transform: scale(0.95);
}

.category-label.collapsed {
    display: none;
}

/* Grid Cells - Intersection of Brand and Category */
.grid-cell {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 0.5rem;
    border: 2px solid var(--track-white);
    box-shadow: 
        0 2px 4px var(--shadow-light),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    justify-content: flex-start;
    min-height: 120px;
    overflow-y: auto;
}

/* Shoe Card Styles - Simplified for Grid */
.shoe-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 
        0 2px 8px var(--shadow-light),
        0 1px 2px var(--shadow-light);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid var(--metal-accent);
    position: relative;
    width: 100%;
    max-width: 200px;
    height: 160px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

/* Category-based background colors for shoe cards - Taekwondo Belt Colors */
/* Beginner (입문화) - Yellow Belt */
.shoe-card[data-category-group="beginner"] {
    background: linear-gradient(135deg, #fff9c4 0%, #fff176 100%);
    border-left: 4px solid #f9a825;
}

.shoe-card[data-category-group="beginner"]::before {
    background: linear-gradient(90deg, #f9a825 0%, #ffb74d 50%, #f9a825 100%);
}

/* Daily categories (안정화, 쿠션화, 올라운더) - Blue Belt */
.shoe-card[data-category-group="daily"] {
    background: linear-gradient(135deg, #e3f2fd 0%, #90caf9 100%);
    border-left: 4px solid #1976d2;
}

.shoe-card[data-category-group="daily"]::before {
    background: linear-gradient(90deg, #1976d2 0%, #42a5f5 50%, #1976d2 100%);
}

/* Speed categories (경량트레이너, 슈퍼트레이너) - Red Belt */
.shoe-card[data-category-group="speed"] {
    background: linear-gradient(135deg, #ffebee 0%, #ef9a9a 100%);
    border-left: 4px solid #d32f2f;
}

.shoe-card[data-category-group="speed"]::before {
    background: linear-gradient(90deg, #d32f2f 0%, #f44336 50%, #d32f2f 100%);
}

/* Racing (레이싱화) - Black Belt */
.shoe-card[data-category-group="race"] {
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    border-left: 4px solid #212121;
}

.shoe-card[data-category-group="race"]::before {
    background: linear-gradient(90deg, #212121 0%, #424242 50%, #212121 100%);
}

.shoe-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--metal-accent) 0%, var(--metal-dark) 50%, var(--metal-accent) 100%);
}

.shoe-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 
        0 8px 25px var(--shadow-dark),
        0 4px 8px var(--shadow-light);
    border-color: var(--wood-primary);
}

.shoe-image-container {
    position: relative;
    height: 110px;
    background: linear-gradient(135deg, #f8f8f8 0%, #ffffff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    padding: 0;
}

.shoe-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.shoe-card:hover .shoe-image {
    transform: scale(1.1);
}

.shoe-info {
    padding: 0.3rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 35px;
}

.shoe-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
    text-align: center;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin: 0;
}

/* Hide description in main grid */
.shoe-description {
    display: none;
}

/* Color Options */
/* Hide color options in main grid */
.color-options {
    display: none;
}

/* Color buttons hidden in main grid, shown in modal */
.color-button {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid var(--metal-accent);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 1px 2px var(--shadow-light);
}

.color-button:hover {
    transform: scale(1.1);
    border-color: var(--wood-primary);
    box-shadow: 0 4px 8px var(--shadow-dark);
}

.color-button.active {
    border-color: var(--wood-primary);
    border-width: 3px;
    transform: scale(1.1);
}

/* Modal Styles */
.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-container.hidden {
    display: none;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--modal-backdrop);
    cursor: pointer;
}

.modal-content {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    max-width: 900px;
    width: 95%;
    max-height: 95vh;
    overflow-y: auto;
    position: relative;
    border: 3px solid var(--metal-accent);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--wood-primary);
}

.modal-header {
    padding: 1.5rem 2rem 0.5rem;
    text-align: center;
    background: linear-gradient(135deg, var(--wood-light) 0%, #e6ddd4 100%);
    border-bottom: 2px solid var(--metal-accent);
}

.modal-shoe-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.modal-shoe-brand {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.modal-body {
    padding: 1.5rem;
}

.modal-image-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    min-height: 350px;
}

.modal-image-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #f8f8f8 0%, #ffffff 100%);
    border-radius: 10px;
    padding: 0.5rem;
    border: 2px solid var(--metal-accent);
}

.modal-shoe-image {
    width: 500px;
    height: auto;
    min-width: 500px;
    max-height: 450px;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.modal-color-info {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--metal-accent);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 5;
    font-size: 0.9rem;
    font-weight: 600;
}

#modal-color-name {
    color: var(--text-primary);
    margin-right: 0.5rem;
}

#modal-color-gender {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}

.carousel-btn {
    display: none !important;
    background: var(--wood-primary);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    margin: 0 1rem;
    box-shadow: 0 4px 8px var(--shadow-dark);
    border: 2px solid var(--metal-accent);
}

.carousel-btn:hover {
    background: var(--wood-secondary);
    transform: scale(1.1);
}

.carousel-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.carousel-btn.hidden-arrow {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.modal-details h4 {
    color: var(--text-primary);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.modal-description {
    margin-bottom: 2rem;
}

.modal-description p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.modal-colors {
    margin-bottom: 2rem;
}

.modal-colors .color-options {
    margin-top: 1rem;
    display: grid !important;
    grid-template-columns: repeat(6, 60px);
    gap: 0.5rem;
    justify-content: center;
    align-items: start;
}

.modal-colors .color-button {
    width: 40px;
    height: 40px;
}

.color-button-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    width: 60px;
    height: 80px; /* Fixed height to prevent vertical movement */
    flex-shrink: 0; /* Prevent shrinking */
}

.color-button-label {
    display: none !important;
    text-align: center;
    font-size: 0.75rem;
    line-height: 1.2;
    position: absolute;
    top: 50px; /* Position below the button */
    left: 50%;
    transform: translateX(-50%);
    width: 120px; /* Fixed width for text */
    z-index: 10;
}

.color-button-label.active {
    display: block !important;
}

.color-button-label .color-gender {
    display: block;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
}

/* Hide any carousel indicator text */
.carousel-indicator {
    display: none !important;
}

/* Hide any remaining navigation info */
.modal-navigation-info {
    display: none !important;
}

/* Responsive Design */







/* Utility Classes */
.hidden {
    display: none !important;
}

.no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.loading {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.shoe-card {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-content {
    animation: modalFadeIn 0.3s ease;
}

/* ==========================================
   RESPONSIVE MEDIA QUERIES
   ==========================================
   Mobile-first approach with responsive design
*/

/* Extra Large Screens (1400px+) */

/* ==========================================
   MOBILE/TABLET RESPONSIVE LAYOUT
   ==========================================
   Sticky header with horizontal scrollable grid
*/

/* Tablet and Mobile devices */
@media (max-width: 991px) {
    /* Sticky header that stays visible while scrolling */
    .header {
        position: sticky;
        top: 0;
        z-index: 1000;
        width: 100%;
    }
    
    /* Add padding to prevent content from hiding under sticky header */
    .main-content {
        padding-top: 250px;
    }
    
    /* Enable horizontal scrolling with minimum column width on mobile */
    .tier-grid-container {
        grid-template-columns: 180px repeat(var(--visible-brand-count, 9), minmax(200px, 1fr));
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: rgba(255, 255, 255, 0.5) transparent;
    }
    
    /* WebKit scrollbar styling */
    .tier-grid-container::-webkit-scrollbar {
        height: 8px;
    }
    
    .tier-grid-container::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .tier-grid-container::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.5);
        border-radius: 4px;
    }
    
    .tier-grid-container::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.7);
    }
}
