/* Commerce V2.9 — cart, checkout, success */

.commerce-page .container {
    max-width: 1140px;
}

/* Form controls — global reset strips input padding; scope to cart/checkout only */
.commerce-page input.form-control,
.commerce-page select.form-control,
.commerce-page textarea.form-control {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-family: inherit;
    line-height: 1.4;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.commerce-page .form-control:focus {
    outline: none;
    border-color: var(--color-primary, #0094d9);
    box-shadow: 0 0 0 3px rgba(0, 148, 217, 0.12);
}

.commerce-page textarea.form-control {
    min-height: auto;
    resize: vertical;
}

.commerce-page select.form-control {
    appearance: auto;
}

.commerce-page .commerce-domain-step__input label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
}

.commerce-hero__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-align: center;
}

.commerce-hero--flow .commerce-hero__content {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
}

.commerce-hero--flow .commerce-hero__content h1,
.commerce-hero--flow .commerce-hero__content p {
    text-align: center;
}

.commerce-hero--flow .commerce-hero__badge {
    margin-top: 0.75rem;
}

.commerce-hero__actions {
    display: flex;
    justify-content: center;
    width: 100%;
}

.commerce-hero__back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 42px;
    padding: 0.55rem 1.15rem;
    border-radius: 10px;
    background: #ffffff;
    color: #0c4a6e;
    border: 2px solid rgba(255, 255, 255, 0.95);
    font-weight: 700;
    font-size: 0.92rem;
    line-height: 1.2;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.commerce-hero__back:hover {
    background: #f0f9ff;
    color: #0369a1;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
}

.commerce-hero--centered .commerce-hero__inner {
    justify-content: center;
}

.commerce-hero__badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: rgba(0, 148, 217, 0.12);
    color: var(--color-primary, #0094d9);
    font-size: 0.85rem;
    font-weight: 700;
}

.commerce-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 1.5rem;
    align-items: start;
}

.commerce-main {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.card-surface--inset {
    background: #f8fafc;
    border: 1px solid #e8eef5;
    box-shadow: none;
}

/* Alerts */
.commerce-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.commerce-alert p {
    margin: 0;
}

.commerce-alert--error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.commerce-alert--success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.commerce-alert__link {
    font-size: 0.88rem;
    font-weight: 700;
    color: #047857;
    text-decoration: underline;
    white-space: nowrap;
}

.commerce-alert__link:hover {
    color: #065f46;
}

.commerce-alert--warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.commerce-alert--warning i {
    margin-top: 0.15rem;
}

/* Product card — spec layout */
.commerce-product {
    padding: 0;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: #fff;
}

.commerce-spec {
    padding: 1.1rem 1.35rem 0.35rem;
}

.commerce-spec__row {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 1rem 1.25rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid #f1f5f9;
    align-items: start;
}

.commerce-spec__row:last-child {
    border-bottom: none;
}

.commerce-spec__row--total {
    border-top: 1px solid #e8eef5;
    margin-top: 0.15rem;
    padding-top: 1rem;
}

.commerce-spec__label {
    font-size: 0.92rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.45;
}

.commerce-spec__value {
    color: #475569;
    font-size: 0.94rem;
    line-height: 1.5;
    min-width: 0;
}

.commerce-spec__value .commerce-product__title {
    display: block;
    margin: 0.15rem 0 0;
    font-size: 1.05rem;
    color: #0f172a;
}

.commerce-spec__text {
    color: #475569;
}

.commerce-spec__text--muted {
    color: #94a3b8;
    font-style: italic;
}

.commerce-spec__meta {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.82rem;
    color: #94a3b8;
}

.commerce-spec__price {
    color: #0f172a;
    font-size: 1rem;
}

.commerce-spec__price--total {
    font-size: 1.12rem;
    color: var(--color-primary, #0094d9);
}

.commerce-inline-alert {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0 1.35rem 1rem;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    font-size: 0.84rem;
    line-height: 1.45;
}

.commerce-inline-alert i {
    flex-shrink: 0;
    font-size: 0.9rem;
}

.commerce-inline-alert--page {
    margin: 0;
    padding: 0.85rem 1rem;
    flex-wrap: wrap;
}

.commerce-product__category {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-primary, #0094d9);
    margin-bottom: 0.35rem;
}

.commerce-product__title {
    margin: 0 0 0.4rem;
    font-size: 1.35rem;
    line-height: 1.25;
}

.commerce-product__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    color: #64748b;
    font-size: 0.9rem;
}

.commerce-product__meta i {
    margin-right: 0.35rem;
    opacity: 0.85;
}

.commerce-product__pricebox {
    text-align: right;
    flex-shrink: 0;
}

.commerce-product__price {
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}

.commerce-product__price-note {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.78rem;
    color: #94a3b8;
}

.commerce-product__footer {
    padding: 0.75rem 1.35rem 1rem;
    border-top: 1px solid #eef2f7;
    display: flex;
    justify-content: flex-end;
}

.commerce-remove-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.7rem;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 0.88rem;
    cursor: pointer;
    border-radius: 8px;
    transition: color 0.15s, background 0.15s;
}

.commerce-remove-btn:hover {
    color: #dc2626;
    background: #fef2f2;
}

/* Billing cycle */
.commerce-domain-step {
    margin: 0 1.35rem 1rem;
    padding: 1rem 1.1rem;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e8eef5;
}

.commerce-cycle__head h3,
.commerce-domain-step__head h3 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
}

.commerce-cycle__head p,
.commerce-domain-step__head p {
    margin: 0 0 0.85rem;
    color: #64748b;
    font-size: 0.88rem;
}

.commerce-select-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
}

.commerce-select {
    min-height: 46px;
}

.commerce-cycle__form--inline {
    margin: 0;
    max-width: 100%;
}

.commerce-cycle__form--inline .commerce-select {
    width: 100%;
    max-width: 420px;
}

.commerce-domain-attached {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.85rem;
    align-items: center;
    margin: 0 1.35rem 1rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
}

.commerce-domain-attached__icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: #e0f2fe;
    color: var(--color-primary, #0094d9);
}

.commerce-domain-attached__label {
    display: block;
    font-size: 0.78rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
}

.commerce-domain-attached__name {
    display: block;
    font-size: 1.02rem;
}

.commerce-domain-attached__type {
    display: block;
    font-size: 0.85rem;
    color: #64748b;
}

.commerce-domain-attached__price {
    font-weight: 700;
    color: #0f172a;
}

/* Domain step / radio cards */
.commerce-radio-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.commerce-radio-card {
    position: relative;
    cursor: pointer;
}

.commerce-radio-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.commerce-radio-card__box {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    height: 100%;
    padding: 0.85rem 0.9rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.commerce-radio-card__title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
}

.commerce-radio-card__hint {
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.4;
}

.commerce-radio-card input:checked + .commerce-radio-card__box,
.commerce-radio-card__box.is-selected {
    border-color: var(--color-primary, #0094d9);
    background: #f0f9ff;
    box-shadow: 0 0 0 3px rgba(0, 148, 217, 0.12);
}

.commerce-radio-card input:focus-visible + .commerce-radio-card__box {
    outline: 2px solid var(--color-primary, #0094d9);
    outline-offset: 2px;
}

.commerce-domain-step__input {
    margin-bottom: 0.85rem;
    max-width: none;
}

.commerce-domain-step__input .form-control {
    min-height: 48px;
}

.commerce-domain-step__transfer[hidden] {
    display: none !important;
}

.commerce-domain-step__submit {
    min-width: 160px;
}

/* Sidebar summary */
.commerce-sidebar {
    padding: 1.35rem 1.4rem;
    position: sticky;
    top: 1rem;
    border: 1px solid #e6edf5;
}

.commerce-sidebar__title {
    margin: 0 0 1rem;
    font-size: 1.15rem;
}

.commerce-summary {
    margin: 0 0 1.1rem;
}

.commerce-summary-breakdown {
    display: grid;
    gap: 0.85rem;
    margin-bottom: 0.35rem;
}

.commerce-summary-breakdown__group {
    display: grid;
    gap: 0;
}

.commerce-summary-breakdown__title {
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-bottom: 0.35rem;
}

.commerce-summary-divider {
    height: 1px;
    background: #e8eef5;
    margin: 0.85rem 0;
}

.commerce-summary__meta {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: #94a3b8;
}

.commerce-summary__placeholder {
    color: #94a3b8;
    font-style: italic;
}

.commerce-summary__row--muted dd {
    color: #94a3b8;
}

.commerce-summary__row dd small {
    display: block;
}

.commerce-summary__row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.commerce-summary__row dt,
.commerce-summary__row dd {
    margin: 0;
}

.commerce-summary__row dt {
    color: #64748b;
    font-weight: 500;
    font-size: 0.92rem;
}

.commerce-summary__row dd {
    font-weight: 700;
    color: #0f172a;
    text-align: right;
}

.commerce-summary__row--discount dd {
    color: #16a34a;
}

.commerce-summary__row--total {
    border-bottom: none;
    padding-top: 0.85rem;
    margin-top: 0.15rem;
}

.commerce-summary__row--total dt,
.commerce-summary__row--total dd {
    font-size: 1.05rem;
    font-weight: 800;
}

.commerce-coupon-block {
    margin-bottom: 1.25rem;
}

.commerce-coupon {
    margin: 0;
}

.commerce-coupon-remove {
    margin-top: 0.5rem;
}

.commerce-coupon__label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.88rem;
    font-weight: 700;
    color: #334155;
}

.commerce-coupon__row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
}

.commerce-coupon__row .form-control {
    min-height: 44px;
    text-transform: uppercase;
}

.commerce-sidebar__actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 0.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid #f1f5f9;
}

.commerce-clear-btn {
    color: #64748b;
}

.commerce-payment-note {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.5;
    margin: 0 0 1rem;
    padding: 0.75rem 0.85rem;
    background: #f8fafc;
    border-radius: 10px;
}

.commerce-confirm-form {
    margin: 0;
}

.commerce-confirm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 700;
    min-height: 50px;
}

.commerce-confirm-note {
    margin: 0.55rem 0 0;
    font-size: 0.78rem;
    color: #94a3b8;
    text-align: center;
    line-height: 1.45;
}

.btn-lg {
    padding: 0.85rem 1.1rem;
    font-size: 1rem;
}

.btn.is-disabled,
a.btn.is-disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Checkout details */
.commerce-features {
    padding: 0 1.5rem 1rem;
}

.commerce-features__title {
    margin: 0 0 0.75rem;
    font-size: 0.92rem;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.commerce-features__grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem 1rem;
}

.commerce-features__grid li {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    font-size: 0.88rem;
    color: #334155;
    line-height: 1.4;
}

.commerce-features__grid i {
    color: #16a34a;
    margin-top: 0.12rem;
    flex-shrink: 0;
    font-size: 0.78rem;
}

.commerce-spec__row--features .commerce-features__grid {
    grid-template-columns: 1fr;
    gap: 0.35rem;
}

.commerce-checkout-details {
    margin: 0 1.5rem 1.25rem;
    padding: 1rem 1.1rem;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e8eef5;
}

.commerce-checkout-details__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid #e8eef5;
}

.commerce-checkout-details__row:last-child {
    border-bottom: none;
}

.commerce-checkout-details__label {
    font-size: 0.88rem;
    color: #64748b;
    font-weight: 600;
    flex-shrink: 0;
}

.commerce-checkout-details__value {
    text-align: right;
    font-weight: 600;
    color: #0f172a;
    min-width: 0;
}

.commerce-checkout-details__value em {
    display: block;
    font-style: normal;
    font-size: 0.82rem;
    color: #64748b;
    font-weight: 500;
}

.commerce-checkout-details__value--warn {
    color: #b45309;
}

.commerce-customer-card {
    padding: 1.25rem 1.5rem;
}

.commerce-customer-card h2 {
    margin: 0 0 1rem;
    font-size: 1.1rem;
}

.commerce-customer-card__lead {
    color: #64748b;
    margin: 0 0 1rem;
}

.commerce-customer-info {
    display: grid;
    gap: 0.75rem;
    margin: 0;
}

.commerce-customer-info > div {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 0.5rem;
}

.commerce-customer-info dt {
    margin: 0;
    color: #64748b;
    font-weight: 500;
}

.commerce-customer-info dd {
    margin: 0;
    font-weight: 600;
}

.commerce-auth-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Empty + success */
.commerce-empty {
    text-align: center;
    padding: 3.5rem 1.5rem;
}

.commerce-empty__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: #f1f5f9;
    color: #94a3b8;
    font-size: 1.5rem;
}

.commerce-success-page {
    padding-top: 2rem;
    padding-bottom: 3rem;
}

.commerce-success {
    text-align: center;
    padding: 2.5rem 1.75rem;
}

.commerce-success__icon {
    font-size: 3rem;
    color: #16a34a;
    margin-bottom: 0.75rem;
}

.commerce-success h1 {
    margin: 0 0 0.5rem;
}

.commerce-success__lead {
    color: #64748b;
    max-width: 520px;
    margin: 0 auto 1.5rem;
    line-height: 1.6;
}

.commerce-success__details {
    max-width: 460px;
    margin: 0 auto 1.75rem;
    text-align: left;
    display: grid;
    gap: 0.65rem;
}

.commerce-success__details > div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.commerce-success__details dt {
    margin: 0;
    color: #64748b;
}

.commerce-success__details dd {
    margin: 0;
    font-weight: 600;
    text-align: right;
}

.commerce-success__status {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #fff7ed;
    color: #c2410c;
    font-size: 0.88rem;
}

.commerce-success__actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    max-width: 320px;
    margin: 0 auto;
}

.header-utility-icons {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.header-cart-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    color: #fff;
    text-decoration: none;
    flex-shrink: 0;
}

.header-cart-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

.header-cart-link__badge {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--color-primary, #00b4ff);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 20px;
    text-align: center;
    box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.92);
    pointer-events: none;
}

.commerce-select.is-loading {
    opacity: 0.65;
    cursor: wait;
}

/* Standalone domain card + perks */
.commerce-domain-card__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(220px, 0.9fr);
    align-items: stretch;
}

.commerce-domain-card__main {
    min-width: 0;
}

.commerce-domain-perks {
    border-left: 1px solid #eef2f7;
    background: linear-gradient(180deg, #f8fbff 0%, #fff 100%);
    padding: 1rem 1.1rem;
}

.commerce-domain-perks__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.commerce-domain-perk {
    display: flex;
    gap: 0.55rem;
    align-items: flex-start;
    padding: 0.65rem 0.7rem;
    border: 1px solid #e8eef5;
    border-radius: 10px;
    background: #fff;
    min-height: 100%;
}

.commerce-domain-perk__icon {
    flex: 0 0 auto;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 148, 217, 0.1);
    color: var(--color-primary, #0094d9);
    font-size: 0.85rem;
}

.commerce-domain-perk__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.commerce-domain-perk__title {
    display: block;
    font-size: 0.78rem;
    line-height: 1.35;
    color: #0f172a;
}

.commerce-domain-perk__desc {
    display: block;
    font-size: 0.72rem;
    line-height: 1.4;
    color: #64748b;
}

@media (max-width: 960px) {
    .commerce-layout {
        grid-template-columns: 1fr;
    }

    .commerce-sidebar {
        position: static;
    }

    .commerce-spec__row {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }

    .commerce-radio-grid {
        grid-template-columns: 1fr;
    }

    .commerce-features__grid {
        grid-template-columns: 1fr;
    }

    .commerce-customer-info > div {
        grid-template-columns: 1fr;
    }

    .commerce-alert--success {
        flex-direction: column;
        align-items: flex-start;
    }

    .commerce-domain-card__layout {
        grid-template-columns: 1fr;
    }

    .commerce-domain-perks {
        border-left: none;
        border-top: 1px solid #eef2f7;
        padding: 1rem 1.1rem 1.15rem;
    }

    .commerce-domain-perks__grid {
        grid-template-columns: 1fr;
    }
}
