.product-associations-modal {
    --pa-bg: #ffffff;
    --pa-surface: #faf9f7;
    --pa-text: #1a1a1a;
    --pa-muted: #6f6f6f;
    --pa-border: #e5e5e5;
    --pa-switch-bg: #b9bba9;
    --pa-switch-active: #ffffff;
    --pa-switch-text: #1a1a1a;
    --pa-shadow: 0 24px 60px rgba(0, 0, 0, 0.14);
}

.product-associations-modal .modal-dialog {
    width: 90vw;
    max-width: 90vw !important;
    margin: 1.5rem auto;
    max-height: calc(100dvh - 3rem);
}

.product-associations-modal .modal-content {
    border: 0 !important;
    border-radius: 0 !important;
    background: var(--pa-bg) !important;
    box-shadow: var(--pa-shadow);
    display: flex;
    flex-direction: column;
    max-height: calc(100dvh - 3rem);
    overflow: hidden;
}

.product-associations-modal-header {
    padding: 32px 40px 16px !important;
}

.product-associations-modal .modal-title {
    font-size: 22px !important;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--pa-text) !important;
    font-weight: 600 !important;
}

.product-associations-modal-title-prefix::after {
    content: " ";
}

.product-associations-modal .btn-close {
    opacity: 1;
    width: 20px;
    height: 20px;
    margin: 0 0 0 auto;
    background-size: 20px;
    flex: 0 0 auto;
}

.product-associations-modal .btn-close:focus {
    box-shadow: none;
}

.product-associations-modal-body {
    padding: 0 40px 32px !important;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.product-associations-modal-layout {
    display: grid;
    grid-template-columns: minmax(0, 60%) minmax(0, 40%);
    gap: clamp(24px, 2.5vw, 40px);
    align-items: stretch;
    flex: 1 1 auto;
    height: min(680px, calc(100dvh - 150px));
    max-height: calc(100dvh - 150px);
    min-height: 0;
    overflow: hidden;
}

.product-associations-modal-left {
    display: flex;
    flex-direction: column;
    gap: 24px;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.product-associations-primary-image-wrapper {
    position: relative;
    width: 100%;
    min-height: 0;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
}

.product-associations-primary-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.product-associations-modal-right {
    min-width: 0;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.product-associations-mode-row {
    min-height: 44px;
    justify-content: flex-start;
    gap: 14px !important;
}

.product-associations-switch {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border-radius: 999px;
    background: var(--pa-switch-bg);
    min-width: 176px;
}

.product-associations-switch .btn {
    border: 0;
    border-radius: 999px;
    padding: 4px 18px;
    line-height: 1.2;
    font-size: 14px;
    font-weight: 500;
    color: var(--pa-switch-text);
    min-width: 0;
    flex: 1 1 0;
    text-align: center;
    transition: background 0.15s, color 0.15s;
}

.product-associations-switch .btn-check:checked + .btn {
    background: var(--pa-switch-active);
    color: var(--pa-text);
}

.product-associations-switch .btn-check:not(:checked) + .btn {
    background: transparent;
    color: var(--pa-switch-text);
}

.product-associations-switch .btn-check:disabled + .btn {
    opacity: 0.45;
    pointer-events: none;
}

.product-associations-list-title {
    margin-top: 18px;
    margin-bottom: 12px;
    font-size: 18px;
    line-height: 1.3;
    font-weight: 400;
    color: var(--pa-text);
}

.product-associations-list-shell {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.product-associations-list-shell::before,
.product-associations-list-shell::after {
    content: "";
    position: absolute;
    right: 0;
    left: 0;
    z-index: 2;
    height: 30px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 180ms cubic-bezier(0.23, 1, 0.32, 1);
}

.product-associations-list-shell::before {
    top: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.82) 0%, rgba(255, 255, 255, 0.38) 52%, rgba(255, 255, 255, 0) 100%);
}

.product-associations-list-shell::after {
    bottom: 0;
    background: linear-gradient(0deg, rgba(255, 255, 255, 0.82) 0%, rgba(255, 255, 255, 0.38) 52%, rgba(255, 255, 255, 0) 100%);
}

.product-associations-list-shell.is-scrollable:not(.is-at-top)::before {
    opacity: 0.86;
}

.product-associations-list-shell.is-scrollable:not(.is-at-bottom)::after {
    opacity: 0.86;
}

.product-associations-list {
    border-top: 0;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 12px;
    scrollbar-width: thin;
    scrollbar-color: var(--pa-border) transparent;
}

.product-associations-list::-webkit-scrollbar {
    width: 6px;
}

.product-associations-list::-webkit-scrollbar-track {
    background: transparent;
}

.product-associations-list::-webkit-scrollbar-thumb {
    background: var(--pa-border);
    border-radius: 3px;
}

.product-associations-list-row {
    display: grid;
    grid-template-columns: 32px 96px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 14px 12px;
    margin: 0 -12px;
    border-bottom: 1px solid var(--pa-border);
    transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.product-associations-list-row:last-child {
    border-bottom: 0;
}

.product-associations-list-row.is-unavailable {
    opacity: 0.55;
}

.product-associations-list-check {
    display: flex;
    justify-content: center;
    align-items: center;
    align-self: center;
}

.product-associations-list-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 24px !important;
    height: 24px !important;
    min-width: 24px;
    min-height: 24px;
    margin: 0 !important;
    border: 1px solid #000000 !important;
    border-radius: 50% !important;
    background: #fff;
    box-shadow: none !important;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
}

.product-associations-list-checkbox:checked {
    background-color: #fff !important;
    border-color: #000 !important;
    background-image: none !important;
}

.product-associations-list-checkbox:checked::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #000;
    transform: translate(-50%, -50%);
}

.product-associations-list-thumb {
    display: flex;
    width: 96px;
    min-width: 96px;
    height: 72px;
    overflow: hidden;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 0;
    background: transparent;
    animation: none;
}

.product-associations-list-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: opacity 0.3s ease;
    background: transparent;
}

.product-associations-list-content {
    min-width: 0;
}

/*
 * Shared product-line component used by:
 *   - association page composition cards (.pa-composition__body)
 *   - add-to-cart modal compatibility rows (.product-associations-list-content)
 * Per-context sizing/layout overrides live alongside the wrappers
 * (in product-association-composition.css for the association card).
 */
.pa-product-line__title {
    display: block;
    color: #1a1a1a;
    font-size: 14px;
    line-height: 1.35;
    text-decoration: none;
    font-weight: 400;
    margin-bottom: 6px;
}

.pa-product-line__title:hover {
    color: #1a1a1a;
    text-decoration: none;
}

.pa-product-line__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.pa-product-line__delay {
    font-size: 11px;
    line-height: 1.3;
    flex-shrink: 0;
}

.pa-product-line__reviews {
    white-space: nowrap;
    color: #131313;
    font-size: 11px;
    line-height: 1;
    flex-shrink: 0;
}

.pa-product-line__reviews i + i {
    margin-left: 2px;
}

.pa-product-line__reviews-count {
    margin-left: 4px;
    color: #777;
    font-size: 10px;
}

.pa-product-line__prices {
    margin-top: 0;
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}

.pa-product-line__price-current {
    font-size: 18px;
    line-height: 1.2;
    font-weight: 700;
    color: #1a1a1a;
}

.pa-product-line__price-old {
    color: #8b8b8b;
    font-size: 11px;
    line-height: 1;
    text-decoration: line-through;
}

.pa-product-line__discount {
    background: #000;
    color: #fff;
    font-size: 11px;
    line-height: 1;
    font-weight: 600;
    padding: 3px 6px;
    border-radius: 0;
}

.product-associations-summary {
    gap: 20px;
    flex: 0 0 auto;
}

.product-associations-summary-copy {
    min-width: 0;
}

.product-associations-summary-desktop {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.product-associations-main-footer-label {
    margin-bottom: 4px !important;
    font-size: 14px;
    line-height: 1.3;
    color: var(--pa-text);
}

.product-associations-main-footer-price {
    font-size: 28px;
    line-height: 1.1;
    color: var(--pa-text);
}

.product-associations-main-footer-cta {
    width: 67%;
    padding: 12px 24px;
    border-radius: 0;
    font-size: 16px;
    line-height: 1.2;
    background: #000 !important;
    border-color: #000 !important;
    color: #fff !important;
    min-width: 0;
    text-align: center;
}

.product-associations-modal .btn-dark.product-associations-main-footer-cta:disabled,
.product-associations-modal .btn-dark.product-associations-main-footer-cta[disabled] {
    pointer-events: auto !important;
    opacity: 0.65 !important;
    cursor: not-allowed !important;
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: #fff !important;
    box-shadow: none !important;
}

@media (max-width: 1199.98px) {
    .product-associations-modal .modal-dialog {
        width: 92vw;
        max-width: 92vw !important;
    }

    .product-associations-modal-header {
        padding: 28px 32px 14px !important;
    }

    .product-associations-modal-body {
        padding: 0 32px 28px !important;
    }
}

@media (max-width: 991.98px) {
    .product-associations-modal .modal-dialog {
        width: 94vw;
        max-width: 94vw !important;
        max-height: calc(100dvh - 2.5rem);
    }

    .product-associations-modal .modal-content {
        max-height: calc(100dvh - 2.5rem);
    }

    .product-associations-modal .modal-title {
        font-size: 20px !important;
    }

    .product-associations-modal-layout {
        grid-template-columns: minmax(0, 1fr) minmax(320px, 360px);
        gap: 24px;
        height: min(620px, calc(100dvh - 140px));
        max-height: calc(100dvh - 140px);
    }

    .product-associations-primary-image-wrapper {
        aspect-ratio: 1 / 1;
    }

    .product-associations-main-footer-price {
        font-size: 24px;
    }

    .product-associations-main-footer-cta {
        font-size: 15px;
    }
}

@media (max-height: 760px) and (min-width: 768px) {
    .product-associations-modal .modal-dialog {
        margin-top: 1rem;
        margin-bottom: 1rem;
        max-height: calc(100dvh - 2rem);
    }

    .product-associations-modal .modal-content {
        max-height: calc(100dvh - 2rem);
    }

    .product-associations-modal-header {
        padding-top: 22px !important;
        padding-bottom: 10px !important;
    }

    .product-associations-modal-body {
        padding-bottom: 22px !important;
    }

    .product-associations-modal-layout {
        height: calc(100dvh - 118px);
        max-height: calc(100dvh - 118px);
        gap: 22px;
    }

    .product-associations-modal-left {
        gap: 18px;
    }

    .product-associations-primary-image-wrapper {
        min-height: 120px;
    }

    .product-associations-list-title {
        margin-top: 12px;
        margin-bottom: 8px;
    }

    .product-associations-list-row {
        grid-template-columns: 28px 82px minmax(0, 1fr);
        gap: 12px;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .product-associations-list-thumb {
        width: 82px;
        min-width: 82px;
        height: 62px;
    }

    .product-associations-main-footer-price {
        font-size: 24px;
    }

    .product-associations-main-footer-cta {
        padding-top: 10px;
        padding-bottom: 10px;
    }
}

@media (max-height: 620px) and (min-width: 768px) {
    .product-associations-modal .modal-dialog {
        margin-top: 0.5rem;
        margin-bottom: 0.5rem;
        max-height: calc(100dvh - 1rem);
    }

    .product-associations-modal .modal-content {
        max-height: calc(100dvh - 1rem);
    }

    .product-associations-modal-header {
        padding-top: 16px !important;
        padding-bottom: 8px !important;
    }

    .product-associations-modal .modal-title {
        font-size: 18px !important;
    }

    .product-associations-modal-body {
        padding-bottom: 16px !important;
    }

    .product-associations-modal-layout {
        height: calc(100dvh - 88px);
        max-height: calc(100dvh - 88px);
        gap: 18px;
    }

    .product-associations-modal-left {
        gap: 14px;
    }

    .product-associations-mode-row {
        min-height: 36px;
    }

    .product-associations-list-title {
        font-size: 16px;
        margin-top: 8px;
    }

    .product-associations-main-footer-label {
        font-size: 13px;
    }

    .product-associations-main-footer-price {
        font-size: 21px;
    }
}

@media (max-width: 991.98px) {
    .product-associations-modal {
        padding: 0 !important;
    }

    .product-associations-modal .modal-dialog {
        width: 100%;
        max-width: 100% !important;
        margin: 0 !important;
        min-height: 100%;
        height: 100%;
        max-height: 100%;
        display: flex;
        align-items: stretch;
    }

    .product-associations-modal .modal-content {
        width: 100%;
        height: 100dvh;
        min-height: 100dvh;
        max-height: 100dvh;
        border-radius: 0 !important;
        box-shadow: none;
    }

    .product-associations-modal-header {
        padding: 24px 20px 14px !important;
    }

    .product-associations-modal .modal-title {
        font-size: 20px !important;
        line-height: 1.2;
        max-width: calc(100% - 44px);
    }

    .product-associations-modal .btn-close {
        width: 18px;
        height: 18px;
        background-size: 18px;
    }

    .product-associations-modal-body {
        padding: 0 20px 20px !important;
        display: flex;
        flex-direction: column;
    }

    .product-associations-modal-layout {
        display: flex;
        flex-direction: column;
        height: 100%;
        max-height: none;
        min-height: 0;
        gap: 0;
    }

    .product-associations-modal-left {
        display: none !important;
    }

    .product-associations-modal-right {
        flex: 1 1 auto;
        min-height: 0;
    }

    .product-associations-mode-row {
        gap: 12px;
        flex-wrap: wrap;
        margin-top: 4px;
    }

    .product-associations-switch {
        min-width: 148px;
    }

    .product-associations-switch .btn {
        font-size: 13px;
        padding: 4px 12px;
    }

    .product-associations-list-title {
        margin-top: 16px;
        font-size: 18px;
    }

    .product-associations-list-shell {
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
    }

    .product-associations-list {
        flex: 1 1 auto;
        border-top: 0;
        padding-right: 0;
        padding-bottom: 16px;
    }

    .product-associations-list-row {
        grid-template-columns: 80px minmax(0, 1fr);
        gap: 12px;
        border: 1px solid var(--pa-border);
        border-radius: 0;
        padding: 12px;
        margin: 0 0 12px;
        background: #fff;
    }

    .product-associations-list-check {
        display: none;
    }

    .product-associations-list-thumb {
        width: 80px;
        min-width: 80px;
        height: 80px;
    }

    .product-associations-list-content .pa-product-line__title {
        font-size: 13px;
    }

    .product-associations-list-content .pa-product-line__meta {
        gap: 8px;
        margin-bottom: 5px;
    }

    .product-associations-list-content .pa-product-line__reviews {
        font-size: 10px;
    }

    .product-associations-list-content .pa-product-line__prices {
        margin-top: 4px;
        gap: 6px;
    }

    .product-associations-list-content .pa-product-line__price-current {
        font-size: 16px;
    }
}
