/* ===== BRAND SEARCH ===== */
.brand-search-container {
    max-width: 400px;
    margin: -16px auto 24px;
}

.brand-search-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s ease;
    background: #f8f8f8;
}

.brand-search-input:focus {
    border-color: #1a1a1a;
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

/* ===== BRAND GRID ===== */
.brand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
    margin-top: 8px;
}

.brand-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 16px 12px;
    text-align: center;
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.brand-card:hover {
    border-color: #d0d0d0;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px);
}

/* BRAND LOGO - PERSEGI 1:1 */
.brand-card .brand-image-wrapper {
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 12px;
    overflow: hidden;
    background: #f5f5f5;
    margin-bottom: 10px;
}

.brand-card .brand-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.brand-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-top: 4px;
}

.brand-card .brand-count {
    font-size: 0.7rem;
    color: #999;
}

/* ===== BRAND DETAIL ===== */
.brand-detail {
    margin-top: 8px;
}

.brand-detail-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
    padding: 20px;
    background: #f8f8f8;
    border-radius: 16px;
}

/* BRAND LOGO DI DETAIL - PERSEGI 1:1 */
.brand-detail-header .brand-logo {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background: #ffffff;
    border: 2px solid #e0e0e0;
}

.brand-detail-header .brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand-detail-header .brand-info h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.brand-detail-header .brand-info p {
    color: #888;
    font-size: 0.95rem;
}

.brand-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 8px;
}

.brand-detail-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.25s ease;
}

.brand-detail-card:hover {
    border-color: #d0d0d0;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.brand-detail-card .image-wrapper {
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    background: #f8f8f8;
}

.brand-detail-card .image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.brand-detail-card .info {
    padding: 10px 14px 14px;
}

.brand-detail-card .info .variant {
    font-size: 0.9rem;
    font-weight: 500;
    color: #1a1a1a;
}

.brand-detail-card .info .year {
    font-size: 0.7rem;
    color: #aaa;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .brand-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 14px;
    }
    .brand-card {
        padding: 12px 8px;
    }
    .brand-card h3 {
        font-size: 0.8rem;
    }
    .brand-detail-header {
        flex-direction: column;
        text-align: center;
        padding: 16px;
    }
    .brand-detail-header .brand-logo {
        width: 80px;
        height: 80px;
    }
    .brand-detail-header .brand-info h2 {
        font-size: 1.4rem;
    }
    .brand-detail-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 14px;
    }
    .brand-search-container {
        max-width: 300px;
        margin: -12px auto 18px;
    }
    .brand-search-input {
        padding: 10px 14px;
        font-size: 0.85rem;
    }
}

@media (max-width: 420px) {
    .brand-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }
    .brand-card {
        padding: 8px 6px;
    }
    .brand-card h3 {
        font-size: 0.7rem;
    }
    .brand-detail-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 10px;
    }
    .brand-detail-header .brand-logo {
        width: 60px;
        height: 60px;
    }
    .brand-detail-header .brand-info h2 {
        font-size: 1.2rem;
    }
    .brand-detail-card .info .variant {
        font-size: 0.8rem;
    }
}