/* ── Cart, Checkout, Thank You ───────────────────────────── */

/* Shared empty state */
.sb-empty-state {
    text-align: center;
    padding: 4rem 2rem;
}
.sb-empty-state__icon { font-size: 3.5rem; margin-bottom: 1rem; }
.sb-empty-state h2, .sb-empty-state h3 {
    font-size: 1.4rem;
    color: var(--sb-heading);
    margin-bottom: .5rem;
}
.sb-empty-state p { color: var(--sb-muted); margin-bottom: 1.5rem; }

/* ── Cart ── */
.sb-cart-section { padding: 2.5rem 0 5rem; }
.sb-cart-heading {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 2rem;
    color: var(--sb-heading);
}
.sb-cart-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 2.5rem;
    align-items: start;
}
.sb-cart-items { display: flex; flex-direction: column; gap: 1rem; }

.sb-cart-item {
    display: grid;
    grid-template-columns: 80px 1fr auto auto;
    gap: 1rem;
    align-items: center;
    background: #fff;
    border: 1px solid var(--sb-border, #e2e8f0);
    border-radius: 12px;
    padding: 1.1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
    transition: box-shadow .2s;
}
.sb-cart-item:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }

.sb-cart-item__thumb { width: 80px; height: 60px; border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.sb-cart-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.sb-cart-item__thumb-placeholder {
    width: 100%; height: 100%;
    background: var(--sb-bg-light, #f1f5f9);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; border-radius: 8px;
}
.sb-cart-item__info h3 { font-size: .95rem; font-weight: 700; margin-bottom: .25rem; }
.sb-cart-item__info h3 a { color: var(--sb-heading); text-decoration: none; }
.sb-cart-item__info h3 a:hover { color: var(--sb-primary); }
.sb-cart-item__meta { display: flex; gap: .5rem; flex-wrap: wrap; }
.sb-cart-item__meta span { font-size: .78rem; color: var(--sb-muted); }
.sb-cart-item__price { font-size: 1.1rem; font-weight: 700; color: var(--sb-primary); white-space: nowrap; }
.sb-cart-remove {
    background: none; border: none; cursor: pointer;
    font-size: 1.2rem; color: var(--sb-muted);
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s, color .15s;
}
.sb-cart-remove:hover { background: #fee2e2; color: #dc2626; }

/* Cart summary box */
.sb-cart-summary {
    background: #fff;
    border: 1px solid var(--sb-border, #e2e8f0);
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 4px 20px rgba(0,0,0,.06);
    position: sticky;
    top: 100px;
}
.sb-cart-summary h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 1.25rem; }
.sb-cart-summary__rows { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1.5rem; }
.sb-cart-summary__row { display: flex; justify-content: space-between; font-size: .9rem; color: var(--sb-text); }
.sb-cart-summary__row--total {
    border-top: 2px solid var(--sb-border, #e2e8f0);
    padding-top: .75rem;
    font-weight: 700;
    font-size: 1.05rem;
}
.sb-cart-summary__row--total span:last-child { color: var(--sb-primary); font-size: 1.2rem; }
.sb-cart-summary .sb-btn { margin-bottom: .6rem; }
.sb-btn--ghost {
    background: transparent;
    border: 1px solid var(--sb-border, #e2e8f0);
    color: var(--sb-text);
}
.sb-btn--ghost:hover { border-color: var(--sb-primary); color: var(--sb-primary); }

/* ── Checkout ── */
.sb-checkout-section { padding: 2.5rem 0 5rem; }
.sb-checkout-heading { font-size: 1.8rem; font-weight: 800; margin-bottom: 2rem; color: var(--sb-heading); }
.sb-checkout-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2.5rem;
    align-items: start;
}
.sb-checkout-details, .sb-checkout-summary {
    background: #fff;
    border: 1px solid var(--sb-border, #e2e8f0);
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 4px 20px rgba(0,0,0,.06);
}
.sb-checkout-details h2, .sb-checkout-summary h2 {
    font-size: 1.05rem; font-weight: 700; margin-bottom: 1rem;
    border-bottom: 1px solid var(--sb-border, #e2e8f0);
    padding-bottom: .75rem;
}
.sb-checkout-detail-row {
    display: flex;
    gap: 1rem;
    padding: .6rem 0;
    border-bottom: 1px dashed var(--sb-border, #e2e8f0);
    font-size: .9rem;
}
.sb-checkout-detail-row span { color: var(--sb-muted); min-width: 80px; }
.sb-checkout-item {
    display: flex;
    justify-content: space-between;
    padding: .6rem 0;
    font-size: .9rem;
    border-bottom: 1px dashed var(--sb-border, #e2e8f0);
}
.sb-checkout-item--total {
    font-weight: 700;
    border-bottom: none;
    border-top: 2px solid var(--sb-border, #e2e8f0);
    padding-top: .75rem;
    font-size: 1.05rem;
    margin-top: .25rem;
}
.sb-checkout-item--total strong:last-child { color: var(--sb-primary); font-size: 1.2rem; }
.sb-checkout-summary .sb-btn { margin-top: 1.25rem; margin-bottom: .5rem; }

.sb-btn--pay {
    background: var(--sb-primary);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    padding: .9rem 1.5rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    letter-spacing: .01em;
    transition: background .2s, transform .15s;
}
.sb-btn--pay:hover { background: var(--sb-primary-dark, #1d4ed8); transform: translateY(-1px); }
.sb-btn--pay:disabled { background: #94a3b8; cursor: not-allowed; transform: none; }

.sb-checkout-secure {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .78rem;
    color: var(--sb-muted);
    margin-top: .5rem;
    margin-bottom: 1rem;
}
.sb-checkout-secure img { height: 20px; opacity: .7; }

.sb-notice--warning {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    font-size: .9rem;
    margin-bottom: 1.5rem;
    color: #92400e;
}

/* ── Thank You ── */
.sb-thankyou-section { padding: 4rem 0; }
.sb-thankyou-card {
    max-width: 560px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--sb-border, #e2e8f0);
    border-radius: 20px;
    padding: 3rem 2.5rem;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,.08);
}
.sb-thankyou-card--fail { border-color: #fca5a5; }
.sb-thankyou-icon { font-size: 3rem; margin-bottom: 1rem; }
.sb-thankyou-card h1 { font-size: 1.8rem; font-weight: 800; margin-bottom: .5rem; }
.sb-thankyou-sub { color: var(--sb-muted); margin-bottom: 1.75rem; }

.sb-thankyou-meta {
    background: var(--sb-bg-light, #f8fafc);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    text-align: left;
}
.sb-thankyou-meta-row {
    display: flex;
    justify-content: space-between;
    padding: .4rem 0;
    font-size: .88rem;
    border-bottom: 1px dashed var(--sb-border, #e2e8f0);
}
.sb-thankyou-meta-row:last-child { border-bottom: none; }
.sb-thankyou-meta-row span { color: var(--sb-muted); }
.sb-thankyou-note { font-size: .82rem; color: var(--sb-muted); margin-bottom: 1.5rem; }
.sb-thankyou-actions { display: flex; flex-direction: column; gap: .75rem; }

/* Responsive */
@media (max-width: 860px) {
    .sb-cart-layout, .sb-checkout-layout { grid-template-columns: 1fr; }
    .sb-cart-summary, .sb-checkout-summary { position: static; }
}
@media (max-width: 500px) {
    .sb-cart-item { grid-template-columns: 60px 1fr auto; }
    .sb-cart-item__price { display: none; }
    .sb-thankyou-card { padding: 2rem 1.25rem; }
}
