/*
 * 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: #1e293b;
    margin: 0 0 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e2e8f0;
}
.aps-ba-brand-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border: 1px solid #e2e8f0;
    border-radius: 0;
    padding: 4px;
    background: #ffffff;
}

/* == Brand description == */
.aps-ba-brand-desc {
    background: #f5f7fa;
    border-left: 3px solid #0170b9;
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 24px;
    font-size: .88rem;
    color: #475569;
    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: #1e293b;
    margin: 0 0 20px;
    padding: 12px 16px;
    background: #f5f7fa;
    border-radius: 0;
    border-left: 4px solid #0170b9;
    line-height: 1.3;
}
.aps-ba-cat-separator {
    color: #64748b;
    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: #64748b;
    letter-spacing: .07em;
    text-transform: uppercase;
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}
.aps-ba-year-badge {
    display: inline-block;
    background: #0170b9;
    color: #ffffff;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    padding: 3px 8px;
    border-radius: 0;
}

/* == Product grid == */
.aps-ba-grid {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 12px;
}
@media (max-width: 1500px) { .aps-ba-grid { grid-template-columns: repeat(7, 1fr); } }
@media (max-width: 1200px) { .aps-ba-grid { grid-template-columns: repeat(5, 1fr); } }

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

/* Card image */
.aps-ba-card-img {
    background: #f5f7fa;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    aspect-ratio: 1 / 1;
    border-bottom: 1px solid #f5f7fa;
    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: #1e293b;
    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: #0170b9;
}

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

/* == Empty state == */
.aps-ba-empty {
    color: #64748b;
    font-size: .9rem;
    padding: 24px;
    text-align: center;
    border: 1px dashed #e2e8f0;
    border-radius: 0;
}

/* == 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; }
}

/* ==== v6.12.2: theme-matched brand archive (white rounded cards, blue accent) ==== */
.aps-ba-main-title{font:800 clamp(26px,3.6vw,36px)/1.15 system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;letter-spacing:-.025em;color:#1e293b;border-bottom:0;padding-bottom:0;margin:6px 0 18px}
.aps-ba-brand-logo{border-radius:12px;width:60px;height:60px}
.aps-ba-brand-desc{background:#fff;border:1px solid #e2e8f0;border-left:4px solid #0170b9;border-radius:14px;padding:16px 20px;font-size:15px;line-height:1.7;box-shadow:0 1px 3px rgba(15,23,42,.06)}
.aps-ba-category-section{margin-bottom:48px}
.aps-ba-cat-heading{background:transparent;border-left:0;padding:0;margin:0 0 18px;font:800 22px/1.25 system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;letter-spacing:-.015em}
.aps-ba-year-heading{border-bottom:0;padding-bottom:0;margin:0 0 14px}
.aps-ba-year-badge{border-radius:999px;padding:6px 13px;font-size:12px;background:#e8f2fa;color:#0170b9}
.aps-ba-grid{grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:16px}
@media (max-width:1500px){.aps-ba-grid{grid-template-columns:repeat(auto-fill,minmax(190px,1fr))}}
@media (max-width:1200px){.aps-ba-grid{grid-template-columns:repeat(auto-fill,minmax(180px,1fr))}}
.aps-ba-card{border-radius:14px;border:1px solid #e2e8f0;box-shadow:0 1px 3px rgba(15,23,42,.06);content-visibility:auto;contain-intrinsic-size:auto 280px}
.aps-ba-card:hover{border-color:#0170b9;box-shadow:0 10px 28px rgba(15,23,42,.10)}
.aps-ba-card-img{background:#fff;border-bottom:1px solid #edf2f7;padding:16px}
.aps-ba-card-body{padding:12px 14px 6px;gap:4px}
.aps-ba-card-title{-webkit-line-clamp:3;font:700 14px/1.35 system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;margin:0}
.aps-ba-card-link{font:700 13px system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;color:#0170b9;background:transparent;border-top:0;text-align:left;padding:2px 14px 14px}
.aps-ba-card:hover .aps-ba-card-link{background:transparent}
.aps-ba-empty{border-radius:14px}
@media (max-width:767px){.aps-ba-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.aps-ba-main-title{font-size:26px}}
