/* ============================================
   JUPITER PLANET XXL — Cart & Checkout Styles
   ============================================ */

/* ═══════════════════
   CART PAGE
   ═══════════════════ */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: var(--space-2xl);
    padding: var(--space-3xl) 0;
    align-items: start;
}

/* Cart Table */
.cart-table {
    background: var(--gradient-card);
    border: var(--border-card);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.cart-table__header {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr 1fr 40px;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-subtle);
    font-family: var(--font-heading);
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    letter-spacing: var(--ls-wider);
    text-transform: uppercase;
    color: var(--text-muted);
}

.cart-item {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr 1fr 40px;
    gap: var(--space-md);
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-subtle);
    align-items: center;
    transition: background var(--transition-fast);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

.cart-item__product {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.cart-item__image {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: linear-gradient(135deg, #1a0a1e, #0a1a2e);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item__image i {
    font-size: var(--fs-xl);
    color: var(--text-dim);
}

.cart-item__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item__name {
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--text-primary);
    margin-bottom: 2px;
}

.cart-item__meta {
    font-size: var(--fs-xs);
    color: var(--text-dim);
}

.cart-item__price,
.cart-item__subtotal {
    font-family: var(--font-heading);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--text-body);
}

.cart-item__subtotal {
    color: var(--neon-pink);
}

.cart-item__quantity {
    display: flex;
    align-items: center;
}

.cart-item__quantity .quantity-control {
    transform: scale(0.85);
    transform-origin: left center;
}

.cart-item__remove {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-dim);
    font-size: var(--fs-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.cart-item__remove:hover {
    border-color: var(--neon-pink);
    color: var(--neon-pink);
    background: rgba(255, 45, 117, 0.1);
}

/* Cart Summary */
.cart-summary {
    position: sticky;
    top: calc(var(--header-height) + var(--space-lg));
    background: var(--gradient-card);
    border: var(--border-card);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
}

.cart-summary__title {
    font-size: var(--fs-lg);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-subtle);
}

.cart-summary__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm) 0;
    font-size: var(--fs-sm);
    color: var(--text-muted);
}

.cart-summary__row span:last-child {
    font-weight: var(--fw-semibold);
    color: var(--text-body);
}

.cart-summary__total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg) 0;
    margin-top: var(--space-md);
    border-top: 1px solid var(--border-subtle);
    font-family: var(--font-heading);
}

.cart-summary__total span:first-child {
    font-size: var(--fs-base);
    font-weight: var(--fw-bold);
    color: var(--text-primary);
}

.cart-summary__total span:last-child {
    font-size: var(--fs-xl);
    font-weight: var(--fw-bold);
    color: var(--neon-pink);
    text-shadow: var(--glow-text-pink);
}

.cart-summary__free-shipping {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: rgba(0, 255, 136, 0.08);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: var(--radius-sm);
    font-size: var(--fs-xs);
    color: var(--neon-green);
    margin-top: var(--space-md);
}

.cart-summary .btn {
    width: 100%;
    margin-top: var(--space-lg);
}

/* ═══════════════════
   CHECKOUT PAGE
   ═══════════════════ */
.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: var(--space-2xl);
    padding: var(--space-3xl) 0;
    align-items: start;
}

.checkout-section {
    background: var(--gradient-card);
    border: var(--border-card);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.checkout-section__title {
    font-size: var(--fs-lg);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.checkout-section__title i {
    color: var(--neon-cyan);
}

/* Payment Options */
.payment-option {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-bottom: var(--space-sm);
}

.payment-option:hover,
.payment-option.selected {
    border-color: var(--neon-pink);
    background: var(--neon-pink-dim);
}

.payment-option input[type="radio"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-light);
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    cursor: pointer;
}

.payment-option input[type="radio"]:checked {
    border-color: var(--neon-pink);
}

.payment-option input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 8px;
    height: 8px;
    background: var(--neon-pink);
    border-radius: 50%;
    box-shadow: var(--glow-pink-sm);
}

.payment-option__label {
    font-size: var(--fs-sm);
    color: var(--text-body);
    font-weight: var(--fw-medium);
}

.payment-option__desc {
    font-size: var(--fs-xs);
    color: var(--text-dim);
}

/* Order Summary in Checkout */
.checkout-order-summary {
    position: sticky;
    top: calc(var(--header-height) + var(--space-lg));
}

.checkout-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border-subtle);
}

.checkout-item:last-child {
    border-bottom: none;
}

.checkout-item__image {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-xs);
    overflow: hidden;
    background: var(--bg-card);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkout-item__image i {
    font-size: var(--fs-sm);
    color: var(--text-dim);
}

.checkout-item__info {
    flex: 1;
    min-width: 0;
}

.checkout-item__name {
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.checkout-item__qty {
    font-size: var(--fs-xs);
    color: var(--text-dim);
}

.checkout-item__price {
    font-family: var(--font-heading);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--neon-pink);
    flex-shrink: 0;
}

/* ═══════════════════
   ORDER SUCCESS PAGE
   ═══════════════════ */
.order-success {
    text-align: center;
    padding: var(--space-5xl) var(--space-lg);
    max-width: 600px;
    margin: 0 auto;
}

.order-success__icon {
    font-size: 5rem;
    color: var(--neon-green);
    margin-bottom: var(--space-xl);
    text-shadow: 0 0 40px rgba(0, 255, 136, 0.3);
}

.order-success__title {
    font-size: var(--fs-3xl);
    margin-bottom: var(--space-md);
}

.order-success__number {
    font-family: var(--font-heading);
    font-size: var(--fs-xl);
    color: var(--neon-cyan);
    text-shadow: var(--glow-text-cyan);
    margin-bottom: var(--space-xl);
}

.order-success__text {
    color: var(--text-muted);
    line-height: var(--lh-relaxed);
    margin-bottom: var(--space-2xl);
}

.order-success__actions {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

/* ═══════════════════
   RESPONSIVE
   ═══════════════════ */
@media (max-width: 992px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }
    .checkout-layout {
        grid-template-columns: 1fr;
    }
    .cart-summary,
    .checkout-order-summary {
        position: static;
    }
    .cart-table__header {
        display: none;
    }
    .cart-item {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }
    .cart-item__product {
        grid-column: 1;
    }
}

@media (max-width: 576px) {
    .cart-item__product {
        flex-direction: column;
        align-items: flex-start;
    }
}
