/* ===== CHECKOUT PAGE STYLES ===== */

.checkout-page {
    min-height: 100vh;
    padding-top: 120px;
}

/* ─── Header ─── */
.checkout-header {
    text-align: center;
    padding: 0 24px 40px;
    max-width: 600px;
    margin: 0 auto;
}

.checkout-header h1 {
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    font-weight: 800;
    margin: 12px 0 8px;
}

.checkout-header p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 15px;
}

/* ─── Content ─── */
.checkout-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

/* ─── Empty State ─── */
.cart-empty {
    text-align: center;
    padding: 60px 24px;
}

.cart-empty-icon {
    font-size: 56px;
    margin-bottom: 20px;
    opacity: 0.6;
}

.cart-empty h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.cart-empty p {
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 24px;
}

/* ─── Grid Layout ─── */
.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
    align-items: start;
}

/* ─── Cart Items ─── */
.cart-items-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cart-items-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 8px;
}

.cart-items-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
}

.cart-clear-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 8px;
    transition: all 0.2s;
}

.cart-clear-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* Single Cart Item */
.cart-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    transition: all 0.2s;
}

.cart-item:hover {
    border-color: rgba(139, 92, 246, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

.cart-item-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(139, 92, 246, 0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-weight: 600;
    font-size: 14px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-id {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 2px;
}

/* Quantity Controls */
.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.qty-btn {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: rgba(255, 255, 255, 0.6);
    width: 32px;
    height: 32px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.qty-btn:hover {
    background: rgba(139, 92, 246, 0.15);
    color: #fff;
}

.qty-value {
    width: 36px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: transparent;
    border: none;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.cart-item-price {
    font-weight: 700;
    font-size: 15px;
    color: #fff;
    min-width: 70px;
    text-align: right;
    flex-shrink: 0;
}

.cart-item-remove {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.25);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.15s;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-remove:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.cart-item-remove svg {
    width: 16px;
    height: 16px;
}

/* ─── Sidebar ─── */
.checkout-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 100px;
}

/* Order Summary */
.order-summary {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 24px;
}

.order-summary h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 16px;
}

.summary-lines {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.summary-line-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 12px;
}

.summary-line-price {
    flex-shrink: 0;
    font-weight: 500;
}

.summary-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 14px 0;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-total span:first-child {
    font-weight: 600;
    font-size: 14px;
}

.total-price {
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(135deg, #8b5cf6, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.summary-tax {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
    display: block;
    text-align: right;
    margin-top: 4px;
}

/* ─── Checkout Form ─── */
.checkout-form-container {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 24px;
}

.checkout-form-container h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 16px;
}

.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.checkout-form .form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.checkout-form .form-group input[type="text"],
.checkout-form .form-group input[type="email"] {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
    outline: none;
    box-sizing: border-box;
}

.checkout-form .form-group input:focus {
    border-color: rgba(139, 92, 246, 0.5);
}

.checkout-form .form-group input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

/* Payment Options */
.payment-options {
    display: flex;
    gap: 8px;
}

.payment-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.payment-option input[type="radio"] {
    display: none;
}

.payment-option.active {
    border-color: rgba(139, 92, 246, 0.4);
    background: rgba(139, 92, 246, 0.08);
    color: #fff;
}

.payment-option:hover {
    border-color: rgba(139, 92, 246, 0.3);
}

.payment-icon {
    font-size: 18px;
}

/* Consent */
.form-consent {
    margin-top: 4px;
}

.form-consent label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    line-height: 1.5;
}

.form-consent input[type="checkbox"] {
    margin-top: 3px;
    accent-color: #8b5cf6;
    flex-shrink: 0;
}

.form-consent a {
    color: var(--primary, #8b5cf6);
    text-decoration: none;
}

.form-consent a:hover {
    text-decoration: underline;
}

/* Submit Button */
.checkout-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    font-size: 15px;
    font-weight: 700;
    margin-top: 6px;
}

.checkout-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ─── Success State ─── */
.checkout-success {
    text-align: center;
    padding: 60px 24px;
}

.success-animation {
    margin-bottom: 24px;
}

.success-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.05));
    border: 2px solid rgba(34, 197, 94, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    animation: successPulse 0.6s ease;
}

.success-circle svg {
    width: 36px;
    height: 36px;
    stroke: #22c55e;
}

@keyframes successPulse {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    60% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.checkout-success h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.checkout-success p {
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 24px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* ─── Responsive ─── */
@media (max-width: 860px) {
    .checkout-grid {
        grid-template-columns: 1fr;
    }

    .checkout-sidebar {
        position: static;
    }
}

@media (max-width: 600px) {
    .checkout-page {
        padding-top: 100px;
    }

    .cart-item {
        flex-wrap: wrap;
        gap: 12px;
    }

    .cart-item-details {
        flex: 1 1 calc(100% - 70px);
    }

    .cart-item-qty {
        margin-left: auto;
    }

    .cart-item-price {
        min-width: auto;
    }

    .payment-options {
        flex-direction: column;
    }
}