/* FlowersStore — Cart page */

/* ── Page wrapper ───────────────────────────────────────── */

.flr-cart {
    min-height: 100vh;
    background: var(--theme-bg, #fbf6ee);
    padding-bottom: 5rem;
}

/* ── Page head ──────────────────────────────────────────── */

.flr-cart__page-head {
    padding-top: calc(var(--theme-header-height, 90px) + var(--theme-stripe-height, 40px) + 40px);
    padding-bottom: 8px;
}

.flr-cart__title {
    font-family: var(--theme-font-display, 'Playfair Display', serif);
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    font-weight: 500;
    color: var(--theme-text, #2a2320);
    letter-spacing: -0.01em;
    line-height: 1.08;
}

.flr-cart__subtitle {
    color: var(--theme-text-muted, #726a62);
    margin-top: 0.6rem;
    font-family: var(--theme-font-family, 'Jost', sans-serif);
    font-size: 1rem;
}

/* ── Two-column grid ────────────────────────────────────── */

.flr-cart__inner {
    display: grid;
    grid-template-columns: 1.6fr 0.9fr;
    gap: clamp(28px, 4vw, 56px);
    align-items: start;
    padding-top: 8px;
}

/* ── Empty state ────────────────────────────────────────── */

.flr-cart__empty {
    color: var(--theme-text-muted, #726a62);
    font-family: var(--theme-font-family, 'Jost', sans-serif);
    font-size: 1.05rem;
    padding: 2rem 0;
}

.flr-cart__empty a {
    color: var(--theme-primary);
    text-decoration: underline;
}

/* ── Cart item ──────────────────────────────────────────── */

.flr-cart-item {
    display: grid;
    grid-template-columns: 92px 1fr auto auto;
    gap: 18px;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid var(--theme-border, rgba(74, 58, 48, 0.14));
}

/* ── Item image ─────────────────────────────────────────── */

.flr-cart-item__img-wrap {
    display: block;
    width: 92px;
    height: 92px;
    overflow: hidden;
    border-radius: var(--theme-radius, 4px);
    background: var(--theme-surface-high, #fcf3f0);
    flex-shrink: 0;
}

.flr-cart-item__img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── Item info ──────────────────────────────────────────── */

.flr-cart-item__info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.flr-cart-item__name {
    font-family: var(--theme-font-display, 'Playfair Display', serif);
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--theme-text, #2a2320);
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.flr-cart-item__opts {
    font-family: var(--theme-font-family, 'Jost', sans-serif);
    font-size: 0.86rem;
    color: var(--theme-text-muted, #726a62);
    margin-top: 2px;
}

.flr-cart-item__msg {
    font-family: var(--theme-font-family, 'Jost', sans-serif);
    font-size: 0.86rem;
    color: var(--theme-mocha-deep, #8a6450);
    font-style: italic;
    margin-top: 4px;
}

.flr-cart-item__delivery-date {
    font-family: var(--theme-font-family, 'Jost', sans-serif);
    font-size: 0.82rem;
    color: var(--theme-primary, #6f4f3a);
    font-weight: 500;
    margin-top: 4px;
}

.flr-cart-item__unit-price-row {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-family: var(--theme-font-family, 'Jost', sans-serif);
    font-size: 0.86rem;
    color: var(--theme-text-muted, #726a62);
}

.flr-cart-item__unit-price {
    font-weight: 600;
    color: var(--theme-text, #2a2320);
}

.flr-cart-item__addons {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 5px;
}

.flr-cart-item__addon {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: var(--theme-font-family, 'Jost', sans-serif);
    font-size: 0.82rem;
    color: var(--theme-text-muted, #726a62);
}

.flr-cart-item__addon::before {
    content: '+';
    font-weight: 600;
    color: var(--theme-primary, #6f4f3a);
    font-size: 0.75rem;
    flex-shrink: 0;
}

.flr-cart-item__addon-price {
    font-weight: 600;
    color: var(--theme-mocha-deep, #8a6450);
}

.flr-cart-item__remove {
    display: inline-block;
    margin-top: 8px;
    font-family: var(--theme-font-family, 'Jost', sans-serif);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    color: var(--theme-text-muted, #726a62);
    text-decoration: underline;
    cursor: pointer;
    transition: color var(--dur, 320ms);
}

.flr-cart-item__remove:hover {
    color: #a6553f;
}

/* ── Quantity stepper ───────────────────────────────────── */

.flr-cart-item__qty {
    display: flex;
    align-items: center;
    border: 1px solid var(--theme-border, rgba(74, 58, 48, 0.14));
    border-radius: 999px;
    overflow: hidden;
    flex: none;
    align-self: center;
}

.flr-cart-item__qty button {
    width: 36px;
    padding-block: 10px;
    font-size: 1.1rem;
    color: var(--theme-primary);
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--dur, 320ms);
    line-height: 1;
}

.flr-cart-item__qty button:hover {
    background: var(--theme-surface-raised, #f7e9e4);
}

.flr-cart-item__qty-val {
    min-width: 32px;
    text-align: center;
    font-family: var(--theme-font-family, 'Jost', sans-serif);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--theme-text, #2a2320);
    user-select: none;
}

/* ── Line total ─────────────────────────────────────────── */

.flr-cart-item__price {
    font-family: var(--theme-font-family, 'Jost', sans-serif);
    font-weight: 600;
    font-size: 1rem;
    color: var(--theme-primary);
    white-space: nowrap;
    align-self: center;
}

/* ── Summary card ───────────────────────────────────────── */

.flr-cart__summary {
    background: #ffffff;
    border: 1px solid var(--theme-border, rgba(74, 58, 48, 0.14));
    border-radius: var(--theme-radius-lg, 10px);
    padding: clamp(24px, 3vw, 34px);
    position: sticky;
    top: calc(var(--theme-header-height, 90px) + 16px);
}

.flr-cart__summary-title {
    font-family: var(--theme-font-display, 'Playfair Display', serif);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--theme-text, #2a2320);
    margin: 0 0 1.2rem;
    letter-spacing: -0.01em;
}

/* ── Summary rows ───────────────────────────────────────── */

.flr-cart__row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 0.6em 0;
    font-family: var(--theme-font-family, 'Jost', sans-serif);
    font-size: 0.96rem;
    color: var(--theme-espresso, #4a3a30);
}

.flr-cart__row--total {
    border-top: 1px solid var(--theme-border, rgba(74, 58, 48, 0.14));
    margin-top: 0.4rem;
    padding-top: 1rem;
    font-family: var(--theme-font-display, 'Playfair Display', serif);
    font-size: 1.3rem;
    color: var(--theme-text, #2a2320);
}

.flr-cart__delivery-free {
    font-weight: 500;
    color: var(--theme-primary) !important;
}

/* ── Checkout button ────────────────────────────────────── */

.flr-cart__checkout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    margin-top: 1.2rem;
    padding: 1.05em 2.1em;
    appearance: none;
    -webkit-appearance: none;
    background: var(--theme-primary);
    color: var(--theme-surface, #fff9f2);
    font-family: var(--theme-font-family, 'Jost', sans-serif);
    font-weight: 500;
    font-size: 0.82rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    width: 100%;
    transition: background var(--dur, 320ms), transform var(--dur, 320ms);
    white-space: nowrap;
}

.flr-cart__checkout:hover {
    background: var(--theme-espresso, #4a3a30);
    transform: translateY(-2px);
}

.flr-cart__checkout:active {
    transform: translateY(0);
}

.flr-cart__checkout[data-loading],
.flr-cart__checkout:disabled {
    opacity: 0.75;
    cursor: not-allowed;
    pointer-events: none;
}

[data-inline-action-error] {
    margin-top: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.t1-cart-checkout-default,
.t1-cart-checkout-loading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.t1-cart-checkout-loading[hidden],
.t1-cart-checkout-default[hidden] { display: none !important; }

@keyframes flr-cart-spin { to { transform: rotate(360deg); } }

.t1-cart-spinner {
    animation: flr-cart-spin 0.75s linear infinite;
    flex-shrink: 0;
}

/* ── Continue shopping ──────────────────────────────────── */

.flr-cart__continue {
    display: inline-block;
    margin-top: 1rem;
    position: relative;
    font-family: var(--theme-font-family, 'Jost', sans-serif);
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    color: var(--theme-primary);
    padding-bottom: 3px;
    text-decoration: none;
}

.flr-cart__continue::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--ease, cubic-bezier(0.22, 0.61, 0.36, 1));
}

.flr-cart__continue:hover::after {
    transform: scaleX(1);
}

/* ── USP line ───────────────────────────────────────────── */

.flr-cart__usp {
    margin-top: 1.2rem;
    font-family: var(--theme-font-family, 'Jost', sans-serif);
    font-size: 0.82rem;
    color: var(--theme-text-muted, #726a62);
    line-height: 1.5;
}

/* ── Responsive ─────────────────────────────────────────── */

@media (max-width: 980px) {
    .flr-cart__inner {
        grid-template-columns: 1fr;
    }

    .flr-cart__summary {
        position: static;
    }
}

@media (max-width: 560px) {
    .flr-cart-item {
        grid-template-columns: 72px 1fr;
        grid-template-areas:
            "img info"
            "img qty"
            "price price";
        row-gap: 10px;
    }

    .flr-cart-item__img-wrap {
        grid-area: img;
        width: 72px;
        height: 72px;
    }

    .flr-cart-item__info {
        grid-area: info;
    }

    .flr-cart-item__qty {
        grid-area: qty;
        justify-self: start;
    }

    .flr-cart-item__price {
        grid-area: price;
    }
}
