/* ═══════════════════════════════════════════════════════════════
   LUMINA — Cart Page Styles
   Shopping cart, items, summary, checkout
   ═══════════════════════════════════════════════════════════════ */

/* ── Cart Hero ─────────────────────────────────────────────── */
.cart-hero {
    padding: calc(var(--nav-height) + 50px) 0 30px;
    text-align: center;
}

.cart-hero-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.cart-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 8px;
}

.cart-item-count {
    font-size: 0.9rem;
    color: var(--text-tertiary);
}

/* ── Cart Layout ───────────────────────────────────────────── */
.cart-layout {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding) 80px;
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    align-items: flex-start;
}

/* ── Cart Items ────────────────────────────────────────────── */
.cart-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 24px;
    align-items: center;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    transition: all 0.3s var(--ease-out);
    position: relative;
    overflow: hidden;
}

.cart-item:hover {
    border-color: var(--accent-border);
    background: var(--bg-card-hover);
}

.cart-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent);
    opacity: 0;
    transition: opacity 0.3s;
}

.cart-item:hover::before {
    opacity: 1;
}

/* Item Visual */
.cart-item-visual {
    width: 100px;
    height: 100px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
}

.cart-item-visual svg {
    width: 60%;
    height: 60%;
    opacity: 0.7;
}

/* Item Info */
.cart-item-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cart-item-category {
    font-size: 0.7rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.cart-item-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
}

.cart-item-color {
    font-size: 0.82rem;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.cart-item-color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid var(--border-medium);
}

.cart-item-price-each {
    font-size: 0.82rem;
    color: var(--text-tertiary);
}

/* Item Actions */
.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.cart-item-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.cart-item-qty {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.cart-qty-btn {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
    border: none;
    background: none;
}

.cart-qty-btn:hover {
    background: var(--accent-dim);
    color: var(--accent);
}

.cart-qty-value {
    width: 40px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    border-left: 1px solid var(--border-subtle);
    border-right: 1px solid var(--border-subtle);
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-remove {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s;
    background: none;
    border: none;
}

.cart-item-remove:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.cart-item-remove svg {
    width: 16px;
    height: 16px;
}

/* Item removing animation */
.cart-item.removing {
    animation: itemRemove 0.4s var(--ease-out) forwards;
}

@keyframes itemRemove {
    to {
        opacity: 0;
        transform: translateX(40px) scale(0.95);
        height: 0;
        padding: 0;
        margin: 0;
        border: 0;
        overflow: hidden;
    }
}

/* ── Cart Summary ──────────────────────────────────────────── */
.cart-summary {
    position: sticky;
    top: calc(var(--nav-height) + 20px);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 32px;
}

.cart-summary-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.summary-row-label {
    color: var(--text-tertiary);
}

.summary-row-value {
    color: var(--text-primary);
    font-weight: 500;
}

.summary-row.discount .summary-row-value {
    color: var(--success);
}

.summary-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: 16px 0;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 24px;
}

.summary-total-label {
    font-size: 1rem;
    font-weight: 600;
}

.summary-total-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Checkout Button */
.btn-checkout {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--accent-bright), #8b5cf6);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.4s var(--ease-out);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.03em;
}

.btn-checkout:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.35);
}

.btn-checkout:active {
    transform: translateY(0);
}

.btn-checkout::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #8b5cf6, var(--accent-bright));
    opacity: 0;
    transition: opacity 0.4s;
}

.btn-checkout:hover::before {
    opacity: 1;
}

.btn-checkout span {
    position: relative;
    z-index: 1;
}

/* Promo code */
.cart-promo {
    margin-top: 20px;
}

.cart-promo-label {
    font-size: 0.82rem;
    color: var(--text-tertiary);
    margin-bottom: 8px;
    display: block;
}

.cart-promo-input {
    display: flex;
    gap: 8px;
}

.cart-promo-input input {
    flex: 1;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-primary);
    transition: border-color 0.3s;
}

.cart-promo-input input::placeholder {
    color: var(--text-muted);
}

.cart-promo-input input:focus {
    border-color: var(--accent-border);
}

.cart-promo-input button {
    padding: 10px 18px;
    background: var(--accent-dim);
    border: 1px solid var(--accent-border);
    border-radius: var(--radius-sm);
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.cart-promo-input button:hover {
    background: rgba(167, 139, 250, 0.25);
}

/* Trust info */
.cart-trust {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cart-trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--text-tertiary);
}

.cart-trust-item svg {
    width: 14px;
    height: 14px;
    color: var(--accent);
    flex-shrink: 0;
}

/* ── Empty Cart ────────────────────────────────────────────── */
.cart-empty {
    text-align: center;
    padding: 80px 40px;
    grid-column: 1 / -1;
}

.cart-empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.cart-empty-icon svg {
    width: 32px;
    height: 32px;
}

.cart-empty-title {
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.cart-empty-desc {
    font-size: 0.9rem;
    color: var(--text-tertiary);
    margin-bottom: 24px;
}

.btn-continue {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: var(--accent-dim);
    border: 1px solid var(--accent-border);
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    transition: all 0.3s var(--ease-out);
    text-decoration: none;
}

.btn-continue:hover {
    background: rgba(167, 139, 250, 0.25);
    transform: translateY(-2px);
    color: var(--accent);
}