/* ===============================
   Brands – Brick Grid (Fixed)
================================ */

.brand-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    justify-content: center;
    align-items: start;
    width: 100%;
    margin: 25px auto;
    padding: 0;
    box-sizing: border-box;
    position: relative;
    z-index: 10;
}

.brand-buttons .brand-btn {
    appearance: none;
    border: none;
    outline: none;

    display: inline-flex;
    justify-content: center;
    align-items: center;

    padding: 12px 10px;
    border-radius: 14px;
    background: linear-gradient(135deg, #f7f7f7, #e4ecf5);

    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;

    cursor: pointer;
    white-space: normal;
    text-align: center;

    box-shadow: 0 6px 14px rgba(0,0,0,0.06);
    max-width: 140px;
    min-height: 48px;

    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.brand-buttons .brand-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(0,0,0,0.12);
}


/* ===============================
   Error Codes Section (CRITICAL)
================================ */

#errorCodesSection {
    position: relative;
    overflow: visible !important;
}

#errorCodesContent {
    position: relative;
    z-index: 50;
    min-height: 250px;
    margin-top: 25px;
    overflow: visible !important;
}

/* کانتینر دکمه‌های برند */
.brands-container {
    position: relative;
    z-index: 10;
    overflow: visible !important;
}


/* ===============================
   Brand Cards
================================ */

.brand-card-container {
    display: block;
    width: 100%;
    margin-top: 20px;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* هدر کارت کلیک‌پذیر */
.brand-card-header-clickable {
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.brand-card-header-clickable:hover {
    background: linear-gradient(135deg, #3a5bff 0%, #2a4bff 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(58, 91, 255, 0.3);
}


/* ===============================
   Responsive – Tablet & Mobile
================================ */

@media (max-width: 1024px) {
    .brand-buttons {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    }

    .brand-buttons .brand-btn {
        font-size: 0.85rem;
        padding: 10px;
    }
}

@media (max-width: 768px) {
    .brand-buttons {
        grid-template-columns: repeat(2, 1fr);
    }

    .brand-buttons .brand-btn {
        font-size: 0.82rem;
        min-height: 46px;
    }

    .brand-card-header-clickable {
        padding: 15px;
        min-height: 60px;
    }

    .brand-card-header-clickable h3 {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .brand-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .brand-buttons .brand-btn {
        font-size: 0.78rem;
        min-height: 44px;
    }
}
