/* Footer brand carousel */

.footer-brands {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 18px 8px 24px;
    margin: 20px 0 10px;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.footer-brands-list-toggle {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    padding: 0;
}

.footer-brands-list-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: #555;
}

.footer-brands-list-toggle:hover { background: #f5f5f5; }

.footer-brands-nav {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    color: #888;
    font-size: 22px;
    cursor: pointer;
    transition: color .15s;
}

.footer-brands-nav:hover:not(:disabled) { color: #d71414; }

.footer-brands-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.footer-brands-viewport {
    flex: 1 1 auto;
    overflow: hidden;
    min-width: 0;
}

.footer-brands-track {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 12px;
    transition: transform .35s ease;
    will-change: transform;
}

.footer-brands-item {
    flex: 0 0 auto;
    width: 150px;
    height: 90px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    transition: border-color .15s, box-shadow .15s;
}

.footer-brands-item:hover {
    border-color: #d71414;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.footer-brands-item a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.footer-brands-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.footer-brands-placeholder {
    font-size: 13px;
    font-weight: 600;
    color: #666;
    text-align: center;
    text-transform: capitalize;
    line-height: 1.2;
    padding: 4px;
    word-break: break-word;
}

/* Modal — full alphabetical list */

.footer-brands-modal[hidden] { display: none; }

.footer-brands-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-brands-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
}

.footer-brands-modal-dialog {
    position: relative;
    background: #fff;
    border-radius: 6px;
    width: min(820px, 92vw);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.footer-brands-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid #eee;
}

.footer-brands-modal-header h3 { margin: 0; font-size: 18px; color: #333; }

.footer-brands-modal-close {
    background: transparent;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #888;
}

.footer-brands-modal-close:hover { color: #d71414; }

.footer-brands-modal-body {
    overflow-y: auto;
    padding: 16px 20px;
    columns: 3 200px;
    column-gap: 24px;
}

.footer-brands-letter-group {
    break-inside: avoid;
    margin-bottom: 16px;
}

.footer-brands-letter {
    font-size: 16px;
    font-weight: 700;
    color: #d71414;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 4px;
    margin-bottom: 6px;
}

.footer-brands-letter-group ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-brands-letter-group li { padding: 2px 0; }

.footer-brands-letter-group a {
    color: #333;
    font-size: 13px;
    text-decoration: none;
}

.footer-brands-letter-group a:hover { color: #d71414; text-decoration: underline; }

@media (max-width: 600px) {
    .footer-brands-item { width: 110px; height: 70px; padding: 6px; }
    .footer-brands-modal-body { columns: 2 140px; }
}
