/**
 * Product Ads - Product Collection Layouts
 * Content Bridge Plugin
 *
 * 12 IAB layouts ported from B2B live-preview
 * BEM naming: .cb-pad (product ad)
 */

/* === CSS Custom Properties === */
.cb-pad {
    --cb-pad-brand-color: #D32F2F;
    --cb-pad-brand-secondary: #D32F2F;
    --cb-pad-cta-color: #D32F2F;
    --cb-pad-cta-hover: #b71c1c;
    --cb-pad-radius: 8px;
    --cb-pad-gap: 12px;
    --cb-pad-card-bg: #fff;
    --cb-pad-text: #333;
    --cb-pad-text-secondary: #666;
    --cb-pad-border: #e0e0e0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
    box-sizing: border-box;
    margin: 5px 0;
    border: 1px solid var(--cb-pad-border);
    border-radius: var(--cb-pad-radius);
    overflow: hidden;
}

.cb-pad *,
.cb-pad *::before,
.cb-pad *::after {
    box-sizing: border-box;
}

/* Override layout-level border:none AND theme custom.css overrides */
.cb-pad[class*="cb-pad--"] {
    border: 1px solid var(--cb-pad-border) !important;
    border-radius: var(--cb-pad-radius) !important;
}

/* === DISCLOSURE LABEL === */
.cb-pad__label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
}

/* === BRAND PANEL === */
.cb-pad__brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px;
    text-align: center;
}

.cb-pad__brand-logo {
    object-fit: contain;
    border-radius: 0;
}

.cb-pad__brand-name {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--cb-pad-brand-color, #333);
}

/* === TOPBAR (for rectangle/skyscraper/half-page layouts) === */
.cb-pad__topbar {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cb-pad__topbar img {
    object-fit: contain;
}

/* === PRODUCT CARD === */
.cb-pad__card {
    position: relative !important;
    background: var(--cb-pad-card-bg);
    border: none;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--cb-pad-text);
}

.cb-pad__card:hover {
    border: 1px solid var(--cb-pad-cta-color) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}

.cb-pad__card.cb-pad__card--active {
    border: 1px solid var(--cb-pad-cta-color) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10) !important;
}

.cb-pad__card:visited {
    color: var(--cb-pad-text);
}

/* === PRODUCT IMAGE === */
.cb-pad__image-wrap {
    position: relative;
    overflow: hidden;
    background: transparent;
}

.cb-pad__image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
}

/* === DISCOUNT BADGE === */
.cb-pad__discount {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--cb-pad-cta-color);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 3px;
    line-height: 1;
    z-index: 2;
}

/* === PRODUCT INFO === */
.cb-pad__info {
    padding: 6px 8px 8px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 2px;
}

.cb-pad__name {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--cb-pad-text);
    margin: 0;
}

/* === PRICE === */
.cb-pad__price-wrap {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-top: auto;
}

.cb-pad__price {
    font-size: 13px;
    font-weight: 400;
    color: var(--cb-pad-cta-color);
}

.cb-pad__old-price {
    font-size: 10px;
    color: #999;
    text-decoration: line-through;
}

/* === CTA BUTTON === */
.cb-pad__cta {
    display: block;
    text-align: center;
    background: var(--cb-pad-cta-color);
    color: #fff !important;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 5px 8px;
    border-radius: 4px;
    text-decoration: none;
    margin-top: 4px;
    transition: opacity 0.2s;
}

.cb-pad__cta:hover {
    background: var(--cb-pad-cta-hover);
    text-decoration: none;
    color: #fff !important;
}

/* ============================================================
   LAYOUT 1: HORIZONTAL (728 x auto)
   Brand panel left + 4 product cards in row
   ============================================================ */
.cb-pad--horizontal {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 0;
    background: transparent;
    position: relative;
}

.cb-pad--horizontal .cb-pad__label {
    position: absolute;
    top: 2px;
    left: 4px;
    font-size: 8px;
    z-index: 3;
}

.cb-pad--horizontal .cb-pad__brand {
    width: 80px;
    min-width: 80px;
    padding: 6px;
}

.cb-pad--horizontal .cb-pad__brand-logo {
    width: 64px;
    height: 64px;
}

.cb-pad--horizontal .cb-pad__cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 0 5px 0 0;
    align-content: start;
}

.cb-pad--horizontal .cb-pad__info {
    align-items: center;
    text-align: center;
}

.cb-pad--horizontal .cb-pad__name {
    text-align: center;
}

.cb-pad--horizontal .cb-pad__price-wrap {
    justify-content: center;
}

/* ============================================================
   LAYOUT 2: LEADERBOARD (728 x 90)
   Compact strip with brand + 3 products in row
   ============================================================ */
.cb-pad--leaderboard {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 0;
    height: 90px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: visible;
    position: relative;
}

.cb-pad--leaderboard .cb-pad__label {
    position: absolute;
    top: 2px;
    left: 4px;
    font-size: 7px;
    z-index: 3;
}

.cb-pad--leaderboard .cb-pad__brand {
    padding: 6px;
    width: 70px;
    border-right: 1px solid #e0e0e0;
}

.cb-pad--leaderboard .cb-pad__brand-logo {
    width: 48px;
    height: 48px;
}

.cb-pad--leaderboard .cb-pad__cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
}

.cb-pad--leaderboard .cb-pad__card {
    border: 1px solid transparent;
    border-radius: 4px;
    border-right: 1px solid #f0f0f0;
    flex-direction: row;
    align-items: center;
    padding: 5px 9px;
    gap: 8px;
    margin: 3px 0;
}

.cb-pad--leaderboard .cb-pad__card:last-child {
    border-right: 1px solid transparent;
}

.cb-pad--leaderboard .cb-pad__image-wrap {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 4px;
}

.cb-pad--leaderboard .cb-pad__info {
    padding: 0;
    gap: 1px;
}

.cb-pad--leaderboard .cb-pad__name {
    font-size: 10px;
    -webkit-line-clamp: 1;
}

.cb-pad--leaderboard .cb-pad__price {
    font-size: 12px;
}

.cb-pad--leaderboard .cb-pad__cta {
    font-size: 8px;
    padding: 3px 6px;
    margin-top: 2px;
    display: inline-block;
}

/* ============================================================
   LAYOUT 3: BILLBOARD (970 x 250)
   Wide banner with brand + 5 products
   ============================================================ */
.cb-pad--billboard {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 0;
    height: 250px;
    background: #fff;
    border: none;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.cb-pad--billboard .cb-pad__label {
    position: absolute;
    top: 2px;
    left: 4px;
    font-size: 8px;
    z-index: 3;
}

.cb-pad--billboard .cb-pad__brand {
    width: 100px;
    border-right: 1px solid #f0f0f0;
    padding: 8px;
}

.cb-pad--billboard .cb-pad__brand-logo {
    width: 72px;
    height: 72px;
}

.cb-pad--billboard .cb-pad__cards {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    padding: 4px 6px;
    align-content: start;
}

.cb-pad--billboard .cb-pad__image-wrap {
    aspect-ratio: 1;
}

.cb-pad--billboard .cb-pad__info {
    padding: 2px 6px 4px;
    gap: 2px;
    align-items: center;
    text-align: center;
}

.cb-pad--billboard .cb-pad__name {
    font-size: 10px;
    -webkit-line-clamp: 2;
    text-align: center;
}

.cb-pad--billboard .cb-pad__price {
    font-size: 12px;
}

.cb-pad--billboard .cb-pad__price-wrap {
    justify-content: center;
}

.cb-pad--billboard .cb-pad__cta {
    font-size: 9px;
    padding: 4px 6px;
}

/* ============================================================
   LAYOUT 4: MEDIUM RECTANGLE (300 x 250) — overlay on hover
   ============================================================ */
.cb-pad--medium-rect {
    width: 300px;
    height: 250px;
    background: #fff;
    border: none;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

.cb-pad--medium-rect .cb-pad__label {
    position: absolute;
    top: 2px;
    right: 6px;
    font-size: 7px;
    z-index: 3;
}

.cb-pad--medium-rect .cb-pad__topbar {
    padding: 4px 12px;
    border-bottom: 1px solid #f0f0f0;
}

.cb-pad--medium-rect .cb-pad__topbar img {
    height: auto;
    width: 90%;
    max-height: 32px;
}

.cb-pad--medium-rect .cb-pad__cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 4px;
    padding: 4px;
    flex: 1;
    min-height: 0;
}

.cb-pad--medium-rect .cb-pad__card {
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    min-height: 0;
    overflow: hidden;
}

.cb-pad--medium-rect .cb-pad__image-wrap {
    flex: 1;
    min-height: 0;
}

.cb-pad--medium-rect .cb-pad__image {
    padding: 4px;
    transition: transform 0.35s ease;
}

.cb-pad--medium-rect .cb-pad__card:hover .cb-pad__image {
    transform: none;
}

.cb-pad--medium-rect .cb-pad__info {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
    gap: 5px;
    flex: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.cb-pad--medium-rect .cb-pad__card:hover .cb-pad__info {
    opacity: 1;
}

.cb-pad--medium-rect .cb-pad__name {
    font-size: 12px;
    font-weight: 400;
    -webkit-line-clamp: 2;
    color: #fff;
    text-align: center;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.cb-pad--medium-rect .cb-pad__price-wrap {
    margin-top: 0;
    justify-content: center;
}

.cb-pad--medium-rect .cb-pad__price {
    font-size: 12px;
    color: #fff;
    font-weight: 400;
    background: var(--cb-pad-cta-color);
    padding: 2px 10px;
    border-radius: 3px;
    text-shadow: none;
    text-align: center;
}

.cb-pad--medium-rect .cb-pad__cta {
    display: inline-block;
    background: var(--cb-pad-cta-color);
    color: #fff !important;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 5px 17px;
    border-radius: 3px;
    text-decoration: none;
    margin-top: 0;
}

/* ============================================================
   LAYOUT 5: LARGE RECTANGLE (336 x 280) — overlay on hover
   ============================================================ */
.cb-pad--large-rect {
    width: 336px;
    height: 280px;
    background: #fff;
    border: none;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

.cb-pad--large-rect .cb-pad__label {
    position: absolute;
    top: 2px;
    right: 6px;
    font-size: 7px;
    z-index: 3;
}

.cb-pad--large-rect .cb-pad__topbar {
    padding: 4px 12px;
    border-bottom: 1px solid #f0f0f0;
}

.cb-pad--large-rect .cb-pad__topbar img {
    height: auto;
    width: 90%;
    max-height: 36px;
}

.cb-pad--large-rect .cb-pad__cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 6px;
    padding: 6px;
    flex: 1;
    min-height: 0;
}

.cb-pad--large-rect .cb-pad__card {
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    min-height: 0;
    overflow: hidden;
}

.cb-pad--large-rect .cb-pad__image-wrap {
    flex: 1;
    min-height: 0;
}

.cb-pad--large-rect .cb-pad__image {
    padding: 4px;
    transition: transform 0.35s ease;
}

.cb-pad--large-rect .cb-pad__card:hover .cb-pad__image {
    transform: none;
}

.cb-pad--large-rect .cb-pad__info {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
    gap: 5px;
    flex: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.cb-pad--large-rect .cb-pad__card:hover .cb-pad__info {
    opacity: 1;
}

.cb-pad--large-rect .cb-pad__name {
    font-size: 13px;
    font-weight: 400;
    -webkit-line-clamp: 2;
    color: #fff;
    text-align: center;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.cb-pad--large-rect .cb-pad__price-wrap {
    margin-top: 0;
    justify-content: center;
}

.cb-pad--large-rect .cb-pad__price {
    font-size: 13px;
    color: #fff;
    font-weight: 400;
    background: var(--cb-pad-cta-color);
    padding: 2px 10px;
    border-radius: 3px;
    text-shadow: none;
    text-align: center;
}

.cb-pad--large-rect .cb-pad__cta {
    display: inline-block;
    background: var(--cb-pad-cta-color);
    color: #fff !important;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 5px 19px;
    border-radius: 3px;
    text-decoration: none;
    margin-top: 0;
}

/* ============================================================
   LAYOUT 6: WIDE SKYSCRAPER (160 x 600) — overlay on hover
   ============================================================ */
.cb-pad--skyscraper {
    width: 160px;
    height: 600px;
    background: #fff;
    border: none;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

.cb-pad--skyscraper .cb-pad__label {
    position: absolute;
    top: 2px;
    right: 4px;
    font-size: 7px;
    z-index: 3;
}

.cb-pad--skyscraper .cb-pad__topbar {
    flex-direction: column;
    padding: 6px;
    border-bottom: 1px solid #f0f0f0;
}

.cb-pad--skyscraper .cb-pad__topbar img {
    height: auto;
    width: 92%;
    max-height: 44px;
}

.cb-pad--skyscraper .cb-pad__cards {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 6px;
    flex: 1;
}

.cb-pad--skyscraper .cb-pad__card {
    flex: 1;
    position: relative;
    cursor: pointer;
    min-height: 0;
    overflow: hidden;
}

.cb-pad--skyscraper .cb-pad__image-wrap {
    flex: 1;
    min-height: 0;
}

.cb-pad--skyscraper .cb-pad__image {
    padding: 4px;
    transition: transform 0.35s ease;
}

.cb-pad--skyscraper .cb-pad__card:hover .cb-pad__image {
    transform: none;
}

.cb-pad--skyscraper .cb-pad__info {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
    gap: 5px;
    flex: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.cb-pad--skyscraper .cb-pad__card:hover .cb-pad__info {
    opacity: 1;
}

.cb-pad--skyscraper .cb-pad__name {
    font-size: 11px;
    font-weight: 400;
    -webkit-line-clamp: 2;
    color: #fff;
    text-align: center;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.cb-pad--skyscraper .cb-pad__price-wrap {
    margin-top: 0;
    justify-content: center;
}

.cb-pad--skyscraper .cb-pad__price {
    font-size: 12px;
    color: #fff;
    font-weight: 400;
    background: var(--cb-pad-cta-color);
    padding: 2px 8px;
    border-radius: 3px;
    text-shadow: none;
    text-align: center;
}

.cb-pad--skyscraper .cb-pad__cta {
    display: inline-block;
    background: var(--cb-pad-cta-color);
    color: #fff !important;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    border-radius: 3px;
    text-decoration: none;
    margin-top: 0;
}

/* ============================================================
   LAYOUT 7: HALF PAGE (300 x 600)
   ============================================================ */
.cb-pad--half-page {
    width: 300px;
    height: 600px;
    background: #fff;
    border: none;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

.cb-pad--half-page .cb-pad__label {
    position: absolute;
    top: 2px;
    right: 6px;
    font-size: 7px;
    z-index: 3;
}

.cb-pad--half-page .cb-pad__topbar {
    padding: 6px 12px;
    border-bottom: 1px solid #f0f0f0;
}

.cb-pad--half-page .cb-pad__topbar img {
    height: auto;
    width: 90%;
    max-height: 40px;
}

.cb-pad--half-page .cb-pad__cards {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 6px;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.cb-pad--half-page .cb-pad__card {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.cb-pad--half-page .cb-pad__image-wrap {
    flex: 1;
    min-height: 0;
}

.cb-pad--half-page .cb-pad__image {
    padding: 4px;
    object-fit: contain;
}

.cb-pad--half-page .cb-pad__info {
    padding: 2px 6px 3px;
    gap: 0;
    align-items: center;
    text-align: center;
    flex: none;
}

.cb-pad--half-page .cb-pad__name {
    font-size: 11px;
    -webkit-line-clamp: 1;
    text-align: center;
    margin-bottom: 1px;
}

.cb-pad--half-page .cb-pad__price {
    font-size: 13px;
}

.cb-pad--half-page .cb-pad__price-wrap {
    justify-content: center;
    margin-top: 0;
}

.cb-pad--half-page .cb-pad__cta {
    font-size: 9px;
    padding: 3px 10px;
    display: inline-block;
    margin-top: 1px;
}

/* ============================================================
   LAYOUT 8: MOBILE BANNER (320 x 100) — overlay on hover
   ============================================================ */
.cb-pad--mobile {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 0;
    width: 320px;
    height: 100px;
    background: #fff;
    border: none;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.cb-pad--mobile .cb-pad__label {
    position: absolute;
    top: 1px;
    left: 3px;
    font-size: 6px;
    z-index: 3;
}

.cb-pad--mobile .cb-pad__brand {
    width: 56px;
    border-right: 1px solid #f0f0f0;
    padding: 4px;
}

.cb-pad--mobile .cb-pad__brand-logo {
    width: 40px;
    height: 40px;
}

.cb-pad--mobile .cb-pad__cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
    gap: 0;
    min-height: 0;
    overflow: hidden;
}

.cb-pad--mobile .cb-pad__card {
    border: 1px solid transparent;
    border-radius: 4px;
    border-right: 1px solid #f0f0f0;
    flex-direction: column;
    position: relative;
    padding: 0;
    margin: 2px;
}

.cb-pad--mobile .cb-pad__card:last-child {
    border-right: 1px solid transparent;
}

.cb-pad--mobile .cb-pad__image-wrap {
    flex: 1;
    min-height: 0;
}

.cb-pad--mobile .cb-pad__image {
    padding: 6px;
    transition: transform 0.35s ease;
}

.cb-pad--mobile .cb-pad__card:hover .cb-pad__image {
    transform: none;
}

.cb-pad--mobile .cb-pad__info {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
    gap: 3px;
    flex: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.cb-pad--mobile .cb-pad__card:hover .cb-pad__info {
    opacity: 1;
}

.cb-pad--mobile .cb-pad__name {
    font-size: 11px;
    font-weight: 400;
    -webkit-line-clamp: 1;
    color: #fff;
    text-align: center;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.cb-pad--mobile .cb-pad__price-wrap {
    margin-top: 0;
    justify-content: center;
}

.cb-pad--mobile .cb-pad__price {
    font-size: 11px;
    color: #fff;
    font-weight: 400;
    background: var(--cb-pad-cta-color);
    padding: 2px 8px;
    border-radius: 3px;
    text-shadow: none;
    text-align: center;
}

.cb-pad--mobile .cb-pad__cta {
    display: inline-block;
    background: var(--cb-pad-cta-color);
    color: #fff !important;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 12px;
    border-radius: 3px;
    text-decoration: none;
    margin-top: 0;
}

/* ============================================================
   LAYOUT 9: NATIVE INLINE (auto x ~80)
   ============================================================ */
.cb-pad--native {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #fff;
    border: none;
    border-radius: 6px;
    position: relative;
}

.cb-pad--native .cb-pad__label {
    position: absolute;
    top: 2px;
    right: 8px;
    font-size: 7px;
}

.cb-pad--native .cb-pad__brand {
    padding: 0;
    flex-shrink: 0;
}

.cb-pad--native .cb-pad__brand-logo {
    width: 36px;
    height: 36px;
}

.cb-pad--native .cb-pad__card {
    border: none;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    flex: 1;
    background: transparent;
}

.cb-pad--native .cb-pad__card:hover {
    /* no hover effect */
}

.cb-pad--native .cb-pad__image-wrap {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 4px;
    border: 1px solid #f0f0f0;
}

.cb-pad--native .cb-pad__info {
    padding: 0;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.cb-pad--native .cb-pad__name {
    font-size: 12px;
    flex: 1;
    -webkit-line-clamp: 1;
}

.cb-pad--native .cb-pad__price {
    font-size: 14px;
    white-space: nowrap;
}

.cb-pad--native .cb-pad__cta {
    font-size: 10px;
    padding: 6px 14px;
    margin-top: 0;
    white-space: nowrap;
}

/* ============================================================
   LAYOUT 10: LARGE LEADERBOARD (970 x 90) — overlay on hover
   ============================================================ */
.cb-pad--large-leaderboard {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 0;
    height: 90px;
    background: #fff;
    border: none;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.cb-pad--large-leaderboard .cb-pad__label {
    position: absolute;
    top: 2px;
    left: 4px;
    font-size: 7px;
    z-index: 3;
}

.cb-pad--large-leaderboard .cb-pad__brand {
    padding: 6px;
    width: 80px;
    border-right: 1px solid #e0e0e0;
}

.cb-pad--large-leaderboard .cb-pad__brand-logo {
    width: 56px;
    height: 56px;
}

.cb-pad--large-leaderboard .cb-pad__cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: 1fr;
    gap: 4px;
    padding: 4px;
    height: 100%;
    overflow: hidden;
}

.cb-pad--large-leaderboard .cb-pad__card {
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border: 1px solid #e8e8e8;
    min-height: 0;
}

.cb-pad--large-leaderboard .cb-pad__image-wrap {
    flex: 1;
    min-height: 0;
}

.cb-pad--large-leaderboard .cb-pad__image {
    padding: 4px;
    transition: transform 0.35s ease;
}

.cb-pad--large-leaderboard .cb-pad__card:hover .cb-pad__image {
    transform: none;
}

.cb-pad--large-leaderboard .cb-pad__info {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    gap: 3px;
    flex: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.cb-pad--large-leaderboard .cb-pad__card:hover .cb-pad__info {
    opacity: 1;
}

.cb-pad--large-leaderboard .cb-pad__name {
    font-size: 10px;
    font-weight: 400;
    -webkit-line-clamp: 1;
    color: #fff;
    text-align: center;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.cb-pad--large-leaderboard .cb-pad__price-wrap {
    margin-top: 0;
    justify-content: center;
}

.cb-pad--large-leaderboard .cb-pad__price {
    font-size: 11px;
    color: #fff;
    font-weight: 400;
    background: var(--cb-pad-cta-color);
    padding: 2px 8px;
    border-radius: 3px;
    text-shadow: none;
    text-align: center;
}

.cb-pad--large-leaderboard .cb-pad__cta {
    display: inline-block;
    background: var(--cb-pad-cta-color);
    color: #fff !important;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 10px;
    border-radius: 3px;
    text-decoration: none;
    margin-top: 0;
}

/* ============================================================
   LAYOUT 11: INLINE ARTICLE (580 x auto)
   ============================================================ */
.cb-pad--inline-article {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 0;
    max-width: 580px;
    background: #fff;
    border: none;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.cb-pad--inline-article .cb-pad__label {
    position: absolute;
    top: 2px;
    left: 4px;
    font-size: 8px;
    z-index: 3;
}

.cb-pad--inline-article .cb-pad__brand {
    width: 70px;
    min-width: 70px;
    padding: 6px;
    border-right: 1px solid #f0f0f0;
}

.cb-pad--inline-article .cb-pad__brand-logo {
    width: 52px;
    height: 52px;
}

.cb-pad--inline-article .cb-pad__cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 8px;
    align-content: start;
}

.cb-pad--inline-article .cb-pad__image-wrap {
    aspect-ratio: 1;
}

.cb-pad--inline-article .cb-pad__info {
    align-items: center;
    text-align: center;
}

.cb-pad--inline-article .cb-pad__name {
    text-align: center;
    font-size: 10px;
}

.cb-pad--inline-article .cb-pad__price-wrap {
    justify-content: center;
}

.cb-pad--inline-article .cb-pad__cta {
    font-size: 9px;
    padding: 4px 6px;
}

/* ============================================================
   LAYOUT 12: STICKY FOOTER (320 x 50) — overlay on hover
   ============================================================ */
.cb-pad--sticky-footer {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 0;
    width: 320px;
    height: 50px;
    background: #fff;
    border: none;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.cb-pad--sticky-footer .cb-pad__label {
    position: absolute;
    top: 1px;
    left: 2px;
    font-size: 5px;
    z-index: 3;
}

.cb-pad--sticky-footer .cb-pad__brand {
    padding: 2px;
    width: 40px;
    border-right: 1px solid #e0e0e0;
}

.cb-pad--sticky-footer .cb-pad__brand-logo {
    width: 30px;
    height: 30px;
}

.cb-pad--sticky-footer .cb-pad__cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: 1fr;
    gap: 3px;
    padding: 3px;
    height: 100%;
    overflow: hidden;
}

.cb-pad--sticky-footer .cb-pad__card {
    border-radius: 3px;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border: 1px solid #e8e8e8;
    min-height: 0;
}

.cb-pad--sticky-footer .cb-pad__image-wrap {
    flex: 1;
    min-height: 0;
}

.cb-pad--sticky-footer .cb-pad__image {
    padding: 2px;
    transition: transform 0.35s ease;
}

.cb-pad--sticky-footer .cb-pad__card:hover .cb-pad__image {
    transform: none;
}

.cb-pad--sticky-footer .cb-pad__info {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    gap: 2px;
    flex: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.cb-pad--sticky-footer .cb-pad__card:hover .cb-pad__info {
    opacity: 1;
}

.cb-pad--sticky-footer .cb-pad__name {
    font-size: 8px;
    font-weight: 400;
    -webkit-line-clamp: 1;
    color: #fff;
    text-align: center;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.cb-pad--sticky-footer .cb-pad__price-wrap {
    margin-top: 0;
    justify-content: center;
}

.cb-pad--sticky-footer .cb-pad__price {
    font-size: 9px;
    color: #fff;
    font-weight: 400;
    background: var(--cb-pad-cta-color);
    padding: 1px 5px;
    border-radius: 2px;
    text-shadow: none;
    text-align: center;
}

.cb-pad--sticky-footer .cb-pad__cta {
    display: inline-block;
    background: var(--cb-pad-cta-color);
    color: #fff !important;
    font-size: 7px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    border-radius: 2px;
    text-decoration: none;
    margin-top: 0;
}

/* ============================================================
   LAYOUT 13: SHOWCASE (1196 x 280)
   Wide panoramic banner with brand + 6 products
   ============================================================ */
.cb-pad--showcase {
    display: grid;
    grid-template-columns: 174px 1fr;
    gap: 0;
    max-width: 1196px;
    height: 280px;
    background: #fff;
    border: none;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.cb-pad--showcase .cb-pad__label {
    position: absolute;
    top: 2px;
    left: 4px;
    font-size: 8px;
    z-index: 3;
}

.cb-pad--showcase .cb-pad__brand {
    width: 174px;
    border-right: 1px solid #f0f0f0;
    padding: 12px;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.cb-pad--showcase .cb-pad__brand-logo {
    width: 148px;
    height: 148px;
    object-fit: contain;
    margin: auto;
}

.cb-pad--showcase .cb-pad__brand-name {
    font-size: 11px;
    font-weight: 700;
    color: var(--cb-pad-brand-color);
    margin-top: 4px;
    flex-shrink: 0;
}

.cb-pad--showcase .cb-pad__cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    grid-template-rows: 1fr;
    gap: 0;
    padding: 0;
    align-content: stretch;
    height: 100%;
    overflow: hidden;
}

.cb-pad--showcase .cb-pad__card {
    border: none;
    border-right: 1px solid #f5f5f5;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.cb-pad--showcase .cb-pad__card:last-child {
    border-right: none;
}

.cb-pad--showcase .cb-pad__card:hover {
    border: none !important;
    box-shadow: inset 0 0 0 2px var(--cb-pad-cta-color) !important;
}

.cb-pad--showcase .cb-pad__card.cb-pad__card--active {
    border: none !important;
    box-shadow: inset 0 0 0 2px var(--cb-pad-cta-color) !important;
}

.cb-pad--showcase .cb-pad__image-wrap {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
.cb-pad--showcase .cb-pad__image-wrap .cb-pad__image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cb-pad--showcase .cb-pad__info {
    padding: 4px 8px 6px;
    gap: 2px;
    align-items: center;
    text-align: center;
    flex: 1;
    justify-content: center;
}

.cb-pad--showcase .cb-pad__name {
    font-size: 10px;
    -webkit-line-clamp: 2;
    text-align: center;
}

.cb-pad--showcase .cb-pad__price {
    font-size: 12px;
}

.cb-pad--showcase .cb-pad__price-wrap {
    justify-content: center;
}

.cb-pad--showcase .cb-pad__cta {
    font-size: 9px;
    padding: 4px 8px;
}

@media (max-width: 768px) {
    .cb-pad--showcase {
        grid-template-columns: 1fr;
        height: auto;
        max-width: 100%;
    }
    .cb-pad--showcase .cb-pad__brand {
        width: 100%;
        flex-direction: row;
        justify-content: flex-start;
        border-right: none;
        border-bottom: 1px solid #f0f0f0;
        padding: 8px 12px;
    }
    .cb-pad--showcase .cb-pad__brand-logo {
        width: 40px;
        height: 40px;
    }
    .cb-pad--showcase .cb-pad__cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .cb-pad--showcase .cb-pad__cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================================
   LEGACY LAYOUTS (kept for auto-inject backward compatibility)
   ============================================================ */

/* Vertical Grid — legacy 300px sidebar (1 featured + 2x2 grid) */
.cb-pad--vertical-grid {
    width: 300px;
    max-width: 100%;
    border: 1px solid var(--cb-pad-border);
    border-radius: var(--cb-pad-radius);
    overflow: hidden;
    background: var(--cb-pad-card-bg);
}

.cb-pad--vertical-grid .cb-pad__featured {
    border: none;
    border-bottom: 1px solid var(--cb-pad-border);
    border-radius: 0;
}

.cb-pad--vertical-grid .cb-pad__featured .cb-pad__image-wrap {
    aspect-ratio: 4 / 3;
}

.cb-pad--vertical-grid .cb-pad__featured .cb-pad__name {
    font-size: 14px;
}

.cb-pad--vertical-grid .cb-pad__featured .cb-pad__price {
    font-size: 18px;
}

.cb-pad--vertical-grid .cb-pad__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--cb-pad-border);
}

.cb-pad--vertical-grid .cb-pad__grid .cb-pad__card {
    border: none;
    border-radius: 0;
    background: var(--cb-pad-card-bg);
}

.cb-pad--vertical-grid .cb-pad__grid .cb-pad__image-wrap {
    aspect-ratio: 1;
}

.cb-pad--vertical-grid .cb-pad__grid .cb-pad__name {
    font-size: 11px;
    -webkit-line-clamp: 1;
}

.cb-pad--vertical-grid .cb-pad__grid .cb-pad__price {
    font-size: 13px;
}

.cb-pad--vertical-grid .cb-pad__grid .cb-pad__cta {
    font-size: 10px;
    padding: 5px 8px;
}

.cb-pad--vertical-grid .cb-pad__brand {
    border-radius: 0;
    padding: 12px;
    flex-direction: row;
    gap: 10px;
}

.cb-pad--vertical-grid .cb-pad__brand-logo {
    max-width: 40px;
    max-height: 30px;
    margin-bottom: 0;
}

/* Vertical Stack — legacy 300px stacked list */
.cb-pad--vertical-stack {
    width: 300px;
    max-width: 100%;
    border: 1px solid var(--cb-pad-border);
    border-radius: var(--cb-pad-radius);
    overflow: hidden;
    background: var(--cb-pad-card-bg);
}

.cb-pad--vertical-stack .cb-pad__stack {
    display: flex;
    flex-direction: column;
}

.cb-pad--vertical-stack .cb-pad__card {
    border: none;
    border-bottom: 1px solid var(--cb-pad-border);
    border-radius: 0;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
}

.cb-pad--vertical-stack .cb-pad__card:last-child {
    border-bottom: none;
}

.cb-pad--vertical-stack .cb-pad__image-wrap {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
    aspect-ratio: auto;
    border-radius: 6px;
}

.cb-pad--vertical-stack .cb-pad__info {
    padding: 0;
    flex: 1;
    min-width: 0;
}

.cb-pad--vertical-stack .cb-pad__name {
    font-size: 12px;
    -webkit-line-clamp: 2;
}

.cb-pad--vertical-stack .cb-pad__price {
    font-size: 14px;
}

.cb-pad--vertical-stack .cb-pad__cta {
    font-size: 10px;
    padding: 5px 10px;
    margin-top: 4px;
    display: inline-block;
}

.cb-pad--vertical-stack .cb-pad__brand {
    border-radius: 0;
    padding: 10px 12px;
    flex-direction: row;
    gap: 10px;
}

.cb-pad--vertical-stack .cb-pad__brand-logo {
    max-width: 40px;
    max-height: 25px;
    margin-bottom: 0;
}

.cb-pad--vertical-stack .cb-pad__discount {
    top: 4px;
    right: 4px;
    font-size: 10px;
    padding: 2px 5px;
}

/* Compact Strip — legacy inline bar with 3 products */
.cb-pad--compact-strip {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--cb-pad-border);
    border-radius: var(--cb-pad-radius);
    overflow: hidden;
    background: var(--cb-pad-card-bg);
}

.cb-pad--compact-strip .cb-pad__strip-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    font-size: 10px;
    color: #999;
    border-bottom: 1px solid var(--cb-pad-border);
    background: #fafafa;
}

.cb-pad--compact-strip .cb-pad__strip-brand {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: var(--cb-pad-brand-color);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.cb-pad--compact-strip .cb-pad__strip-brand img {
    height: 16px;
    width: auto;
    object-fit: contain;
}

.cb-pad--compact-strip .cb-pad__cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
}

.cb-pad--compact-strip .cb-pad__card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: none;
    border-radius: 0;
    border-right: 1px solid var(--cb-pad-border);
}

.cb-pad--compact-strip .cb-pad__card:last-child {
    border-right: none;
}

.cb-pad--compact-strip .cb-pad__image-wrap {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    aspect-ratio: auto;
    border-radius: 6px;
    background: #f8f8f8;
}

.cb-pad--compact-strip .cb-pad__image {
    padding: 4px;
}

.cb-pad--compact-strip .cb-pad__info {
    padding: 0;
    flex: 1;
    min-width: 0;
    gap: 2px;
}

.cb-pad--compact-strip .cb-pad__name {
    font-size: 12px;
    font-weight: 600;
    -webkit-line-clamp: 1;
}

.cb-pad--compact-strip .cb-pad__price-wrap {
    gap: 4px;
}

.cb-pad--compact-strip .cb-pad__price {
    font-size: 13px;
}

.cb-pad--compact-strip .cb-pad__old-price {
    font-size: 10px;
}

.cb-pad--compact-strip .cb-pad__cta {
    display: inline-block;
    font-size: 10px;
    padding: 4px 10px;
    margin-top: 4px;
    border-radius: 3px;
}

.cb-pad--compact-strip .cb-pad__discount {
    top: 2px;
    right: 2px;
    font-size: 9px;
    padding: 1px 4px;
}

/* Compact Grid — legacy mini brand bar + 4 products */
.cb-pad--compact-grid {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--cb-pad-border);
    border-radius: var(--cb-pad-radius);
    overflow: hidden;
    background: var(--cb-pad-card-bg);
}

.cb-pad--compact-grid .cb-pad__mini-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: var(--cb-pad-brand-color);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.cb-pad--compact-grid .cb-pad__mini-brand img {
    height: 32px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
}

.cb-pad--compact-grid .cb-pad__cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--cb-pad-gap);
    padding: var(--cb-pad-gap);
}

.cb-pad--compact-grid .cb-pad__card {
    border: 2px solid var(--cb-pad-border);
    border-radius: 6px;
    box-shadow: none;
}

.cb-pad--compact-grid .cb-pad__card:hover {
    /* no hover effect */
}

.cb-pad--compact-grid .cb-pad__image-wrap {
    aspect-ratio: 1;
}

.cb-pad--compact-grid .cb-pad__image {
    padding: 6px;
}

.cb-pad--compact-grid .cb-pad__info {
    padding: 8px 10px 10px;
}

.cb-pad--compact-grid .cb-pad__name {
    font-size: 12px;
    -webkit-line-clamp: 2;
}

.cb-pad--compact-grid .cb-pad__price {
    font-size: 14px;
}

.cb-pad--compact-grid .cb-pad__old-price {
    font-size: 10px;
}

.cb-pad--compact-grid .cb-pad__cta {
    font-size: 11px;
    padding: 6px 10px;
    margin-top: 6px;
}

.cb-pad--compact-grid .cb-pad__discount {
    font-size: 10px;
    padding: 2px 6px;
}

/* ============================================================
   KREACJA WRAPPER — dimensional constraints per layout
   Applied via [cb_kreacje layout="..."] shortcode
   ============================================================ */

/* New IAB dimension-named layouts */
.cb-kreacja-layout-billboard_970 { max-width: 970px; }
.cb-kreacja-layout-leaderboard_728 { max-width: 728px; margin-left: auto; margin-right: auto; }
.cb-kreacja-layout-leaderboard_970 { max-width: 970px; }
.cb-kreacja-layout-rectangle_300 { max-width: 300px; }
.cb-kreacja-layout-rectangle_336 { max-width: 336px; }
.cb-kreacja-layout-skyscraper_160 { max-width: 160px; }
.cb-kreacja-layout-skyscraper_300 { max-width: 300px; }
.cb-kreacja-layout-halfpage_300 { max-width: 300px; }
.cb-kreacja-layout-mobile_320 { max-width: 320px; margin-left: auto; margin-right: auto; }
.cb-kreacja-layout-inline_580 { max-width: 580px; }
.cb-kreacja-layout-native_auto { max-width: 600px; }
.cb-kreacja-layout-sticky_320 { max-width: 320px; margin-left: auto; margin-right: auto; }
.cb-kreacja-layout-horizontal_728 { max-width: 728px; }

/* Backward compat — old layout names */
.cb-kreacja-layout-horizontal { max-width: 970px; }
.cb-kreacja-layout-compact_strip { max-width: 728px; margin-left: auto; margin-right: auto; }
.cb-kreacja-layout-compact_grid { max-width: 336px; }
.cb-kreacja-layout-vertical_grid { max-width: 300px; }
.cb-kreacja-layout-vertical_stack { max-width: 300px; }

/* Legacy compact_grid 2-column override at narrow widths */
.cb-kreacja-layout-rectangle_336 .cb-pad--compact-grid .cb-pad__cards,
.cb-kreacja-layout-compact_grid .cb-pad--compact-grid .cb-pad__cards {
    grid-template-columns: repeat(2, 1fr);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    /* Horizontal: collapse to single column */
    .cb-pad--horizontal {
        grid-template-columns: 1fr;
    }

    .cb-pad--horizontal .cb-pad__label {
        position: static;
        display: block;
        text-align: right;
        padding: 4px 8px 0;
    }

    .cb-pad--horizontal .cb-pad__brand {
        flex-direction: row;
        gap: 8px;
        padding: 8px 12px;
        width: auto;
        min-width: 0;
    }

    .cb-pad--horizontal .cb-pad__brand-logo {
        width: 32px;
        height: 32px;
    }

    .cb-pad--horizontal .cb-pad__cards {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Billboard: collapse brand panel */
    .cb-pad--billboard {
        grid-template-columns: 1fr;
        height: auto;
    }

    .cb-pad--billboard .cb-pad__brand {
        flex-direction: row;
        gap: 8px;
        padding: 8px 12px;
        width: auto;
        border-right: none;
        border-bottom: 1px solid #f0f0f0;
    }

    .cb-pad--billboard .cb-pad__brand-logo {
        width: 32px;
        height: 32px;
    }

    .cb-pad--billboard .cb-pad__cards {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Leaderboard: stack to vertical */
    .cb-pad--leaderboard {
        grid-template-columns: 1fr;
        height: auto;
    }

    .cb-pad--leaderboard .cb-pad__brand {
        flex-direction: row;
        gap: 8px;
        padding: 6px 12px;
        width: auto;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }

    .cb-pad--leaderboard .cb-pad__brand-logo {
        width: 28px;
        height: 28px;
    }

    .cb-pad--leaderboard .cb-pad__cards {
        grid-template-columns: 1fr;
    }

    .cb-pad--leaderboard .cb-pad__card {
        border-right: none;
        border-bottom: 1px solid #f0f0f0;
    }

    .cb-pad--leaderboard .cb-pad__card:last-child {
        border-bottom: none;
    }

    /* Large leaderboard: same as leaderboard on mobile */
    .cb-pad--large-leaderboard {
        grid-template-columns: 1fr;
        height: auto;
    }

    .cb-pad--large-leaderboard .cb-pad__brand {
        flex-direction: row;
        gap: 8px;
        padding: 6px 12px;
        width: auto;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }

    .cb-pad--large-leaderboard .cb-pad__brand-logo {
        width: 32px;
        height: 32px;
    }

    .cb-pad--large-leaderboard .cb-pad__cards {
        grid-template-columns: repeat(2, 1fr);
        height: auto;
    }

    .cb-pad--large-leaderboard .cb-pad__card {
        height: 120px;
    }

    /* Inline article: collapse */
    .cb-pad--inline-article {
        grid-template-columns: 1fr;
    }

    .cb-pad--inline-article .cb-pad__brand {
        flex-direction: row;
        gap: 8px;
        padding: 6px 12px;
        width: auto;
        min-width: 0;
        border-right: none;
        border-bottom: 1px solid #f0f0f0;
    }

    .cb-pad--inline-article .cb-pad__brand-logo {
        width: 28px;
        height: 28px;
    }

    .cb-pad--inline-article .cb-pad__cards {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Legacy layouts */
    .cb-pad--vertical-grid,
    .cb-pad--vertical-stack {
        width: 100%;
    }

    .cb-pad--compact-strip .cb-pad__cards {
        grid-template-columns: 1fr;
    }

    .cb-pad--compact-strip .cb-pad__card {
        border-right: none;
        border-bottom: 1px solid var(--cb-pad-border);
    }

    .cb-pad--compact-strip .cb-pad__card:last-child {
        border-bottom: none;
    }

    .cb-pad--compact-grid .cb-pad__cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .cb-pad--horizontal .cb-pad__cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 8px;
    }

    .cb-pad--billboard .cb-pad__cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .cb-pad--compact-grid .cb-pad__name {
        font-size: 11px;
    }
}
