/* ------------------------------------------------------------------
   Add lessons page
   Scoped to .add_page so nothing else on the site is affected.
------------------------------------------------------------------ */

.add_page {
    max-width: 1080px;
    margin: 0 auto;
    padding: 28px 24px 56px;
    color: #1f2430;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Only this page loads this stylesheet. Stop the browser from silently
   shifting the scroll position when the checkout panel changes height. */
html {
    overflow-anchor: none;
}

.add_head {
    margin-bottom: 22px;
}

.add_head__eyebrow {
    margin-bottom: 4px;
    /* Darker red: readable on the mid-tone page canvas. */
    color: #6b2129;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.add_head__title {
    margin: 0 0 6px;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
}

.add_head__lede {
    max-width: 640px;
    margin: 0;
    color: #2f3847;
    font-size: 14.5px;
    line-height: 1.55;
}

.add_notes {
    margin: 24px 0 0;
    padding: 14px 20px 15px 20px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.add_notes ul {
    margin: 0;
    padding-left: 18px;
    color: #2f3847;
    font-size: 13.5px;
    line-height: 1.7;
}

.add_notes li + li {
    margin-top: 2px;
}

.add_grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    align-items: start;
}

.add_card {
    overflow: hidden;
    background: #fff;
    /* A faint dark edge reads as intentional on the mid-tone canvas;
       a pale border looked like a stray hairline. */
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 16px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.10);
}

.add_card__head {
    padding: 18px 22px;
    color: #fff;
}

.add_card--pack .add_card__head {
    background: linear-gradient(135deg, #cc858c 0%, #e0a7ac 100%);
}

.add_card--sub .add_card__head {
    background: linear-gradient(135deg, #5b8c6a 0%, #a5c9af 100%);
}

.add_card--sub.add_card--manage .add_card__head {
    background: linear-gradient(135deg, #2f4a6d 0%, #4a6699 100%);
}

.add_card--sub.add_card--manage .add_card__body {
    background: #f8fafc;
    border-radius: 0 0 16px 16px;
}

.add_manage__hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.add_manage__badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: #eef7f1;
    color: #2f6b4f;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.add_manage__plan {
    margin: 7px 0 2px;
    color: #1f2430;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
}

.add_manage__meta {
    margin: 0;
    color: #64748b;
    font-size: 13px;
}

.add_manage__price {
    color: #1f2430;
    font-size: 24px;
    font-weight: 800;
    white-space: nowrap;
}

.add_manage__price small {
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
}

.add_manage__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.add_manage__item {
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.add_manage__label {
    display: block;
    margin-bottom: 3px;
    color: #94a3b8;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.add_manage__value {
    color: #1f2430;
    font-size: 13.5px;
    font-weight: 700;
}

.add_manage__controls {
    margin-top: 18px;
    padding: 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.add_manage__controls h3 {
    margin: 0 0 4px;
    color: #1f2430;
    font-size: 15px;
    font-weight: 700;
}

.add_manage__controls > p {
    margin: 0 0 14px;
    color: #64748b;
    font-size: 12.5px;
    line-height: 1.5;
}

.add_manage__history {
    margin-top: 20px;
}

.add_manage__history h3 {
    margin: 0 0 8px;
    color: #52606d;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.add_manage__table-wrap {
    overflow-x: auto;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.add_manage__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.add_manage__table th {
    padding: 8px 10px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-align: left;
    text-transform: uppercase;
}

.add_manage__table td {
    padding: 8px 10px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}

.add_manage__table tr:last-child td {
    border-bottom: 0;
}

.add_manage__table .add_num {
    text-align: right;
}

@media (max-width: 640px) {
    .add_manage__hero {
        flex-direction: column;
    }

    .add_manage__grid {
        grid-template-columns: 1fr;
    }
}

.add_card__eyebrow {
    display: block;
    margin-bottom: 3px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    opacity: 0.9;
}

.add_card__title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.add_card__body {
    padding: 22px;
}

.add_price {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.add_price__amount {
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.add_price__unit {
    color: #94a3b8;
    font-size: 13px;
    font-weight: 600;
}

.add_card__meta {
    margin: 6px 0 0;
    color: #52606d;
    font-size: 14px;
}

.add_card__text {
    margin: 8px 0 20px;
    color: #64748b;
    font-size: 13.5px;
    line-height: 1.55;
}

.add_field {
    display: block;
    margin-bottom: 8px;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.add_select {
    width: 100%;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    color: #1f2430;
    font-family: inherit;
    font-size: 16px;
    cursor: pointer;
}

.add_select:focus {
    outline: none;
    border-color: #94a3b8;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.2);
}

.add_card--pack {
    overflow: visible;
}

.add_card--pack .add_card__head {
    border-radius: 16px 16px 0 0;
}

.add_card--sub {
    overflow: visible;
}

.add_card--sub .add_card__head {
    border-radius: 16px 16px 0 0;
}

.qty_dropdown {
    position: relative;
}

.qty_dropdown__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 49px;
    font-weight: 400;
    text-align: left;
    cursor: pointer;
    box-shadow: none;
    transition: none;
}

.qty_dropdown__toggle:hover {
    background: #eef2f7;
    filter: none;
}

.qty_dropdown__arrow {
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    margin-top: -3px;
    border-right: 1.5px solid #6b7280;
    border-bottom: 1.5px solid #6b7280;
    transform: rotate(45deg);
}

.qty_dropdown__menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 40;
    max-height: 362px;
    overflow-y: auto;
    padding: 0;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    box-shadow: none;
}

.qty_dropdown__menu[hidden] {
    display: none;
}

.qty_dropdown__option {
    display: block;
    width: 100%;
    padding: 8px 12px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #1f2430;
    font-family: inherit;
    font-size: 16px;
    font-weight: 400;
    line-height: 20px;
    text-align: left;
    cursor: pointer;
    box-shadow: none;
    transition: none;
}

.qty_dropdown__option:hover,
.qty_dropdown__option:focus {
    background: #eef2f7;
    filter: none;
    outline: none;
    cursor: pointer;
}

.qty_dropdown__option.is-selected {
    background: #e8eef2;
    font-weight: 400;
}

.add_hint {
    margin: 10px 0 0;
    color: #94a3b8;
    font-size: 12.5px;
}

.add_summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid #eef2f7;
    border-radius: 12px;
}

.add_summary__label {
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.add_summary__value {
    font-size: 15px;
    font-weight: 700;
}

.add_actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 18px;
}

.add_btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 16px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.add_btn--primary {
    background: #1f2430;
    color: #fff;
}

.add_btn--primary:hover {
    background: #364152;
}

.add_btn--danger {
    background: #fff;
    border-color: #fecaca;
    color: #b91c1c;
}

.add_btn--ghost {
    background: #fff;
    border-color: #cbd5e1;
    color: #1f2430;
    text-decoration: none;
}

.add_btn--ghost:hover {
    background: #f8fafc;
}

.add_btn--danger:hover {
    background: #fef2f2;
    border-color: #fca5a5;
}

.add_status {
    min-height: 18px;
    margin-top: 10px;
    color: #52606d;
    font-size: 13px;
}

/* The single checkout panel sits below both product cards. */
.add_pay {
    width: 50%;
    min-width: 320px;
    max-width: 540px;
    margin: 24px auto 0;
}

.add_pay[hidden] {
    display: none;
}

.add_pay .add_card__head {
    background: linear-gradient(135deg, #0e2a3a 0%, #1d4a63 100%);
}

/* Mark which option the payment panel belongs to. */
.add_card.is-selected {
    border-color: #bcd8c7;
    box-shadow: 0 0 0 2px rgba(91, 140, 106, 0.22), 0 10px 26px rgba(15, 23, 42, 0.07);
}

.checkoutbox {
    margin: 0;
}

/* Greyed-out preview shown until a quantity is chosen. */
.checkout_placeholder {
    margin: 0;
}

.checkout_placeholder[hidden] {
    display: none;
}

.checkout_placeholder__box {
    display: grid;
    gap: 8px;
    margin: 0 0 16px;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid #eef2f7;
    border-radius: 10px;
}

.checkout_placeholder__box[hidden],
.checkout_preview[hidden] {
    display: none;
}

.checkout_preview {
    margin: 0 0 16px;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid #eef2f7;
    border-radius: 10px;
}

.checkout_preview__row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #52606d;
    font-size: 13.5px;
    line-height: 1.7;
}

.checkout_preview__row strong {
    color: #1f2430;
    font-weight: 700;
}

.checkout_preview__row--total {
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px solid #eef2f7;
    color: #1f2430;
    font-size: 14px;
}

.checkout_preview__row--total strong {
    font-size: 16px;
}

.checkout_placeholder__label {
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.checkout_placeholder__field {
    height: 34px;
    background: #eef2f7;
    border-radius: 7px;
}

.checkout_placeholder__field--short {
    width: 42%;
}

.checkout_placeholder__btn {
    width: 100%;
    padding: 12px 16px;
    background: #cbd5e1;
    border: 0;
    border-radius: 10px;
    color: #f8fafc;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 600;
    cursor: not-allowed;
}

.checkout_placeholder__btn:not([disabled]) {
    background: #1f2430;
    color: #fff;
    cursor: pointer;
}

.checkout_placeholder__btn:not([disabled]):hover {
    background: #364152;
}

.checkout_placeholder__hint {
    margin: 10px 0 0;
    color: #64748b;
    font-size: 12.5px;
    line-height: 1.5;
}

.checkout_placeholder.is-error .checkout_placeholder__hint {
    color: #b42318;
}

#checkout_real {
    animation: checkoutFade 0.2s ease;
    transition: opacity 0.15s ease;
}

#checkout_real.is-updating {
    opacity: 0.55;
}

@keyframes checkoutFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Stripe form, restyled to sit inside the card */
.add_page #payment-form {
    display: none;
    margin: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

.add_page .notice {
    display: none;
    margin: 0 0 16px;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid #eef2f7;
    border-radius: 10px;
    color: #1f2430;
    font-size: 14px;
    line-height: 1.5;
}

.add_page .notice h4 {
    margin: 10px 0 0;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.add_page .notice__qty {
    font-size: 15px;
    font-weight: 700;
}

.add_page .notice__meta {
    margin-top: 2px;
    color: #64748b;
    font-size: 13px;
}

.add_page .notice__total {
    margin-top: 6px;
    color: #1f2430;
    font-size: 14px;
}

.add_page .notice__total strong {
    font-size: 16px;
}

.add_page #payment-element {
    margin: 14px 0 18px;
    /* The Stripe iframe sizes itself after mount; reserve its height up front
       so changing the quantity never collapses the panel. */
    min-height: 226px;
}

.add_page #submit {
    width: 100%;
    padding: 12px 16px;
    background: #1f2430;
    border: 0;
    border-radius: 10px;
    box-shadow: none;
    color: #fff;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 600;
}

.add_page #submit:hover {
    background: #364152;
    filter: none;
}

.add_page #payment-message {
    padding-top: 10px;
    font-size: 13px;
}

.add_legal {
    margin-top: 28px;
    text-align: center;
    font-size: 13px;
}

.add_legal a {
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
}

.add_legal a:hover {
    color: #fff;
    text-decoration: underline;
}

.add_card__note {
    display: none;
    margin: 4px 0 0;
    color: #7b8899;
    font-size: 11.5px;
    line-height: 1.5;
}

/* Only show the note once a quantity is chosen (the total is revealed at the same time). */
.add_total:not([hidden]) + .add_card__note {
    display: block;
}

@media (max-width: 900px) {
    .add_page {
        padding: 20px 16px 40px;
    }

    .add_grid {
        grid-template-columns: 1fr;
    }

    .add_pay {
        width: 100%;
        min-width: 0;
        max-width: none;
    }

    /* The checkout can be moved inside the card grid, under the chosen card. */
    .add_grid > #pay_panel {
        grid-column: 1 / -1;
        margin: 0;
    }
}

.subscription-flash {
    animation: subscriptionFlash 1.1s ease;
}

@keyframes subscriptionFlash {
    0% {
        box-shadow: 0 0 0 3px rgba(91, 140, 106, 0.55);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(91, 140, 106, 0);
    }
}

/* Mobile cart bar: confirm a quantity without hunting for the checkout card. */
.mobile_cart {
    display: none;
}

@media (max-width: 900px) {
    .mobile_cart {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 9000;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
        background: #fff;
        border-top: 1px solid #e2e8f0;
        box-shadow: 0 -6px 22px rgba(15, 23, 42, 0.14);
    }

    .mobile_cart[hidden] {
        display: none;
    }

    .mobile_cart__info {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        gap: 1px;
        min-width: 0;
    }

    .mobile_cart__qty {
        color: #64748b;
        font-size: 11.5px;
        font-weight: 700;
    }

    .mobile_cart__total {
        color: #1f2430;
        font-size: 16px;
        font-weight: 700;
        white-space: nowrap;
    }

    .mobile_cart__btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
        width: auto;
        padding: 11px 18px;
        border: 0;
        border-radius: 10px;
        background: #1f2430;
        color: #fff;
        font: inherit;
        font-size: 14px;
        font-weight: 700;
        cursor: pointer;
    }

    .mobile_cart__btn:hover {
        background: #364152;
    }

    body.has_cart_bar {
        padding-bottom: 86px;
    }
}

/* checkout.css stretches every <button> to 100%; keep the shared nav compact. */
.links_container .dropbtn {
    width: auto;
}

/* Mobile checkout sheet: the payment form slides over the product page. */
.checkout_sheet {
    display: none;
}

@media (max-width: 900px) {
    .checkout_sheet {
        position: fixed;
        inset: 0;
        z-index: 10000;
        display: block;
    }

    .checkout_sheet[hidden] {
        display: none;
    }

    .checkout_sheet__backdrop {
        position: absolute;
        inset: 0;
        background: rgba(15, 23, 42, 0.55);
    }

    .checkout_sheet__panel {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        display: flex;
        flex-direction: column;
        max-height: 94vh;
        overflow: hidden;
        background: #fff;
        border-radius: 18px 18px 0 0;
        box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.28);
        animation: checkoutSheetUp 0.2s ease;
    }

    .checkout_sheet__head {
        display: flex;
        flex: 0 0 auto;
        align-items: center;
        justify-content: space-between;
        padding: 12px 16px;
        border-bottom: 1px solid #eef2f7;
    }

    .checkout_sheet__title {
        margin: 0;
        color: #1f2430;
        font-size: 16px;
        font-weight: 700;
    }

    .checkout_sheet__close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        padding: 0;
        border: 0;
        border-radius: 10px;
        background: #f1f5f9;
        color: #1f2430;
        font: inherit;
        font-size: 22px;
        line-height: 1;
        cursor: pointer;
    }

    .checkout_sheet__close:hover {
        background: #e2e8f0;
    }

    .checkout_sheet__body {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    #checkout_sheet #pay_panel {
        width: 100%;
        min-width: 0;
        max-width: none;
        margin: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    #checkout_sheet #pay_panel .add_card__head {
        display: none;
    }

    body.checkout_sheet_open {
        overflow: hidden;
    }
}

@keyframes checkoutSheetUp {
    from {
        opacity: 0.6;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 900px) {
    #checkout_sheet #pay_panel .add_card__body {
        padding: 16px;
    }

    #checkout_sheet .notice {
        margin-bottom: 12px;
    }

    #checkout_sheet #payment-element {
        margin: 10px 0 14px;
    }
}

@media (max-width: 900px) {
    #checkout_sheet #payment-form,
    #checkout_sheet #checkout_real,
    #checkout_sheet #checkoutbox {
        width: 100%;
        max-width: none;
        margin: 0;
    }
}

/* Checkout loading state replaces the old placeholder skeleton. */
.checkout_loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 34px 16px;
    color: #64748b;
    font-size: 13.5px;
    font-weight: 600;
}

.checkout_loading[hidden] {
    display: none;
}

.checkout_loading__spinner {
    width: 22px;
    height: 22px;
    border: 3px solid #e2e8f0;
    border-top-color: #2f6b4f;
    border-radius: 50%;
    animation: checkoutSpin 0.8s linear infinite;
}

.checkout_placeholder__btn[hidden] {
    display: none;
}

@keyframes checkoutSpin {
    to { transform: rotate(360deg); }
}

/* Wide desktop: products on the left, a sticky checkout rail on the right. */
.add_layout {
    display: block;
}

@media (min-width: 1100px) {
    .add_layout {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
        align-items: start;
    }

    .add_layout .add_grid {
        grid-template-columns: 1fr;
    }

    .add_layout #pay_panel {
        position: sticky;
        top: 20px;
        width: 100%;
        min-width: 0;
        max-width: none;
        margin: 0;
    }
}

@media (min-width: 1100px) {
    .add_layout #pay_panel {
        max-height: calc(100vh - 40px);
        overflow-y: auto;
    }
}

/* Wide desktop: one container, dark products column and light checkout column. */
@media (min-width: 1100px) {
    .add_layout {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0;
        align-items: start;
        background: #f8fafc;
        border-radius: 18px;
        box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
    }

    .add_layout .add_grid {
        grid-template-columns: 1fr;
        align-self: stretch;
        padding: 24px;
        background: #2f2d3d;
        border-radius: 18px 0 0 18px;
    }

    .add_layout #pay_panel {
        position: sticky;
        top: 20px;
        width: 100%;
        min-width: 0;
        max-width: none;
        margin: 0;
        background: transparent;
        border: 0;
        border-radius: 0 18px 18px 0;
        box-shadow: none;
        max-height: calc(100vh - 40px);
        overflow-y: auto;
    }

    .add_layout #pay_panel .add_card__body {
        padding: 24px;
    }
}

/* Refined product cards: thin colour accent instead of a full coloured header. */
.add_card--pack,
.add_card--sub {
    position: relative;
    overflow: visible;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.10);
    transition: box-shadow 0.18s ease, border-color 0.18s ease;
}

.add_card--pack::before,
.add_card--sub::before {
    content: "";
    display: block;
    height: 4px;
    border-radius: 16px 16px 0 0;
    background: #c48389;
}

.add_card--sub::before {
    background: #6f9d7e;
}

.add_card--sub.add_card--manage::before {
    background: #4a6699;
}

.add_card--pack .add_card__head,
.add_card--sub .add_card__head,
.add_card--sub.add_card--manage .add_card__head {
    padding: 20px 22px 0;
    background: none;
    color: #1f2430;
}

.add_card__eyebrow {
    display: inline-flex;
    align-items: center;
    margin-bottom: 8px;
    padding: 3px 9px;
    border-radius: 999px;
    background: #f7e8ea;
    color: #8f3f49;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: none;
    opacity: 1;
}

.add_card--sub .add_card__eyebrow {
    background: #e8f2eb;
    color: #2f6b4f;
}

.add_card--sub.add_card--manage .add_card__eyebrow {
    background: #e8eef7;
    color: #2f4a6d;
}

.add_card__title {
    font-size: 22px;
    letter-spacing: -0.01em;
}

.add_card--pack .add_card__body,
.add_card--sub .add_card__body {
    padding: 18px 22px 22px;
}

.add_card__body .add_price {
    margin-top: 2px;
}

.add_price__amount {
    color: #1f2430;
    font-size: 36px;
}

.add_price__unit {
    color: #7c8799;
    font-size: 12.5px;
}

.add_card__meta {
    color: #475569;
    font-size: 13.5px;
}

.add_card__body .add_field {
    margin-top: 18px;
    color: #7c8799;
}

.add_card__body .add_select {
    background: #f8fafc;
    border-color: #e2e8f0;
    border-radius: 12px;
    min-height: 50px;
}

.add_card__body .add_select:hover {
    border-color: #cbd5e1;
}

.add_card.is-selected {
    border-color: #2f6b4f;
    box-shadow: 0 0 0 3px rgba(91, 140, 106, 0.25), 0 12px 30px rgba(15, 23, 42, 0.12);
}

/* Icons, deeper shadows and a greyed-out checkout preview. */
.add_card--pack::before,
.add_card--sub::before {
    content: none;
    display: none;
}

.add_card__heading {
    display: flex;
    align-items: center;
    gap: 10px;
}

.add_card__icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #f7e8ea;
    color: #8f3f49;
}

.add_card--sub .add_card__icon {
    background: #e8f2eb;
    color: #2f6b4f;
}

.add_card--sub.add_card--manage .add_card__icon {
    background: #e8eef7;
    color: #2f4a6d;
}

.add_card--pack,
.add_card--sub {
    box-shadow: 0 24px 48px -24px rgba(15, 23, 42, 0.65), 0 10px 22px -12px rgba(15, 23, 42, 0.35);
}

@media (min-width: 1100px) {
    .add_layout {
        box-shadow: 0 44px 90px -36px rgba(15, 23, 42, 0.7), 0 20px 40px -22px rgba(15, 23, 42, 0.45);
    }
}

.checkout_ghost {
    display: grid;
    gap: 12px;
    opacity: 0.85;
}

.checkout_ghost[hidden] {
    display: none;
}

.checkout_ghost__hint {
    margin: 0 0 4px;
    color: #94a3b8;
    font-size: 12.5px;
    font-weight: 600;
}

.checkout_ghost__field {
    display: grid;
    gap: 6px;
}

.checkout_ghost__field > span:first-child {
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.checkout_ghost__bar {
    display: block;
    height: 42px;
    background: #eef2f7;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.checkout_ghost__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.checkout_ghost__btn {
    width: 100%;
    height: 46px;
    border: 0;
    border-radius: 10px;
    background: #e2e8f0;
    color: #94a3b8;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: default;
}

@media (max-width: 900px) {
    body:not(.checkout_sheet_open) #pay_panel:not(.add_pay--guest) {
        display: none;
    }
}

/* Keep an open quantity menu above the following card. */
.add_card--pack,
.add_card--sub {
    z-index: 1;
}

.add_card--pack:hover,
.add_card--sub:hover,
.add_card:focus-within {
    z-index: 20;
}

.qty_dropdown__menu {
    z-index: 30;
}

.checkout_empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 44px 16px;
    text-align: center;
}

.checkout_empty[hidden] {
    display: none;
}

.checkout_empty__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: #eef2f7;
    border-radius: 18px;
    color: #94a3b8;
}

.checkout_empty__icon svg {
    width: 30px;
    height: 30px;
}

.checkout_empty__text {
    max-width: 250px;
    margin: 0;
    color: #94a3b8;
    font-size: 13px;
    line-height: 1.5;
}

.add_card.has-open-menu {
    z-index: 30;
}

/* Chosen quantity total shown inside the product card. */
.add_total {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 16px 0 0;
    padding-top: 14px;
    border-top: 1px solid #eef2f7;
}

.add_total[hidden] {
    display: none;
}

.add_total strong {
    color: #1f2430;
    font-size: 20px;
    font-weight: 700;
}

.add_total span {
    color: #7c8799;
    font-size: 12.5px;
    font-weight: 600;
}

/* Compact wide-desktop layout so the whole checkout fits in one screen. */
@media (min-width: 1100px) {
    .add_page {
        padding-top: 14px;
        padding-bottom: 16px;
    }

    .add_head {
        margin-bottom: 14px;
    }

    .add_head__title {
        font-size: 24px;
    }

    .add_layout .add_grid {
        gap: 16px;
        padding: 16px;
    }

    .add_card--pack .add_card__head,
    .add_card--sub .add_card__head,
    .add_card--sub.add_card--manage .add_card__head {
        padding: 14px 18px 0;
    }

    .add_card__title {
        font-size: 20px;
    }

    .add_card--pack .add_card__body,
    .add_card--sub .add_card__body {
        padding: 12px 18px 16px;
    }

    .add_price__amount {
        font-size: 30px;
    }

    .add_price__unit {
        font-size: 12px;
    }

    .add_card__meta {
        margin-top: 4px;
        font-size: 13px;
    }

    .add_card__text {
        margin: 6px 0 12px;
        font-size: 13px;
    }

    .add_card__body .add_field {
        margin-top: 12px;
        margin-bottom: 6px;
    }

    .add_card__body .add_select {
        min-height: 44px;
        padding: 10px 12px;
    }

    .add_total {
        margin-top: 12px;
        padding-top: 10px;
    }

    .add_total strong {
        font-size: 18px;
    }

    .add_layout #pay_panel .add_card__body {
        padding: 18px;
    }

    .add_legal {
        margin-top: 14px;
    }
}

/* Softer hover: a light grey tint, no border or shadow change. */
.add_card--pack,
.add_card--sub {
    transition: background-color 0.18s ease;
}

.add_card--pack:hover,
.add_card--sub:hover {
    background: #f6f7f9;
}

/* Make the quantity selector read as the main action on each card. */
.add_card__body .add_field {
    margin-bottom: 8px;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.add_card__body .add_select {
    background: #fff;
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    color: #1f2430;
    font-size: 17px;
    font-weight: 600;
    box-shadow: 0 2px 7px rgba(15, 23, 42, 0.07);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.add_card__body .add_select:hover {
    background: #fff;
    border-color: #94a3b8;
}

.add_card__body .add_select:focus {
    border-color: #2f6b4f;
    box-shadow: 0 0 0 3px rgba(47, 107, 79, 0.16);
}

.qty_dropdown__arrow {
    width: 8px;
    height: 8px;
    margin-top: -4px;
    border-right-width: 2px;
    border-bottom-width: 2px;
    border-color: #475569;
}

/* Refined palette: navy pane, white checkout, one green CTA. */
@media (min-width: 1100px) {
    .add_layout {
        background: #fff;
        box-shadow: 0 28px 60px -30px rgba(15, 23, 42, 0.45), 0 12px 26px -18px rgba(15, 23, 42, 0.28);
    }

    .add_layout .add_grid {
        background: #132a3c;
    }

    .add_layout #pay_panel {
        background: #fff;
        border: 0;
        border-radius: 0 18px 18px 0;
        box-shadow: none;
    }
}

.add_card--pack,
.add_card--sub {
    box-shadow: 0 16px 34px -20px rgba(15, 23, 42, 0.45), 0 6px 16px -10px rgba(15, 23, 42, 0.25);
}

.add_card--pack .add_card__icon,
.add_card--pack .add_card__eyebrow {
    background: #f6e7e9;
    color: #a04c55;
}

.add_card--sub .add_card__icon,
.add_card--sub .add_card__eyebrow {
    background: #e7f1ea;
    color: #2f6b4f;
}

.add_page #submit {
    background: #2f6b4f;
}

.add_page #submit:hover {
    background: #3f6b4e;
}

.checkout_placeholder__btn:not([disabled]) {
    background: #2f6b4f;
}

.checkout_placeholder__btn:not([disabled]):hover {
    background: #3f6b4e;
}

/* Only one product can be bought at a time: once a quantity is chosen in one
   card, the other card is greyed out until the selection is switched back. */
.add_card {
    transition: background-color 0.18s ease, opacity 0.18s ease,
        filter 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.add_card.is-disabled {
    opacity: 0.5;
    filter: grayscale(0.65);
    background: #f3f5f7;
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: none;
}

/* The greyed card is still selectable: hovering it, or opening its quantity
   menu, brings it back so the student can switch products. */
.add_card.is-disabled:hover,
.add_card.is-disabled:focus-within,
.add_card.is-disabled.has-open-menu {
    opacity: 1;
    filter: none;
    background: #fff;
    border-color: rgba(15, 23, 42, 0.10);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.10);
}
