/* ============================================
   BRAND PAGE - I nostri brand
   Layout responsive Desktop e Mobile
   ============================================ */

.brand-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
}

/* Titolo principale */
.brand-page-title {
    font-size: 2.25rem;
    font-weight: 700;
    text-align: center;
    text-transform: lowercase;
    color: #343a40;
    margin-bottom: 2rem;
    letter-spacing: 0.02em;
}

/* Index lettere segnalibro */
.brand-letter-index {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem 0.5rem;
    margin-bottom: 2.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.brand-letter-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.4rem;
    font-size: 1rem;
    font-weight: 700;
    color: #343a40;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    text-decoration: none;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.brand-letter-link:hover {
    color: #fff;
    background: #BED031;
    border-color: #BED031;
    text-decoration: none;
}

/* Sezione per lettera */
.brand-letter-section {
    margin-bottom: 2.5rem;
    scroll-margin-top: 100px; /* offset per navbar fixed */
}

.brand-letter-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #343a40;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #BED031;
    letter-spacing: 0.05em;
}

/* Griglia brand - DESKTOP */
.brand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}

/* Card brand - dimensioni uniformi */
.brand-card {
    display: block;
    text-decoration: none;
    color: #343a40;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
    height: 100%;
}

.brand-card:hover {
    border-color: #BED031;
    box-shadow: 0 4px 12px rgba(190, 208, 49, 0.2);
    text-decoration: none;
    color: #343a40;
}

.brand-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 0.75rem;
    min-height: 150px;
}

.brand-card-logo {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.6rem;
    flex-shrink: 0;
}

.brand-card-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.brand-card-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #adb5bd;
    background: #f1f3f5;
    border-radius: 4px;
}

.brand-card-name {
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
    word-break: break-word;
}

/* Nessun brand */
.brand-no-brands {
    text-align: center;
    color: #6c757d;
    font-size: 1.1rem;
    padding: 2rem;
}

/* ============================================
   MOBILE
   ============================================ */
@media (max-width: 767px) {
    .brand-page {
        padding: 1.5rem 1rem 2.5rem;
    }

    .brand-page-title {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }

    .brand-letter-index {
        margin-bottom: 1.5rem;
        padding: 0.75rem;
        gap: 0.25rem 0.35rem;
    }

    .brand-letter-link {
        min-width: 2rem;
        height: 2rem;
        font-size: 0.9rem;
        padding: 0 0.3rem;
    }

    .brand-letter-section {
        margin-bottom: 1.75rem;
    }

    .brand-letter-title {
        font-size: 1.4rem;
        margin-bottom: 0.75rem;
    }

    /* Griglia più compatta su mobile */
    .brand-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.75rem;
    }

    .brand-card-inner {
        padding: 0.6rem 0.5rem;
        min-height: 120px;
    }

    .brand-card-logo {
        width: 56px;
        height: 56px;
        margin-bottom: 0.4rem;
    }

    .brand-card-name {
        font-size: 0.8rem;
    }
}
