/* x.ai-inspired cart page */

.cart-page {
    background-color: hsl(var(--background) / 1);
    font-family: var(--font-universal-sans);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    color: hsl(var(--foreground) / 1);
}

.cart-main {
    padding-top: 1.5rem;
    padding-bottom: 5rem;
}

@media screen and (min-width: 768px) {
    .cart-main {
        padding-top: 2.5rem;
    }
}

/* ── Hero (x.ai section pattern) ── */
.cart-hero {
    --font-cart-hero: var(--font-universal-sans);
    font-family: var(--font-cart-hero);
    text-align: center;
    margin-bottom: 2.5rem;
    padding: 0 0.5rem;
}

@media screen and (min-width: 768px) {
    .cart-hero {
        margin-bottom: 3.5rem;
    }
}

.cart-hero__eyebrow {
    margin: 0 0 0.75rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 500;
    color: hsl(var(--color-fog) / 1);
}

.cart-hero__title {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.05;
    font-weight: 700;
    letter-spacing: -0.04em;
    color: hsl(var(--foreground) / 1);
}

.cart-hero__subtitle {
    margin: 1rem auto 0;
    max-width: 28rem;
    font-size: 1.125rem;
    line-height: 1.75rem;
    font-weight: 400;
    color: hsl(var(--color-fog) / 1);
}

/* ── Tier grid ── */
.cart-tiers {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 1.25rem;
}

@media screen and (min-width: 820px) {
    .cart-tiers {
        gap: 1.5rem;
        align-items: stretch;
    }
}

.cart-page .plan-card-container {
    max-width: 22rem;
    width: 100%;
    flex: 1 1 18rem;
}

/* ── Cards (x.ai "Choose how to get started") ── */
.cart-page .plan-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: hsl(var(--background) / 1);
    border: 1px solid hsl(var(--border) / 1);
    border-radius: 1rem;
    box-shadow: none;
    padding: 1.75rem;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.cart-page .plan-card:hover {
    border-color: hsl(var(--color-pewter) / 1);
}

.cart-page .plan-card--featured {
    background-color: hsl(var(--color-ivory) / 1);
}

.cart-page .plan-card__header {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.cart-page .plan-card__name {
    margin: 0;
    font-size: 1.125rem;
    line-height: 1.5rem;
    font-weight: 550;
    color: hsl(var(--foreground) / 1);
}

.cart-page .plan-card__price {
    margin: 0.5rem 0 0;
    font-size: 2.5rem;
    line-height: 1;
    font-weight: 400;
    letter-spacing: -0.03em;
    color: hsl(var(--foreground) / 1);
}

.cart-page .plan-card__currency {
    font-size: 1.125rem;
    line-height: 1.5rem;
    font-weight: 500;
    color: hsl(var(--color-fog) / 1);
    margin-left: 0.125rem;
}

.cart-page .plan-card__tagline {
    margin: 0.75rem 0 0;
    font-size: 1rem;
    line-height: 1.5rem;
    font-weight: 500;
    color: hsl(var(--color-fog) / 1);
}

.cart-page .plan-card__divider {
    margin: 1.5rem 0;
    border: 0;
    border-top: 1px solid hsl(var(--border) / 1);
}

.cart-page .plan-card__body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    flex: 1;
    height: 100%;
}

.cart-page .plan-card__body > .cart-btn {
    margin-top: auto;
}

.cart-page .plan-card__features {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cart-page .plan-card__feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 500;
    color: hsl(var(--foreground) / 1);
}

.cart-page .plan-card .icon-circle {
    width: 2rem;
    height: 2rem;
    border: 1px solid hsl(var(--border) / 1);
    background-color: hsl(var(--background) / 1);
    border-radius: 9999px;
}

.cart-page .plan-card .icon-circle svg {
    width: 1.125rem;
    height: 1.125rem;
    color: hsl(var(--foreground) / 1);
}

/* ── Buttons (x.ai pill CTAs) ── */
.cart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 2.75rem;
    padding: 0.625rem 1.25rem;
    border-radius: 9999px;
    font-family: var(--font-universal-sans);
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition:
        color 0.15s cubic-bezier(0.4, 0, 0.2, 1),
        background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.15s cubic-bezier(0.4, 0, 0.2, 1),
        filter 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-tap-highlight-color: transparent;
}

.cart-btn--primary {
    border: 1px solid hsl(var(--primary) / 1);
    background-color: hsl(var(--primary) / 1);
    color: hsl(var(--background) / 1);
}

.cart-btn--primary:hover:not(:disabled) {
    filter: brightness(0.9);
}

.cart-btn--primary:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    filter: none;
}

.cart-btn--secondary {
    border: 1px solid hsl(var(--border) / 1);
    background-color: hsl(var(--background) / 1);
    color: hsl(var(--foreground) / 1);
}

.cart-btn--secondary:hover {
    background-color: hsl(var(--color-nimbus) / 1);
}

.cart-btn:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* ── Footer ── */
.cart-page .cart-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid hsl(var(--border) / 1);
    background-color: hsl(var(--background) / 1);
}

.cart-page .cart-footer__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: hsl(var(--color-fog) / 1);
}

@media screen and (min-width: 768px) {
    .cart-page .cart-footer__inner {
        flex-direction: row;
    }
}

.cart-page .cart-footer__link {
    color: hsl(var(--color-fog) / 1);
    text-decoration: none;
    transition: color 0.15s ease;
}

.cart-page .cart-footer__link:hover {
    color: hsl(var(--foreground) / 1);
}

@media (prefers-reduced-motion: reduce) {
    .cart-page .plan-card,
    .cart-btn {
        transition: none;
    }
}