/* ==========================================================================
   Baby World — shared purchase / checkout layout
   Used by the ticket and membership checkouts so every purchase on the site
   looks and behaves the same way. Prefixed .co- to stay clear of the older
   shop checkout.css.
   ========================================================================== */

.co-page {
    --co-ink: #1d2433;
    --co-muted: #6b7789;
    --co-line: #e6e9ef;
    --co-bg: #f7f8fb;
    --co-brand: var(--primary-color, #f54480);
    --co-brand-2: #7b2ff7;

    background: var(--co-bg);
    padding: 34px 0 70px;
}

.co-wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ---------- header ---------- */
.co-head {
    margin-bottom: 22px;
}

.co-head h1 {
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 800;
    letter-spacing: -.6px;
    color: var(--co-ink);
    margin: 0 0 6px;
}

.co-head p {
    color: var(--co-muted);
    font-size: 15px;
    margin: 0;
}

.co-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--co-muted);
    text-decoration: none;
    margin-bottom: 12px;
}

.co-back:hover {
    color: var(--co-brand);
}

/* ---------- two column shell ---------- */
.co-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 372px;
    gap: 24px;
    align-items: start;
}

/* ---------- cards ---------- */
.co-card {
    background: #fff;
    border: 1px solid var(--co-line);
    border-radius: 14px;
    padding: 22px 24px;
    margin-bottom: 18px;
    box-shadow: 0 1px 2px rgba(29, 36, 51, .04);
}

.co-card:last-child {
    margin-bottom: 0;
}

.co-card-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
}

.co-step {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--co-brand), var(--co-brand-2));
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.co-card-head h2 {
    font-size: 17px;
    font-weight: 700;
    color: var(--co-ink);
    margin: 0;
    letter-spacing: -.2px;
    line-height: 1.7;
}

.co-card-head .co-sub {
    display: block;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--co-muted);
    margin-top: -2px;
    line-height: 1.5;
}

/* ---------- fields ---------- */
.co-field {
    margin-bottom: 16px;
}

.co-field:last-child {
    margin-bottom: 0;
}

.co-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #3d4658;
    margin-bottom: 7px;
}

.co-field .req {
    color: var(--co-brand);
}

.co-page input[type="text"],
.co-page input[type="tel"],
.co-page input[type="email"],
.co-page input[type="date"],
.co-page select,
.co-page textarea {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--co-line);
    border-radius: 10px;
    background: #fcfdfe;
    padding: 11px 14px;
    font-size: 14.5px;
    color: var(--co-ink);
    font-family: inherit;
    transition: border-color .14s, box-shadow .14s, background .14s;
}

.co-page textarea {
    min-height: 78px;
    resize: vertical;
}

.co-page input:focus,
.co-page select:focus,
.co-page textarea:focus {
    outline: none;
    background: #fff;
    border-color: var(--co-brand);
    box-shadow: 0 0 0 3px rgba(245, 68, 128, .12);
}

.co-field .hint {
    display: block;
    font-size: 12px;
    color: var(--co-muted);
    margin-top: 5px;
}

.co-err {
    display: block;
    font-size: 12.5px;
    color: #d92b53;
    margin-top: 5px;
}

.co-page .is-invalid {
    border-color: #df3554 !important;
    background: #fffafb !important;
}

.co-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ---------- people steppers ---------- */
.co-people {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.co-person {
    border: 1px solid var(--co-line);
    border-radius: 12px;
    padding: 14px;
    background: #fcfdfe;
}

.co-person .who {
    font-size: 14px;
    font-weight: 700;
    color: var(--co-ink);
}

.co-person .fee {
    font-size: 12.5px;
    color: var(--co-muted);
    margin-bottom: 10px;
}

.co-stepper {
    display: flex;
    align-items: center;
    border: 1px solid var(--co-line);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    width: fit-content;
}

.co-stepper button {
    width: 38px;
    height: 38px;
    border: 0;
    background: #fff;
    color: var(--co-ink);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: background .12s, color .12s;
}

.co-stepper button:hover:not(:disabled) {
    background: #fdeaf1;
    color: var(--co-brand);
}

.co-stepper button:disabled {
    color: #c9d0da;
    cursor: not-allowed;
}

.co-page .co-stepper input {
    width: 52px;
    min-height: 38px;
    height: 38px;
    border: 0;
    border-left: 1px solid var(--co-line);
    border-right: 1px solid var(--co-line);
    border-radius: 0;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: var(--co-ink);
    background: #fff;
    padding: 0;
    -moz-appearance: textfield;
}

.co-page .co-stepper input::-webkit-outer-spin-button,
.co-page .co-stepper input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.co-page .co-stepper input:focus {
    box-shadow: none;
    border-color: var(--co-line);
}

/* ---------- selected items ---------- */
.co-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.co-item {
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1px solid var(--co-line);
    border-radius: 12px;
    padding: 12px;
    background: #fcfdfe;
}

.co-item-thumb {
    flex: 0 0 60px;
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
    background: #f1f3f7;
}

.co-item-body {
    flex: 1 1 auto;
    min-width: 0;
}

.co-item-name {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--co-ink);
    line-height: 1.3;
    margin-bottom: 3px;
    word-break: break-word;
}

.co-item-meta {
    font-size: 12.5px;
    color: var(--co-muted);
}

.co-item-meta b {
    color: var(--co-brand);
}

.co-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.co-item-remove {
    border: 0;
    background: transparent;
    color: #b6bdc9;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    padding: 6px 8px;
    border-radius: 8px;
}

.co-item-remove:hover {
    color: #df3554;
    background: #fdecef;
}

.co-empty {
    text-align: center;
    padding: 26px 14px;
    color: var(--co-muted);
    font-size: 14px;
    border: 1px dashed var(--co-line);
    border-radius: 12px;
    background: #fcfdfe;
}

/* add-more picker */
.co-add {
    margin-top: 14px;
    padding-top: 16px;
    border-top: 1px dashed var(--co-line);
}

.co-add-row {
    display: flex;
    gap: 10px;
}

.co-add-row select {
    flex: 1 1 auto;
    min-width: 0;
}

.co-add-btn {
    flex: 0 0 auto;
    border: 1px solid var(--co-brand);
    background: #fff;
    color: var(--co-brand);
    font-weight: 700;
    font-size: 14px;
    border-radius: 10px;
    padding: 0 18px;
    min-height: 46px;
    cursor: pointer;
    transition: background .14s, color .14s;
    white-space: nowrap;
}

.co-add-btn:hover {
    background: var(--co-brand);
    color: #fff;
}

/* ---------- payment options ---------- */
.co-pay {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
}

.co-pay-opt {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1.5px solid var(--co-line);
    border-radius: 12px;
    padding: 14px 16px;
    cursor: pointer;
    background: #fcfdfe;
    margin: 0;
    transition: border-color .14s, background .14s, box-shadow .14s;
}

.co-pay-opt:hover {
    border-color: #cdd4e0;
}

.co-pay-opt input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.co-pay-opt .mark {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #cbd3de;
    position: relative;
    transition: border-color .14s;
}

.co-pay-opt input:checked ~ .mark {
    border-color: var(--co-brand);
}

.co-pay-opt input:checked ~ .mark::after {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: var(--co-brand);
}

.co-pay-opt.is-picked {
    border-color: var(--co-brand);
    background: #fff7fa;
    box-shadow: 0 0 0 3px rgba(245, 68, 128, .1);
}

.co-pay-opt .pay-name {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--co-ink);
}

.co-pay-opt .pay-note {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--co-muted);
    margin-top: 1px;
}

.co-notice {
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 13.5px;
    line-height: 1.55;
}

.co-notice.warn {
    background: #fff8ec;
    border: 1px solid #f5e0bd;
    color: #8a5b16;
}

.co-notice.error {
    background: #fdecef;
    border: 1px solid #f7c9d3;
    color: #b32744;
    margin-bottom: 18px;
}

/* ---------- summary ---------- */
.co-summary {
    position: sticky;
    top: 96px;
}

.co-summary .co-card {
    padding: 0;
    overflow: hidden;
}

.co-sum-head {
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--co-brand), var(--co-brand-2));
}

.co-sum-head h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.co-sum-body {
    padding: 18px 20px 20px;
}

.co-sum-line {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 8px 0;
    font-size: 14px;
    color: #4a5468;
}

.co-sum-line .lbl small {
    display: block;
    font-size: 12px;
    color: var(--co-muted);
}

.co-sum-line .val {
    font-weight: 600;
    color: var(--co-ink);
    white-space: nowrap;
}

.co-sum-group {
    border-top: 1px dashed var(--co-line);
    margin-top: 8px;
    padding-top: 8px;
}

.co-sum-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-top: 2px solid var(--co-ink);
    margin-top: 12px;
    padding-top: 14px;
}

.co-sum-total .lbl {
    font-size: 15px;
    font-weight: 700;
    color: var(--co-ink);
}

.co-sum-total .val {
    font-size: 26px;
    font-weight: 800;
    color: var(--co-brand);
    letter-spacing: -.5px;
}

.co-submit {
    width: 100%;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--co-brand), var(--co-brand-2));
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    padding: 15px;
    margin-top: 16px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(245, 68, 128, .3);
    transition: transform .12s, box-shadow .14s, opacity .14s;
}

.co-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(245, 68, 128, .36);
}

.co-submit:disabled {
    opacity: .55;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.co-trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 14px;
    font-size: 12.5px;
    color: var(--co-muted);
    text-align: center;
}

.co-trust i {
    color: #16b47f;
}

/* mobile running-total bar */
.co-bar {
    display: none;
}

/* ---------- responsive ---------- */
@media (max-width: 991px) {
    .co-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .co-summary {
        position: static;
    }

    .co-bar {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 60;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
        background: #fff;
        border-top: 1px solid var(--co-line);
        box-shadow: 0 -6px 20px rgba(29, 36, 51, .08);
    }

    .co-bar .amt {
        line-height: 1.2;
    }

    .co-bar .amt small {
        display: block;
        font-size: 11.5px;
        color: var(--co-muted);
    }

    .co-bar .amt b {
        font-size: 21px;
        color: var(--co-brand);
    }

    .co-bar button {
        flex: 0 0 auto;
        border: 0;
        border-radius: 11px;
        background: linear-gradient(135deg, var(--co-brand), var(--co-brand-2));
        color: #fff;
        font-weight: 700;
        font-size: 15px;
        padding: 13px 26px;
        cursor: pointer;
    }

    .co-bar button:disabled {
        opacity: .55;
    }

    .co-page {
        padding-bottom: 110px;
    }
}

@media (max-width: 575px) {
    .co-card {
        padding: 18px 16px;
    }

    .co-row,
    .co-people {
        grid-template-columns: 1fr;
    }

    .co-item-thumb {
        flex-basis: 48px;
        width: 48px;
        height: 48px;
    }

    .co-add-row {
        flex-direction: column;
    }
}
