/*
 * APS Products — Brand Archive Styles (Redesigned)
 * Modern card grid with clean year/category grouping
 */

.aps-ba-wrapper *, .aps-ba-wrapper *::before, .aps-ba-wrapper *::after { box-sizing: border-box; }

/* ── Brand title ── */
.aps-ba-main-title {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 1.6rem;
    font-weight: 800;
    color: #111827;
    margin: 0 0 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e5e7eb;
}
.aps-ba-brand-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 4px;
    background: #fff;
}

/* ── Brand description ── */
.aps-ba-brand-desc {
    background: #f8fafc;
    border-left: 3px solid #2563eb;
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 24px;
    font-size: .88rem;
    color: #374151;
    line-height: 1.65;
}

/* ── Brand switcher ── */
.aps-ba-brand-switcher-row {
    margin-bottom: 24px;
}

/* ── Category section ── */
.aps-ba-category-section {
    margin-bottom: 40px;
}

.aps-ba-cat-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15rem;
    font-weight: 800;
    color: #111827;
    margin: 0 0 20px;
    padding: 12px 16px;
    background: #f1f5f9;
    border-radius: 10px;
    border-left: 4px solid #2563eb;
    line-height: 1.3;
}
.aps-ba-cat-separator {
    color: #9ca3af;
    font-weight: 300;
    font-size: 1.1rem;
}

/* ── Year block ── */
.aps-ba-year-block {
    margin-bottom: 28px;
}

.aps-ba-year-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .72rem;
    font-weight: 700;
    color: #6b7280;
    letter-spacing: .07em;
    text-transform: uppercase;
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}
.aps-ba-year-badge {
    display: none; /* year already in heading text */
}

/* ── Product grid ── */
.aps-ba-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
}

/* ── Product card ── */
.aps-ba-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all .2s ease;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    position: relative;
}
.aps-ba-card:hover {
    border-color: #2563eb;
    box-shadow: 0 6px 20px rgba(37, 99, 235, .13);
    transform: translateY(-3px);
    text-decoration: none;
}

/* Card image */
.aps-ba-card-img {
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    aspect-ratio: 1 / 1;
    border-bottom: 1px solid #f1f5f9;
    overflow: hidden;
}
.aps-ba-card-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    transition: transform .2s ease;
}
.aps-ba-card:hover .aps-ba-card-img img {
    transform: scale(1.06);
}

/* Card body */
.aps-ba-card-body {
    padding: 10px 10px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.aps-ba-card-title {
    font-size: .74rem;
    font-weight: 600;
    color: #111827;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.aps-ba-card:hover .aps-ba-card-title {
    color: #2563eb;
}

/* View specs link at bottom */
.aps-ba-card-link {
    display: block;
    font-size: .62rem;
    font-weight: 700;
    color: #2563eb;
    padding: 5px 10px;
    border-top: 1px solid #f1f5f9;
    background: #f8fafc;
    text-align: center;
    transition: background .15s;
}
.aps-ba-card:hover .aps-ba-card-link {
    background: #eff6ff;
}

/* ── Empty state ── */
.aps-ba-empty {
    color: #9ca3af;
    font-size: .9rem;
    padding: 24px;
    text-align: center;
    border: 1px dashed #e5e7eb;
    border-radius: 10px;
}

/* ── Responsive ── */
@media (max-width: 1023px) {
    .aps-ba-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 767px) {
    .aps-ba-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .aps-ba-cat-heading { font-size: 1rem; }
    .aps-ba-main-title { font-size: 1.3rem; }
}
@media (max-width: 479px) {
    .aps-ba-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .aps-ba-card-body { padding: 8px; }
    .aps-ba-card-title { font-size: .7rem; }
}
