/* БЛОК 1: Верхняя информационная панель */
.shape-top-panel {
    width: 100% !important;
    height: 13vh !important;
    min-height: 13vh !important;
    max-height: 13vh !important;
    background-image: url("https://sinbad-cdn.b-cdn.net/background/mountains467.jpg") !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    position: relative !important;
    overflow: visible !important;
    z-index: 1000 !important;
}



/* Правый контейнер в шапке */
/* Внутренний контейнер косынки */
.banner-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    padding: 0 40px;
    width: 100%;
    box-sizing: border-box;
    height: 100%;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.banner-inner .left-block {
    display: flex;
    flex-direction: column;
    text-align: left;
    flex: 1;
    min-width: 0;
    overflow: visible;
    visibility: visible !important;
    opacity: 1 !important;
    align-self: flex-end;
    margin-bottom: 15px;
}

.user-name {
    font-size: 14px;
    font-weight: 500;
    opacity: .9;
    margin: 0 0 6px 0;
}

.user-meta {
    font-size: 12px;
    font-weight: 400;
    opacity: .55;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin: 0;
}

.user-meta #balanceLink {
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    color: inherit;
    opacity: .95;
}

.user-meta #balanceLink:hover {
    text-decoration: underline;
}

/* Контейнер аватара с локальной панелью */
.avatar-wrapper {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    position: relative !important;
    height: 90px !important;
    order: 1;
    flex-shrink: 0 !important;
    overflow: visible !important;
    z-index: 102 !important;
}

/* Локальная панель смены аватара (слева от аватара) */
.avatar-panel {
    display: none;
    position: relative;
    z-index: 20;
    margin: 0;
    padding: 0;
}

.avatar-panel.show {
    display: block;
}

/* Убеждаемся, что панель внутри shape-top-panel и не перекрывается XenForo */
.shape-forum-section {
    position: relative;
    z-index: 0;
}

/* Специфично для аватара */
.avatar-image {
    display: block;
    height: 90px;
    width: 90px;
    border-radius: 50%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    cursor: pointer;
    flex-shrink: 0;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: 0;
    position: static;
}

/* Обводка для буквы в аватаре (fallback) */
.avatar-wrapper .avatar-fallback {
    text-shadow: 
        0 -8px 0 #555555,
        0 8px 0 #555555,
        -8px 0 0 #555555,
        8px 0 0 #555555,
        -6px -6px 0 #555555,
        6px -6px 0 #555555,
        -6px 6px 0 #555555,
        6px 6px 0 #555555 !important;
}

.avatar-fallback {
    display: flex;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: #939393;
    color: white;
    align-items: center;
    justify-content: center;
    font-size: 88px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    flex-shrink: 0;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: 0;
    position: relative;
    z-index: 3;
    text-shadow: 
        0 -8px 0 #555555,
        0 8px 0 #555555,
        -8px 0 0 #555555,
        8px 0 0 #555555,
        -6px -6px 0 #555555,
        6px -6px 0 #555555,
        -6px 6px 0 #555555,
        6px 6px 0 #555555 !important;
}

.avatar-change {
    padding: 8px 16px;
    font-size: 12px;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #333;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s;
    white-space: nowrap;
    display: block;
    font-weight: 500;
}

.avatar-change:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

.shape-forum-frame {
    width: 100%;
    border: none;
    height: calc(80vh);
    min-height: 700px;
}

/* Адаптация для очень маленьких экранов (320px - iPhone SE) */
@media (max-width: 375px) {
    .banner-inner {
        padding: 0 15px;
        flex-wrap: wrap;
        gap: 15px;
        align-items: center;
    }
    
    .banner-inner .left-block {
        flex: 1;
        min-width: 0;
        display: flex !important;
        visibility: visible !important;
    }
    
    .avatar-wrapper {
        height: 70px !important;
        gap: 10px !important;
    }
    
    .avatar-image,
    .avatar-fallback {
        height: 70px;
        max-height: 70px;
        min-height: 70px;
        width: 70px;
        max-width: 70px;
        min-width: 70px;
    }
    
    .avatar-fallback {
        font-size: 62px;
    }
    
    .avatar-change {
        padding: 6px 12px;
        font-size: 11px;
    }
}

/* Адаптация для экстремально маленьких экранов (320px) */
@media (max-width: 320px) {
    .banner-inner {
        padding: 0 10px;
        gap: 10px;
        align-items: center;
    }
    
    .avatar-wrapper {
        height: 64px !important;
        gap: 8px !important;
    }
    
    .avatar-image,
    .avatar-fallback {
        height: 64px;
        max-height: 64px;
        min-height: 64px;
        width: 64px;
        max-width: 64px;
        min-width: 64px;
    }
    
    .avatar-fallback {
        font-size: 53px;
    }
    
    .avatar-change {
        padding: 5px 10px;
        font-size: 10px;
    }
}

/* =========================================
   МОДАЛЬНОЕ ОКНО LEVEL MATRIX
========================================= */

/* Затемнённый фон */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* Центральная панель (широкий формат) */
#levelMatrixModal .modal-content {
    position: relative;
    width: 90%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 40px 45px;
    background: #fff;
    border-radius: 14px;
    transform: translateY(-60px) scale(0.9);
    opacity: 0;
    transition: transform .28s ease, opacity .28s ease;
    max-height: 90vh;
    overflow-y: auto;
    box-sizing: border-box;
}

#levelMatrixModal.open .modal-content {
    transform: translateY(-60px) scale(1);
    opacity: 1;
}

.modal-content.wide {
    max-width: 1600px;
    min-width: 1100px;
}

/* Крестик закрытия (как в auth) */
.modal-close-btn {
    position: absolute;
    top: 18px;
    right: 22px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 10;
    padding: 0;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close-btn svg {
    width: 100%;
    height: 100%;
    transition: stroke 0.2s ease;
}

.modal-close-btn:hover svg {
    stroke: #666;
}

/* SVG изображение в модалке */
#levelMatrixModal svg {
    width: 95%;
    max-width: 1500px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.level-matrix-modal-img {
    width: 95%;
    max-width: 1500px;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Адаптивность для мобильных */
@media (max-width: 1200px) {
    #levelMatrixModal .modal-content {
        min-width: 90%;
        max-width: 90%;
        padding: 30px 20px;
    }
}

@media (max-width: 768px) {
    #levelMatrixModal .modal-content {
        min-width: 95%;
        max-width: 95%;
        padding: 20px 15px;
    }
    
    #levelMatrixModal .modal-close-btn {
        top: 12px;
        right: 12px;
        font-size: 28px;
    }
}

/* =========================================
   MEMBERSHIP CARDS MODULE
========================================= */

.membership-cards-section {
    width: 100%;
    padding: 10px 20px;
    margin-top: 10px !important;
    margin-bottom: 15vh;
    box-sizing: border-box;
    background-color: #f8f9fa;
    min-height: 700px;
}

.membership-cards-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 40px;
    max-width: 2000px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.membership-card {
    width: 360px;
    height: 727px;
    padding: 30px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.membership-card[data-level="position_lock"] {
    background-color: #e5ffd8;
}

.membership-card[data-level="discount_credit"] {
    background-color: #f2d8ff;
}

.membership-card[data-level="sinbad_standard"] {
    background-color: #d1e9f6;
}

.membership-card[data-level="premium_status"] {
    background-color: #ffdcd4;
}

.membership-card.completed {
    background-color: #f0f0f0;
}

.membership-original-price {
    font-family: 'Playfair Display', serif;
    font-weight: 300;
    font-size: 35px;
    color: #000;
    margin: 0 0 5px 0;
    padding: 0;
    text-align: center;
}

.membership-card-title {
    font-family: 'Playfair Display', serif;
    font-weight: 300;
    font-size: 35px;
    color: #000;
    margin: 0 0 20px 0;
    padding: 0;
    text-align: center;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.membership-benefits {
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 13.5px;
    color: #666;
    margin: 0;
    padding: 0 0 0 20px;
    line-height: 1.5;
    flex: 0 0 auto;
    overflow-y: auto;
    height: 380px;
    max-height: 380px;
}

.membership-benefits li {
    margin-bottom: 8px;
}

.membership-benefits-premium li {
    margin-bottom: 4px;
}

.membership-payment-block {
    margin-top: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: 0;
    overflow: visible;
    flex-shrink: 0;
    height: 275px;
}

.membership-payment-text {
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-weight: 400;
    font-size: 28px;
    color: #888888;
    margin: 0 0 10px 0;
    padding: 0;
    text-align: center;
}

.membership-legal-agreement {
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 13px;
    color: #666;
    margin: 8px 0 10px 0;
    padding: 0;
    text-align: center;
    line-height: 1.4;
}

.membership-legal-agreement a {
    color: #666;
    text-decoration: none;
}

.membership-legal-agreement a:hover {
    text-decoration: underline;
}

.membership-payment-note {
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 13px;
    color: #666;
    margin: 5px 0 0 0;
    padding: 0;
    text-align: center;
}

.membership-payment-block > div {
    width: 100%;
    max-width: 100%;
    min-height: 50px;
    display: block;
    visibility: visible;
    overflow: visible;
}

.membership-card-wide-wrapper {
    display: flex;
    justify-content: center;
    margin: 1vh 0 5vh 0;
    margin-left: 35%;
}

.membership-card-wide {
    width: calc((360px * 2 + 40px) * 0.81);
    max-width: 100%;
    height: 727px;
    background-color: #e5ffd8;
    position: relative;
    overflow: visible;
}

.membership-card-wide::before {
    content: '';
    position: absolute;
    left: calc(-10vw - 15px);
    top: calc(50% - 49.5% + 40px);
    width: 15px;
    height: 94.5%;
    background: linear-gradient(to top, #00F7FF 0%, #00F7FF var(--pill-fill, 2%), #fff var(--pill-fill, 2%));
    border: 2px solid #4B9DA9;
    border-top: none;
    border-radius: 0 0 999px 999px;
    box-sizing: border-box;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.15);
}

.pill-wavy-break {
    position: absolute;
    left: calc(-10vw - 30px);
    top: calc(50% - 49.5% - 8px + 40px);
    width: 45px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='45' height='16' viewBox='0 0 45 16'%3E%3Cpath d='M0 8 L15 8 L22.5 14 L30 8 L45 8' stroke='%234B9DA9' stroke-width='2' fill='none'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 10;
}

.pill-balance-indicator {
    position: absolute;
    right: calc(100% + 10vw - 5px);
    top: calc(50% - 49.5% - 60px + 40px);
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #4B9DA9;
    text-align: right;
    white-space: nowrap;
}

.pill-balance-indicator span {
    font-size: 36px;
    font-weight: 400;
    vertical-align: -2px;
    margin-left: 0.75em;
}

/* Asterisk next to pill fill level indicator (right side of pill, at bottom) */
.pill-asterisk {
    position: absolute;
    left: calc(-10vw + 5px);
    bottom: calc(50% - 49.5% + 40px - 40px);
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #4B9DA9;
    z-index: 10;
}

/* Footnote under the pill and statuses block */
.pill-footnote {
    position: absolute;
    left: calc(-30vw - 35px);
    bottom: calc(50% - 49.5% + 40px - 75px);
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: #888;
    white-space: nowrap;
    text-align: left;
}

.pill-mark-line {
    position: absolute;
    height: 1px;
    background-color: #000;
    width: 20vw;
}

.pill-mark-line-5 {
    left: calc(-30vw - 35px);
    top: calc(50% + 45% - 4.5% + 40px);
}

.pill-mark-line-20 {
    left: calc(-30vw - 35px);
    top: calc(50% + 45% - 18% + 40px);
}

.pill-mark-line-100 {
    left: calc(-30vw - 35px);
    top: calc(50% - 45% + 40px);
}

.pill-mark-title {
    position: absolute;
    bottom: 4px;
    left: 0;
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #000;
    white-space: normal;
    max-width: 18vw;
    line-height: 1.3;
}

.pill-mark-subtitle {
    position: absolute;
    top: 4px;
    left: 0;
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: #666;
    white-space: normal;
    max-width: 18vw;
    line-height: 1.4;
}

/* Active state when fill crosses the mark */
.pill-mark-line.active {
    background-color: #E37434;
}

.pill-mark-line.active .pill-mark-title {
    color: #E37434;
}

.pill-mark-line.active .pill-mark-subtitle {
    color: #E37434;
}

/* SVG Tick Marks - positioned same as old ::after */
.pill-tick-marks {
    position: absolute;
    left: calc(-10vw - 35px);
    top: calc(50% - 45% + 40px);
    width: 10px;
    height: 90%;
    overflow: visible;
}

.membership-card-wide-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin-top: 40px;
    align-items: center;
}

.membership-card-wide-price {
    grid-column: 2;
    text-align: center;
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #4B9DA9;
    display: grid;
    justify-items: center;
    align-content: center;
}

.membership-card-wide-price-muted {
    grid-column: 3;
    color: #d0d0c8;
}

.membership-card-wide-line {
    font-size: 24px;
    line-height: 1.25;
    text-align: center;
}

.mobile-br {
    display: none;
}

.membership-card-wide-value {
    font-size: 36px;
    line-height: 1.1;
}

.membership-card-wide-quantity-group {
    position: absolute;
    top: 33%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-rows: auto auto;
    align-items: center;
    justify-items: center;
    column-gap: 54px;
    row-gap: 32px;
    width: max-content;
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #000;
    text-align: center;
}

.membership-card-wide-quantity-label {
    grid-column: 1 / 4;
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 0.02em;
}

.membership-card-wide-quantity-value {
    grid-column: 2;
    font-size: 72px;
    font-weight: 300;
    line-height: 1;
    min-width: 180px;
    text-align: center;
    color: #E37434;
}

.membership-card-wide-quantity-sign {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: #e5ffd8;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 28px;
    font-weight: 300;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    color: #888;
    -webkit-font-smoothing: antialiased;
    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.25),
        inset 0 -2px 0 rgba(0, 0, 0, 0.12);
    transition: transform 0.08s ease, box-shadow 0.12s ease;
}

.membership-card-wide-quantity-sign-minus {
    grid-column: 1;
    justify-self: start;
}

.membership-card-wide-quantity-sign-plus {
    grid-column: 3;
    justify-self: end;
}

.membership-card-wide-quantity-sign:active {
    transform: translateY(2px) scale(0.97);
    box-shadow:
        0 1px 6px rgba(0, 0, 0, 0.2),
        inset 0 2px 4px rgba(0, 0, 0, 0.18);
}

.membership-card-wide-topay {
    position: absolute;
    top: calc(33% + 289px);
    left: 50%;
    transform: translateX(-50%);
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 24px;
    font-weight: 300;
    color: #000;
    text-align: center;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.membership-card-wide-topay-label {
}

.membership-card-wide-topay-value {
    min-width: 80px;
    text-align: left;
}

.membership-card-wide-presets {
    position: absolute;
    top: calc(33% + 85px);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 16px;
}

.membership-card-wide-preset {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: #e5ffd8;
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 18px;
    font-weight: 300;
    color: #000;
    cursor: pointer;
    display: grid;
    place-items: center;
    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.25),
        inset 0 -2px 0 rgba(0, 0, 0, 0.12);
    transition: transform 0.08s ease, box-shadow 0.12s ease;
}

.membership-card-wide-preset:hover {
    opacity: 0.85;
}

.membership-card-wide-preset:active {
    transform: translateY(2px) scale(0.97);
    box-shadow:
        0 1px 6px rgba(0, 0, 0, 0.2),
        inset 0 2px 4px rgba(0, 0, 0, 0.18);
}

/* Agreement checkbox block for wide card */
.membership-card-wide-agreement {
    position: absolute;
    top: calc(33% + 221px);
    left: 52%;
    transform: translateX(-50%);
    max-width: 420px;
    width: 90%;
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    text-align: left;
    color: #666;
}

.membership-card-wide-agreement-label {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    cursor: pointer;
}

.membership-card-wide-agreement-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 2px 0 0 0;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: #4a7c3f;
}

.membership-card-wide-agreement-label span {
    flex: 1;
}

.membership-card-wide-agreement a {
    color: #555;
    text-decoration: underline;
}

.membership-card-wide-agreement a:hover {
    color: #333;
}

/* PayPal wrapper for wide card */
.membership-card-wide-paypal {
    position: absolute;
    top: calc(33% + 357px);
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    max-width: 90%;
}

.membership-card-wide-paypal #paypal-kit-units {
    width: 100% !important;
    min-height: 50px !important;
}

/* Agreement Modal for Kit Units */
.kit-agreement-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.kit-agreement-modal-content {
    background: #fff;
    padding: 30px 35px;
    border-radius: 12px;
    max-width: 400px;
    text-align: center;
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: #333;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.kit-agreement-modal-content p {
    margin: 0 0 20px 0;
}

.kit-agreement-modal-content a {
    color: #555;
    text-decoration: underline;
}

.kit-agreement-modal-content a:hover {
    color: #000;
}

.kit-modal-close-btn {
    padding: 10px 40px;
    font-size: 15px;
    font-weight: 500;
    background: #e5ffd8;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.kit-modal-close-btn:hover {
    background: #d4f5c4;
}

/* Стили для контейнеров PayPal кнопок */
.paypal-box,
#paypal-position,
#paypal-discount,
#paypal-standard,
#paypal-premium {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 200px !important;
    min-height: 50px !important;
    height: auto !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    overflow: visible !important;
    position: relative !important;
    transform: scale(0.75);
    transform-origin: top center;
}

.paypal-premium {
    transform: scale(0.75) !important;
    transform-origin: top center !important;
}

/* Ограничение размера PayPal кнопок внутри карточек */
#paypal-position iframe,
#paypal-discount iframe,
#paypal-standard iframe,
#paypal-premium iframe {
    max-width: 100% !important;
    width: 100% !important;
    min-height: 50px !important;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .membership-cards-container {
        flex-direction: column;
        align-items: center;
    }
    
    .membership-card {
        width: 100%;
        max-width: 200px;
    }

    .membership-card-wide {
        width: 100%;
        max-width: 100%;
    }

    .membership-card-wide-line {
        font-size: clamp(14px, 3vw, 24px);
    }

    .membership-card-wide-value {
        font-size: clamp(22px, 5vw, 36px);
    }

    .pill-mark-line-20 .pill-mark-subtitle {
        max-height: 4.5em;
        overflow-y: auto;
        scrollbar-width: thin;
    }

    .pill-mark-title {
        font-size: clamp(10px, 2vw, 14px);
    }

    .pill-mark-subtitle {
        font-size: clamp(9px, 1.8vw, 12px);
    }

    .membership-card-wide-grid {
        margin-top: 10px;
    }

    .membership-card-wide::before {
        left: calc(-8vw - 15px);
    }

    .pill-tick-marks {
        left: calc(-8vw - 35px);
    }

    .pill-mark-line {
        width: 15vw;
        left: calc(-26vw - 35px) !important;
    }

    .pill-mark-title,
    .pill-mark-subtitle {
        max-width: 15vw;
    }

    .mobile-br {
        display: inline;
    }
}

/* ============================================
   Kit Production Button (below payment card)
   ============================================ */
.kit-production-btn-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 60px 0 40px 0;
    width: 100%;
    position: relative;
    z-index: 10;
}

/* Inner container for button + modal to limit hover area */
.kit-production-btn-inner {
    position: relative;
    display: inline-block;
}

.kit-production-btn {
    /* Inherits from .kneeboard-btn in index.php inline styles */
    padding: 26px 68px;
    border: 2px solid #000;
    text-decoration: none;
    color: #000;
    font-weight: 600;
    letter-spacing: 0.08em;
    background: #fff;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.2;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.3s ease, background 0.3s ease, color 0.3s ease;
    cursor: pointer;
}

.kit-production-btn:hover,
.kit-production-btn.kneeboard-btn:hover {
    background: #ca09d5 !important;
    color: #fff !important;
    box-shadow: 0 12px 32px rgba(202, 9, 213, 0.35) !important;
}

.kit-production-btn .kneeboard-btn-main {
    display: block;
    font-size: inherit;
    font-weight: 600;
    letter-spacing: 0.08em;
}

/* Production Modal (appears above button) */
.production-modal {
    position: absolute;
    bottom: calc(100% + 16px);
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border-radius: 12px;
    padding: 20px 28px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    text-align: center;
    white-space: nowrap;
    pointer-events: none;
}

.production-modal.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.production-modal::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 10px solid transparent;
    border-top-color: #fff;
}

.production-modal-title {
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.production-modal-text {
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #666;
    line-height: 1.5;
}

/* ============================================
   Kit Purchase Info Section
   ============================================ */
.kit-purchase-info-section {
    background: #F9F9F7;
    padding: calc(120px - 4vh) 24px 10px;
}

.kit-purchase-info-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    text-align: center;
}

.kit-purchase-info-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #444;
    text-align: left;
}

.kit-purchase-info-col p {
    margin: 0 0 8px 0;
}

.kit-purchase-info-col p:last-child {
    margin-bottom: 0;
}

.kit-purchase-info-title {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 300;
    color: #333;
    margin: 0 0 16px 0;
}

.kit-purchase-info-content {
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: #444;
    text-align: left;
}

.kit-purchase-info-content p {
    margin: 0 0 16px 0;
}

.kit-purchase-info-content p:last-child {
    margin-bottom: 0;
}

.kit-purchase-info-content strong {
    font-weight: 500;
    color: inherit;
}

.kit-purchase-info-note {
    margin-top: 12px !important;
    padding: 14px 20px;
    background: #f0f0ed;
    border-radius: 10px;
    font-size: 13px;
    color: #555;
    line-height: 1.5;
}

/* Responsive for Kit Purchase Info */
@media (max-width: 768px) {
    .kit-purchase-info-section {
        padding: 40px 20px 30px;
    }

    .kit-purchase-info-title {
        font-size: 26px;
        margin-bottom: 24px;
    }

    .kit-purchase-info-columns {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .kit-purchase-info-content {
        font-size: 15px;
    }

    .kit-purchase-info-note {
        font-size: 13px;
        padding: 14px 16px;
    }
}
