/**
 * Storefront cart — Phase 1 (STOREFRONT_MODERNIZATION_PHASE_PLAN).
 * Extracted from resources/views/storefront/cart.blade.php.
 */
.sf-cart-page {
    max-width: 1200px;
    margin: 1rem auto;
    padding: 0 0.5rem 1rem;
}

.sf-cart-warn {
    background: #fff7ed;
    border: 1px solid #fdba74;
    color: #9a3412;
    border-radius: 12px;
    padding: 0.7rem 0.85rem;
    margin-bottom: 0.8rem;
}

.sf-cart-warn--error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.sf-cart-warn__links {
    display: block;
    margin-top: 0.35rem;
}

.sf-cart-warn__links a {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
}

.sf-cart-tr--stale td {
    background: #fffbeb;
}

.sf-cart-api-stale {
    margin-top: 0.45rem;
    padding: 0.45rem 0.55rem;
    border-radius: 8px;
    border: 1px solid #fecaca;
    background: #fef2f2;
    max-width: 100%;
}

.sf-cart-api-stale__msg {
    margin: 0 0 0.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #991b1b;
}

.sf-cart-api-stale__hint {
    margin: 0;
    font-size: 0.82rem;
    color: #7f1d1d;
    line-height: 1.35;
}

.sf-cart-api-stale--mobile {
    margin-top: 0.35rem;
}

.sf-cart-mobile-line--stale {
    border-color: #fecaca;
    box-shadow: 0 0 0 1px rgba(254, 202, 202, 0.9);
}

.sf-cart-checkout-btn--blocked {
    opacity: 0.55;
    cursor: not-allowed;
}

.sf-cart-checkout-blocked-hint {
    margin: 0.4rem 0 0;
    font-size: 0.88rem;
    color: #7f1d1d;
    line-height: 1.35;
}

.sf-cart-hero {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    border-radius: 16px;
    padding: 1.1rem 1rem;
    margin-bottom: 1rem;
}

.sf-cart-hero__title {
    margin: 0;
    font-size: 1.35rem;
}

.sf-cart-hero__meta {
    margin: 0.35rem 0 0;
    opacity: 0.92;
}

.sf-cart-empty {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 2rem 1rem;
    text-align: center;
}

.sf-cart-empty .price {
    margin: 0 0 0.65rem;
}

/* Phase 6 — after add-to-cart (cart page) */
.sf-cart-added {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    background: #ecfdf5;
    border: 1px solid #34d399;
    color: #065f46;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.85rem;
}

.sf-cart-added__text {
    flex: 1 1 200px;
    font-size: 0.9rem;
    font-weight: 500;
}

.sf-cart-added__cta {
    flex-shrink: 0;
}

.cart-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.sf-cart-lines-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}

.cart-desktop {
    display: block;
}

.cart-mobile {
    display: none;
    padding: 0.75rem;
}

@media (max-width: 900px) {
    .cart-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .cart-desktop {
        display: none !important;
    }

    .cart-mobile {
        display: block !important;
    }
}

.sf-cart-table {
    width: 100%;
    border-collapse: collapse;
}

.sf-cart-thead-row {
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
    text-align: start;
}

.sf-cart-th {
    padding: 0.7rem;
}

.sf-cart-tr {
    border-bottom: 1px solid var(--border);
}

.sf-cart-td {
    padding: 0.8rem;
}

.sf-cart-td--product {
    min-width: 220px;
}

.sf-cart-product-row {
    display: flex;
    gap: 0.7rem;
    align-items: center;
    justify-content: space-between;
}

.sf-cart-product-meta {
    display: flex;
    gap: 0.7rem;
    align-items: center;
    min-width: 0;
}

.sf-cart-thumb {
    width: 84px;
    height: auto;
    aspect-ratio: 3 / 2;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #f1f5f9;
}

.sf-cart-title-link {
    font-weight: 700;
    text-decoration: none;
}

.sf-cart-remove-form--desktop {
    margin-inline-start: 0.5rem;
}

.sf-cart-remove-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    height: 2rem;
    padding: 0 0.5rem;
    background: #fff5f5;
    border: 1px solid #fecaca;
    color: #b91c1c;
    cursor: pointer;
    border-radius: 8px;
}

.sf-cart-remove-btn--icon-only {
    width: 2rem;
    padding: 0;
    background: none;
}

.sf-cart-remove-btn__label {
    font-size: 0.78rem;
}

.sf-cart-td--nowrap {
    white-space: nowrap;
    font-size: 0.95rem;
}

.cart-qty-form {
    display: flex;
    gap: 0.3rem;
    align-items: center;
}

.cart-qty-btn {
    width: 1.8rem;
    height: 1.8rem;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
}

.cart-qty-input {
    width: 4rem;
    padding: 0.25rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    text-align: center;
}

.sf-cart-mobile-line {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.65rem;
    margin-bottom: 0.6rem;
}

.sf-cart-mobile-top {
    display: flex;
    gap: 0.65rem;
    align-items: center;
}

.sf-cart-mobile-body {
    flex: 1;
    min-width: 0;
}

.sf-cart-mobile-title {
    font-weight: 700;
    text-decoration: none;
    display: block;
}

.sf-cart-mobile-unit {
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 0.15rem;
}

.sf-cart-mobile-qty-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.55rem;
}

.sf-cart-mobile-breakdown {
    margin-top: 0.5rem;
    border-top: 1px dashed var(--border);
    padding-top: 0.45rem;
    font-size: 0.85rem;
}

.sf-cart-mobile-breakdown-row {
    display: flex;
    justify-content: space-between;
}

.sf-cart-summary {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0.9rem 1rem;
    max-width: 340px;
    width: 100%;
    margin-inline-start: auto;
}

.sf-cart-summary__title {
    margin: 0 0 0.65rem;
    font-size: 1.05rem;
}

.sf-cart-summary__row {
    margin: 0.35rem 0;
    display: flex;
    justify-content: space-between;
}

.sf-cart-summary__grand {
    margin: 0.35rem 0;
    display: flex;
    justify-content: space-between;
    font-size: 1.02rem;
}

.sf-cart-summary__hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 0.65rem 0;
}

.sf-cart-summary-email-wrap {
    margin-top: 0.75rem;
}

.sf-cart-summary-email-label {
    display: block;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
}

.sf-cart-summary-email-input {
    width: 100%;
    padding: 0.45rem 0.55rem;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.sf-cart-summary-agree {
    margin-top: 0.55rem;
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.sf-cart-summary-agree input {
    margin-top: 0.1rem;
}

#cartCheckoutBtn.btn {
    margin-top: 0.7rem;
    display: block;
    text-align: center;
    opacity: 0.55;
    pointer-events: none;
}

#cartCheckoutBtn.btn.is-enabled {
    opacity: 1;
    pointer-events: auto;
}

.sf-cart-login-hint {
    margin: 0.8rem 0 0.3rem;
}

.sf-cart-login-btn {
    display: block;
    text-align: center;
}

.sf-cart-disabled-note {
    margin-top: 0.65rem;
    color: #b45309;
}
