:root {
    --brand-media-height: 110px;
}

body {
    background-color: #f0f2f5;
}

.site-footer {
    background-color: #fff;
}

.page-hero {
    padding-top: 0.25rem;
}

/* Bootstrap row-cols only goes to 6; extend for 8 and 10 per row */
@media (min-width: 992px) {
    .row-cols-lg-8 > * {
        flex: 0 0 auto;
        width: 12.5%;
    }
}

@media (min-width: 1200px) {
    .row-cols-xl-10 > * {
        flex: 0 0 auto;
        width: 10%;
    }
}

/* Brand cards */
.page-brands .brand-card {
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.page-brands .brand-card:hover {
    transform: translateY(-3px);
    color: inherit;
    box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.12) !important;
}

.brand-card-media {
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.brand-card-img {
    height: var(--brand-media-height);
    object-fit: contain;
    padding: 0.75rem;
    background: #fff;
}

.brand-placeholder {
    height: var(--brand-media-height);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: #6c757d;
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

.page-brands .brand-card-title {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.page-brands .brand-card-id {
    margin: 0;
    font-size: 0.7rem;
    color: #6c757d;
}

.page-brands .brand-card-badge {
    margin-top: 0.25rem;
    font-size: 0.65rem;
    align-self: flex-start;
}

/* Brand detail header */
.brand-header-card {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
}

.brand-logo-sm {
    width: 72px;
    height: 72px;
    object-fit: contain;
    padding: 0.35rem;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
}

/* Items table */
.thumb-col {
    width: 4.5rem;
}

.item-thumb {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
    background: #fff;
    display: block;
}

.item-thumb-empty {
    background: #e9ecef;
}

.item-table code {
    font-size: 0.8em;
}

.item-detail-image {
    max-height: 280px;
    object-fit: contain;
}

.item-detail-image-placeholder {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e9ecef;
    color: #6c757d;
    border-radius: 0.5rem;
}

.detail-table .detail-label {
    width: 38%;
    vertical-align: top;
    white-space: nowrap;
}

.detail-pre {
    font-size: 0.8rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.75rem;
    max-height: 240px;
    overflow: auto;
}

@media (max-width: 575.98px) {
    :root {
        --brand-media-height: 80px;
    }
}

@media (min-width: 992px) {
    :root {
        --brand-media-height: 72px;
    }
}
