/* Benefit page - product / voucher card.
   Used by Type C, Type F, and Type E. */

/* Pricing cards row — a grouped price box and a standalone points box sit side
   by side. A bare `.pricing-card` (used alone by Type E) keeps its own surface;
   inside `.pricing-group` the cards go edge-to-edge and share one box. */
.pricing-cards-row {
    display: flex;
    flex-direction: row;
    gap: 19px;
    width: 100%;
    flex-wrap: wrap;
}

/* Standalone card (Type E "שווי קופון", or any single card) — self-contained box. */
.pricing-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #FAFBFD 0%, #EDEFF4 100%);
    border: 1px solid #E5E6EC;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    min-height: 64px;
    text-align: center;
}

/* Grouped prices (Type C) — one lavender surface split by hairline dividers. */
.pricing-group {
    flex: 1.6 1 0;
    display: flex;
    flex-direction: row;
    background: linear-gradient(135deg, #FAFBFD 0%, #EDEFF4 100%);
    border: 1px solid #E5E6EC;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    min-width: 280px;
}

/* Inner cards are borderless/flat — only the group is a card. */
.pricing-group .pricing-card {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    min-width: 0;
}

.pricing-group .pricing-card:not(:first-child) {
    border-inline-start: 1px solid #E5E6EC;
}

.pricing-card.disabled {
    opacity: 0.55;
}

.pricing-label {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    color: #000;
    opacity: 0.6;
    text-align: center;
}

.pricing-price-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pricing-value {
    font-size: 38px;
    font-weight: 600;
    line-height: 1;
    color: #000;
    direction: ltr;
}

.pricing-value.club-price {
    color: #2020B3;
}

/* Savings — a soft neutral pill sitting beside the price. */
.pricing-savings {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    background: transparent;
    border: 2px solid #E2E2F0;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    font-size: 12px;
    font-weight: 600;
    color: #46494F;
    white-space: nowrap;
}

/* Percent + "off" label, echoing the savings-page percent cell. */
.pricing-savings .savings-pct {
    font-weight: 700;
}

.pricing-savings .savings-off {
    font-weight: 500;
    font-size: 0.9em;
}

@media (max-width: 768px) {
    .pricing-cards-row {
        gap: 12px;
    }

    .pricing-group,
    .points-card {
        flex: 1 1 100%;
        min-width: 0;
    }

    .pricing-value {
        font-size: 24px;
    }

    /* Stack the savings pill under the price so three columns still fit a phone. */
    .pricing-price-row {
        flex-direction: column;
        gap: 4px;
    }

    .pricing-card {
        padding: 16px 8px;
        gap: 8px;
    }

    .pricing-group .pricing-card {
        padding: 16px 6px;
        /* Top-align so the value lines up across columns even when some have a
           chip below and שווי הטבה doesn't. */
        justify-content: flex-start;
    }

    .pricing-label {
        font-size: 12px;
    }

    .pricing-savings {
        font-size: 11px;
        padding: 2px 8px;
    }
}

/* Points box — standalone lavender box beside the price group. */
.points-card {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 18px;
    background: linear-gradient(135deg, #FAFBFD 0%, #EDEFF4 100%);
    border: 1px solid #E5E6EC;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    min-width: 280px;
}

.points-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.points-header .pricing-label {
    opacity: 1;
    color: #46494F;
    font-weight: 600;
}

.points-range {
    font-size: 14px;
    font-weight: 600;
    color: #46494F;
    direction: ltr;
}

.points-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, #DEDCFB 0%, #DEDCFB var(--progress, 50%), #4138F2 var(--progress, 50%), #4138F2 100%);
    border-radius: 3px;
    outline: none;
    direction: rtl;
}

.points-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #2020B3;
    border-radius: 50%;
    cursor: pointer;
}

.points-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #2020B3;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.points-badge {
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    background: #4138F2;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

/* Customization — section title on top, then a row of [label-above-select] pairs. */
.customization-section {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    width: 100%;
}

.customization-options {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
    width: 100%;
    flex-wrap: wrap;
}

.customization-option {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    flex: 1 1 220px;
    min-width: 0;
}

@media (max-width: 768px) {
    .customization-option {
        flex: 1 1 100%;
    }
}

.option-label {
    font-size: 13px;
    font-weight: 500;
    color: #6B7280;
    text-align: right;
}

/* F-type section labels are sub-headings — smaller than A/D's main title3. */
.customization-section > .section-title,
.delivery-section > .section-title {
    font-size: 20px;
    line-height: 1.3;
}

/* Option chips — a visible choice instead of a dropdown. */
.option-choices {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.option-chip {
    position: relative;
    cursor: pointer;
    min-width: 0;
    max-width: 100%;
}

.option-chip-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.option-chip-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #C9C9D4;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    font-weight: 600;
    color: #1F2A44;
    text-align: center;
    overflow-wrap: break-word;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

/* Optional thumbnail on a chip (most values have none). When present, the chip is
   sized for it: a larger framed tile with its own border + drop shadow, echoing the
   cart item image. */
.option-chip-img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    background: #fff;
    border: 1px solid #E5E6EC;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
    padding: 4px;
    flex-shrink: 0;
}

.option-chip-label:has(.option-chip-img) {
    padding: 8px 14px;
    gap: 12px;
}

.option-chip-text {
    min-width: 0;
    overflow-wrap: break-word;
}

.option-chip:hover .option-chip-label {
    border-color: #A9A9BA;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

/* Selected chip — brand outline + tint (brand value set in dynamic styles). */
.option-chip-input:checked + .option-chip-label {
    border-color: #2020B3;
    background: rgba(32, 32, 179, 0.06);
    color: #2020B3;
}

.custom-select {
    appearance: none;
    -webkit-appearance: none;
    padding: 0 16px 0 40px;
    background: #fff;
    background-image: url("data:image/svg+xml,%3Csvg width='21' height='21' viewBox='0 0 21 21' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.25 8.25L10.5 13.5L15.75 8.25' stroke='%238A8A99' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
    background-size: 18px;
    border: 1px solid #C9C9D4;
    border-radius: 8px;
    width: 100%;
    height: 44px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #1F2A44;
    font-family: inherit;
    text-align: right;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.custom-select:hover {
    border-color: #A9A9BA;
}

/* Brand focus ring set in dynamic styles; navy is the static fallback. */
.custom-select:focus {
    outline: none;
    border-color: #2020B3;
    box-shadow: 0 0 0 3px rgba(32, 32, 179, 0.12);
}

/* Attribute table (radios) — for product_attributes when price_display=Y */
.benefit-card .attribute-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
}

.benefit-card .attribute-table th {
    text-align: right;
    padding: 8px 12px;
    font-size: 14px;
    color: #626266;
    font-weight: 500;
    border-bottom: 1px solid #E5E6EC;
}

.benefit-card .attribute-table td {
    text-align: right;
    padding: 10px 12px;
    font-size: 16px;
    border-bottom: 1px solid #EEEFF3;
    vertical-align: middle;
}

.benefit-card .attribute-table tr:hover {
    background: #F6F7F9;
    cursor: pointer;
}

/* Brand-tint selected row set in dynamic styles; neutral is the static fallback. */
.benefit-card .attribute-table tr.selected {
    background: #EEF0F5;
}

.benefit-card .attribute-table .reg-price {
    text-decoration: line-through;
    color: #9CA3AF;
}

/* Delivery — a row of selectable cards (name + radio, then price + note). */
.delivery-section {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    width: 100%;
}

.delivery-options {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
}

.delivery-option {
    flex: 1 1 180px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 3px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #E5E6EC;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.delivery-option:hover {
    border-color: #C9C9D4;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* Keep the lift while pressing — press-effect's bare scale would drop it. */
.delivery-option.press-effect:active {
    transform: translateY(-1px) scale(0.97);
}

/* Selected card — brand outline + tint (brand value set in dynamic styles). */
.delivery-option.selected {
    border-color: #2020B3;
    background: rgba(32, 32, 179, 0.05);
}

/* Top row: name on the start edge, radio on the end. */
.delivery-option-top {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 10px;
}

.delivery-radio {
    display: none;
}

.delivery-radio-custom {
    width: 18px;
    height: 18px;
    border: 2px solid #C9C9D4;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.delivery-radio:checked + .delivery-radio-custom {
    border-color: #2020B3;
    background: #2020B3;
}

/* White checkmark when selected. */
.delivery-radio:checked + .delivery-radio-custom::after {
    content: '';
    position: absolute;
    top: 46%;
    left: 50%;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: translate(-50%, -50%) rotate(45deg);
}

.delivery-option-name {
    font-size: 15px;
    font-weight: 600;
    color: #1F2A44;
    text-align: right;
}

.delivery-price {
    font-size: 16px;
    font-weight: 700;
    color: #1F2A44;
    text-align: right;
}

.delivery-description {
    font-size: 12px;
    color: #6B7280;
    text-align: right;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .delivery-option {
        flex: 1 1 100%;
    }
}

/* Purchase section */
.purchase-section {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    flex-wrap: wrap;
    gap: 20px;
}

@media (max-width: 768px) {
    .purchase-section {
        flex-direction: column;
        align-items: stretch;
    }
}

.purchase-notes {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: right;
    flex: 1;
    min-width: 240px;
}

.purchase-notes p {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    color: #626266;
    margin: 0;
}

/* Term-prefixed notes (Type C) get a brand accent bar on the start edge. */
.purchase-notes p:has(.note-bold) {
    border-inline-start: 3px solid #2020B3;
    padding-inline-start: 10px;
}

.note-bold {
    font-weight: 600;
    color: #2D3A57;
}

.purchase-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .purchase-actions {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

    /* Type E wraps its controls in a <form> — keep that full-width. */
    .purchase-actions > form {
        flex: 1 1 100%;
    }

    /* Type C: qty (right) + purchase share row 1; gift drops to its own row. */
    .purchase-actions > .purchase-button {
        flex: 1;
        width: auto;
        min-width: 0;
    }

    .purchase-actions > .gift-button {
        flex: 0 0 100%;
        width: auto;
    }
}

/* Quantity stepper — [+] | n | [−]. Buttons stretch full-height (tap target),
   but the number cell is shorter and centered so its side borders read as short,
   centered dividers (not full-height cells). direction:rtl puts plus on the left. */
.quantity-selector {
    display: inline-flex;
    flex-direction: row;
    align-items: stretch;
    background: #fff;
    border: 2px solid #C9C9D4;
    border-radius: 6px;
    height: 40px;
    direction: rtl;
    overflow: hidden;
    box-shadow: 0 2.286px 7.429px 0 rgba(0, 0, 0, 0.16);
}

.quantity-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.15s ease;
}

/* Greyed + inert when the press would do nothing (minus at 1, plus at max). */
.quantity-btn.disabled {
    opacity: 0.4;
    cursor: default;
    pointer-events: none;
}

.quantity-value {
    align-self: center;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    border-inline: 1px solid #C9C9D4;
    font-size: 18px;
    font-weight: 600;
    color: #1F2A44;
}

/* Narrower stepper on mobile so the purchase button keeps more of the row. */
@media (max-width: 768px) {
    .quantity-btn {
        width: 32px;
    }

    .quantity-value {
        min-width: 32px;
        font-size: 16px;
    }
}

/* Purchase + gift buttons mirror the login submit button (height, radius,
   border, soft shadow, 18px label, opacity hover). */
.purchase-button {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 40px;
    background: #2020B3;
    border: 2px solid #fff;
    border-radius: 6px;
    box-shadow: 0 2.286px 7.429px 0 rgba(0, 0, 0, 0.16);
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    height: 50px;
    transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    min-width: 220px;
}

.purchase-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

/* Keep the lift while pressing — press-effect's bare scale would drop it. */
.purchase-button.press-effect:active {
    transform: translateY(-1px) scale(0.96);
}

@media (max-width: 768px) {
    .purchase-button {
        width: 100%;
    }
}

.purchase-button.discount-only {
    background: #46494F;
}

/* Type E — coupon download. No note column, so the form fills the row and the
   "הורדת קופון" button stretches full-width (like Type G); the qty stepper,
   when present, sits beside it. */
.purchase-section.coupon-purchase {
    display: block;
}

.coupon-order-form {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.coupon-order-form .coupon-order-button {
    flex: 1;
    width: auto;
    min-width: 0;
}

.gift-button {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: #FF324B;
    border: 2px solid #fff;
    border-radius: 6px;
    box-shadow: 0 2.286px 7.429px 0 rgba(0, 0, 0, 0.16);
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    height: 50px;
    transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.gift-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.gift-button.press-effect:active {
    transform: translateY(-1px) scale(0.96);
}

.gift-button i {
    font-size: 20px;
}

@media (max-width: 768px) {
    .gift-button {
        width: 100%;
    }
}

/* Benefit details section (parent benefit with child voucher rows) */
.benefit-details-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 13px;
    width: 100%;
}

.benefit-details-section .benefit-label {
    font-size: 18px;
    font-weight: 600;
    color: #000;
    text-align: right;
}

.benefit-details-section .benefit-title-row {
    font-size: 24px;
    font-weight: 600;
    color: #000;
    text-align: right;
    margin: 0;
}

.benefit-details-section .benefit-description-row {
    font-size: 14px;
    font-weight: 500;
    color: #626266;
    text-align: right;
    margin: 0;
}

.vouchers-label {
    font-size: 16px;
    font-weight: 600;
    color: #000;
    text-align: right;
}

.voucher-row {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: flex-start;
    gap: 12px;
    width: 100%;
}

.voucher-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 10px 16px;
    background: #FEF8EF;
    border-radius: 8px;
}

.voucher-name {
    font-size: 17px;
    font-weight: 600;
    color: #000;
    text-align: right;
}

.voucher-desc {
    font-size: 14px;
    font-weight: 500;
    color: #000;
    text-align: right;
}

.voucher-original-price {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    background: #E0E0EE;
    border-radius: 8px;
}

.voucher-original-price span {
    font-size: 19px;
    font-weight: 600;
    color: #000;
    text-decoration: line-through;
}

.voucher-sale-price {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    background: #F4F4FF;
    border-radius: 8px;
}

.voucher-sale-price span {
    font-size: 19px;
    font-weight: 600;
    color: #2020B3;
}

.voucher-buy-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px 16px;
    background: #2020B3;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: #fff;
    text-decoration: none;
    transition: background 0.2s ease;
    font-size: 19px;
    font-weight: 600;
}

.voucher-buy-btn:hover {
    filter: brightness(0.92);
    color: #fff;
}

@media (max-width: 768px) {
    .voucher-row {
        flex-wrap: wrap;
    }

    .voucher-info {
        min-width: 100%;
    }

    .voucher-original-price,
    .voucher-sale-price,
    .voucher-buy-btn {
        padding: 8px 12px;
    }

    .voucher-buy-btn {
        flex: 1;
    }
}

/* -------------------------------------------------------------------------
   Modern voucher list — Type D parent-benefit child picker. Each child is a
   single soft-bordered card that's wholly clickable; business logo (if set)
   on the start edge, name+desc in the middle, price + CTA on the end edge.
   Replaces the old .voucher-row / .voucher-info / .voucher-original-price
   triple-box layout. Old classes left in place for now (deferred sweep).
   ------------------------------------------------------------------------- */
.voucher-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.voucher-list-title {
    font-size: 18px;
    font-weight: 700;
    color: #0B0427;
    margin: 0;
    text-align: right;
}

.voucher-list-subtitle {
    font-size: 14px;
    color: #46494F;
    margin: 0 0 4px;
    text-align: right;
    line-height: 1.4;
}

.voucher-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    width: 100%;
}

/* Each child = a vertical card: logo + badge row, title/desc, price, full-width CTA. */
.voucher-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: #fff;
    border: 1px solid #E5E5EE;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(11, 4, 39, 0.06);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.voucher-card:hover {
    border-color: #C5C5DE;
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(11, 4, 39, 0.12);
    color: inherit;
}

/* Keep the lift while pressing — press-effect's bare scale would otherwise drop it. */
.voucher-card.press-effect:active {
    transform: translateY(-2px) scale(0.98);
}

/* Egged's index.php injects `a { border-color: <brand> !important }` for theming,
   which repaints our bordered card (it's an <a>) green. Pin the border back to the
   neutral design value at higher specificity + !important (rest + hover). */
.benefit-card .voucher-card {
    border-color: #E5E5EE !important;
}

.benefit-card .voucher-card:hover {
    border-color: #C5C5DE !important;
}

/* Logo + discount badge top row (RTL: logo right, badge left). */
.voucher-card-top {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    width: 100%;
}

.voucher-card-image {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Only an actual logo gets the white tile + lift; a missing logo leaves the
   56px slot empty so the row height and badge position stay put. */
.voucher-card-image:has(img) {
    background: #fff;
    box-shadow: 0 2px 8px rgba(11, 4, 39, 0.12);
}

.voucher-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.voucher-card-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: #EFF1F4;
    color: #4B4E55;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.voucher-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    min-width: 0;
}

.voucher-card-name {
    font-size: 16px;
    font-weight: 600;
    color: #0B0427;
    margin: 0;
    line-height: 1.3;
    text-align: right;
}

.voucher-card-desc {
    font-size: 13px;
    color: #6B7280;
    margin: 0;
    line-height: 1.4;
    text-align: right;
}

/* Price block — regular (strikethrough) + sale price, RTL start-aligned. */
.voucher-card-pricing {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
}

.voucher-card-regular {
    font-size: 14px;
    font-weight: 500;
    color: #9CA3AF;
    text-decoration: line-through;
}

.voucher-card-price {
    font-size: 20px;
    font-weight: 700;
    color: #0B0427;
}

.voucher-card-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 18px;
    background: #2020B3;
    color: #fff;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    transition: opacity 0.2s ease;
}

.voucher-card:hover .voucher-card-btn {
    opacity: 0.9;
}

@media (max-width: 768px) {
    .voucher-grid {
        grid-template-columns: 1fr;
    }
}

/* Discount-only "buying at discount" button */
.benefit-card .discount-only-buy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    background: #fff;
    color: #2020B3;
    border: 2px solid #2020B3;
    border-radius: 6px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
}

.benefit-card .discount-only-buy:hover {
    background: #F4F4FF;
}

/* -------------------------------------------------------------------------
   Coupon gate modal — purchase restriction for Type C benefits that require
   a coupon code before buying. Color-dependent rules (button bg, input focus
   ring, title color) live in _benefit_dynamic_styles.php.
   ------------------------------------------------------------------------- */
.coupon-gate {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.coupon-gate.active {
    opacity: 1;
    visibility: visible;
}

.coupon-gate-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.22s ease;
    display: flex;
    flex-direction: column;
}

.coupon-gate.active .coupon-gate-card {
    transform: scale(1);
}

.coupon-gate-close {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #46494F;
    transition: background 0.15s ease;
    z-index: 1;
    padding: 0;
}

.coupon-gate-close:hover {
    background: rgba(0, 0, 0, 0.12);
}

.coupon-gate-close svg {
    width: 16px;
    height: 16px;
}

.coupon-gate-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 32px 32px 20px;
    text-align: center;
}

.coupon-gate-logo {
    max-width: 90px;
    max-height: 52px;
    object-fit: contain;
}

.coupon-gate-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    color: #1F2A44;
    margin: 0;
}

.coupon-gate-link {
    font-size: 14px;
    font-weight: 500;
    color: #2020B3;
    text-decoration: underline;
}

.coupon-gate-product {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 32px 20px;
}

.coupon-gate-product-img {
    max-width: 100%;
    max-height: 140px;
    object-fit: contain;
    border-radius: 8px;
}

.coupon-gate-body {
    padding: 20px 28px 28px;
    border-top: 1px solid #EEEFF3;
}

.coupon-gate-input-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #46494F;
    margin-bottom: 8px;
    text-align: right;
}

.coupon-gate-input {
    width: 100%;
    padding: 12px 14px;
    font-size: 16px;
    font-weight: 500;
    color: #1F2A44;
    background: #fff;
    border: 1.5px solid #C9C9D4;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    text-align: right;
    direction: ltr;
}

.coupon-gate-input:focus {
    border-color: #2020B3;
    box-shadow: 0 0 0 3px rgba(32, 32, 179, 0.1);
}

.coupon-gate-input.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.coupon-gate-error {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 10px 12px;
    background: rgba(220, 53, 69, 0.06);
    border-right: 3px solid #dc3545;
    border-radius: 4px;
    color: #d92d20;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    text-align: right;
}

.coupon-gate-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 16px;
    padding: 14px 24px;
    background: #2020B3;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.15s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
}

.coupon-gate-submit:hover {
    filter: brightness(0.92);
}

.coupon-gate-submit.press-effect:active {
    transform: scale(0.97);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

@media (max-width: 480px) {
    .coupon-gate-card {
        border-radius: 16px;
    }

    .coupon-gate-header {
        padding: 28px 24px 16px;
    }

    .coupon-gate-body {
        padding: 16px 20px 24px;
    }
}
