/* SmartRibbons & Bank Promos CSS - Ultra High Performance (Zero CLS) */

.product-item .picture,
.product-details-page .gallery .picture {
    position: relative !important;
}

/* Base Corner Badge */
.smart-ribbon-badge {
    position: absolute;
    z-index: 10;
    pointer-events: none;
    font-family: inherit;
    font-weight: 700;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    user-select: none;
}

/* Positions */
.smart-ribbon-pos-top-left {
    top: 8px;
    left: 8px;
}

.smart-ribbon-pos-top-right {
    top: 8px;
    right: 8px;
}

.smart-ribbon-pos-bottom-left {
    bottom: 8px;
    left: 8px;
}

.smart-ribbon-pos-bottom-right {
    bottom: 8px;
    right: 8px;
}

/* Style: Modern Pill */
.smart-ribbon-style-pill {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    line-height: 1.2;
}

/* Style: Minimal Tag */
.smart-ribbon-style-minimal {
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

/* Style: Circular Burst */
.smart-ribbon-style-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 11px;
    padding: 2px;
    line-height: 1.1;
}

/* Style: Diagonal Corner Ribbon */
.smart-ribbon-diagonal-wrapper {
    position: absolute;
    top: 0;
    width: 85px;
    height: 85px;
    overflow: hidden;
    z-index: 10;
    pointer-events: none;
}

.smart-ribbon-diagonal-wrapper.smart-ribbon-pos-top-left {
    top: 0;
    left: 0;
}

.smart-ribbon-diagonal-wrapper.smart-ribbon-pos-top-right {
    top: 0;
    right: 0;
}

.smart-ribbon-diagonal-text {
    position: absolute;
    display: block;
    width: 120px;
    padding: 4px 0;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.smart-ribbon-pos-top-left .smart-ribbon-diagonal-text {
    left: -32px;
    top: 16px;
    transform: rotate(-45deg);
}

.smart-ribbon-pos-top-right .smart-ribbon-diagonal-text {
    right: -32px;
    top: 16px;
    transform: rotate(45deg);
}

.smart-ribbon-diagonal-wrapper.smart-ribbon-pos-bottom-left {
    top: auto;
    bottom: 0;
    left: 0;
}

.smart-ribbon-diagonal-wrapper.smart-ribbon-pos-bottom-right {
    top: auto;
    bottom: 0;
    right: 0;
}

.smart-ribbon-pos-bottom-left .smart-ribbon-diagonal-text {
    left: -32px;
    bottom: 16px;
    transform: rotate(45deg);
}

.smart-ribbon-pos-bottom-right .smart-ribbon-diagonal-text {
    right: -32px;
    bottom: 16px;
    transform: rotate(-45deg);
}

/* ---------- Corner ribbon "under the price" (a plain horizontal label, not the bank promo box) ---------- */
.smart-ribbon-under-price-wrap {
    display: block;
    width: 100%;
    margin: 6px 0;
}

.smart-ribbon-under-price {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    font-weight: 700;
    box-sizing: border-box;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    user-select: none;
}

/* ============================================================== */
/* Horizontal Bank Promotional Banner (Under Price)              */
/* ============================================================== */

.smart-ribbon-bank-promo-container {
    display: block;
    width: 100%;
    margin: 6px 0 10px 0;
    text-align: center;
}

.smart-ribbon-bank-promo {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    border-width: 1.5px;
    border-style: solid;
    border-radius: 6px;
    padding: 5px 10px;
    width: 100%;
    max-width: 280px;
    background-color: #ffffff;
    box-sizing: border-box;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    gap: 6px;
}

.smart-ribbon-bank-promo:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.smart-ribbon-bank-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    max-width: 140px;
    height: 26px;
}

.smart-ribbon-bank-logo svg {
    max-height: 24px;
    max-width: 140px;
    width: auto;
    height: auto;
    display: block;
}

.smart-ribbon-bank-price {
    font-size: 15px;
    font-weight: 800;
    margin: 0 auto;
    white-space: nowrap;
    line-height: 1;
}

.smart-ribbon-bank-badge {
    font-size: 11px;
    font-weight: 800;
    padding: 3px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.2;
}

/* Product Details Page Adjustments */
.product-details-page .smart-ribbon-bank-promo-container {
    text-align: left;
    margin: 10px 0 15px 0;
}

.product-details-page .smart-ribbon-bank-promo {
    max-width: 320px;
    padding: 7px 12px;
}

.product-details-page .smart-ribbon-bank-price {
    font-size: 17px;
}

.product-details-page .smart-ribbon-bank-badge {
    font-size: 12px;
    padding: 4px 8px;
}
