/* Checkout Page Styles */
.checkout-page {
    background: #f9f7fb;
    padding-bottom: 60px;
    min-height: calc(100vh - var(--wd-header-h, 160px));
}

.checkout-hero {
    background: linear-gradient(135deg, #fdf2f7 0%, #f8e7ff 100%);
    border-bottom: 1px solid #f26a301a;
    margin-bottom: 40px;
}

.checkout-hero-content {
    padding: 40px 0;
    text-align: center;
}

.checkout-hero-content h1 {
    color: #1e1e1e;
    margin-bottom: 10px;
    font-size: 28px;
    font-weight: 700;
}

.checkout-hero-content p {
    color: #5f5f5f;
    font-size: 14px;
    margin-bottom: 30px;
}

.checkout-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.checkout-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #a0a0a0;
    font-size: 13px;
}

.checkout-step span {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f1e4ff;
    color: #8a41ff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
}

.checkout-step.active span {
    background: #f26a30;
    color: #fff;
}

.checkout-step.completed span {
    background: #0f2f36;
    color: #fff;
}

.checkout-step.active {
    color: #f26a30;
}

.checkout-step.completed {
    color: #0f2f36;
}

/* Checkout Layout */
.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
}

/* Checkout Form */
.checkout-main {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.checkout-section {
    background: #fff;
    border-radius: 18px;
    padding: 30px;
    box-shadow: 0 12px 40px #150b3414;
}

.section-title {
    color: #1e1e1e;
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 24px 0;
    padding-bottom: 16px;
    border-bottom: 1px solid #f26a3014;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    color: #434343;
    font-size: 14px;
    font-weight: 600;
}

.required {
    color: #f26a30;
}

.form-input {
    width: 100%;
    background: #fff;
    border: 1px solid #f26a3033;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.form-input:focus {
    border-color: #f26a30;
    outline: none;
    box-shadow: 0 0 0 4px #f26a302e;
}

.form-input:invalid:not(:placeholder-shown) {
    border-color: #f26a30;
}

/* Shipping Methods */
.shipping-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.shipping-method {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 2px solid #f26a3033;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.shipping-method:hover {
    border-color: #f26a30;
    background: #f26a3008;
}

.shipping-method input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #f26a30;
}

.shipping-method input[type="radio"]:checked + .method-content {
    color: #f26a30;
}

.method-content {
    flex: 1;
}

.method-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.method-name {
    font-size: 15px;
    font-weight: 600;
}

.method-price {
    font-size: 15px;
    font-weight: 700;
    color: #f26a30;
}

.method-description {
    color: #6a6a6a;
    font-size: 13px;
    margin: 0;
}

/* Payment Methods */
.payment-methods {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.payment-method {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 2px solid #f26a3033;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.payment-method:hover {
    border-color: #f26a30;
    background: #f26a3008;
}

.payment-method input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #f26a30;
}

.payment-method input[type="radio"]:checked + .method-content {
    color: #f26a30;
}

.payment-method .method-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.payment-method i {
    font-size: 20px;
}

.card-to-card-info {
    margin-top: 20px;
    border: 1px solid #f26a302e;
    border-radius: 16px;
    padding: 20px;
    background: #fff7f1;
}

.card-info-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.card-info-header p {
    margin: 0;
    color: #4b4b4b;
    font-size: 14px;
    line-height: 1.6;
}

.card-info-header small {
    color: #f26a30;
    font-weight: 600;
}

.card-info-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.copy-card-btn {
    border: 1px dashed #f26a30;
    background: #fff;
    color: #f26a30;
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.copy-card-btn:hover {
    background: #f26a30;
    color: #fff;
}

.card-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.card-info-box {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #fdddcf;
    box-shadow: 0 4px 20px rgba(242, 106, 48, 0.08);
}

.card-info-label {
    display: block;
    color: #777;
    font-size: 12px;
    margin-bottom: 8px;
}

.card-info-box strong {
    font-size: 17px;
    letter-spacing: 1px;
    color: #0f2f36;
    direction: ltr;
    display: block;
}

.card-info-empty {
    background: #fff3f0;
    border: 1px dashed #f26a30;
    color: #c2410c;
    padding: 14px;
    border-radius: 12px;
    font-size: 13px;
    margin-top: 12px;
}

.receipt-upload-field {
    margin-top: 20px;
}

.receipt-upload-field label {
    font-weight: 600;
    color: #434343;
    display: block;
    margin-bottom: 8px;
}

.receipt-input-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

#receipt-upload-input {
    flex: 1;
    border: 2px dashed #f26a3033;
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    transition: border-color 0.2s;
    font-family: inherit;
}

#receipt-upload-input:hover {
    border-color: #f26a30;
}

#receipt-clear-btn {
    white-space: nowrap;
}

.receipt-file-info {
    margin-top: 10px;
    font-size: 13px;
    color: #0f2f36;
    font-weight: 600;
}

/* Order Summary */
.checkout-sidebar {
    position: sticky;
    top: calc(var(--wd-header-h, 160px) + 20px);
    align-self: start;
}

.order-summary-card {
    background: #fff;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 12px 40px #150b3414;
}

.order-summary-title {
    color: #1e1e1e;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 20px 0;
    padding-bottom: 16px;
    border-bottom: 1px solid #f26a3014;
}

.order-items {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.order-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f26a3014;
}

.order-item:last-child {
    border-bottom: none;
}

.order-item-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.order-item-details {
    flex: 1;
    min-width: 0;
}

.order-item-name {
    color: #1e1e1e;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.4;
}

.order-item-meta {
    color: #6a6a6a;
    font-size: 12px;
    margin-bottom: 4px;
}

.order-item-price {
    color: #f26a30;
    font-size: 14px;
    font-weight: 700;
}

.order-summary-divider {
    background: #f26a3014;
    height: 1px;
    margin: 16px 0;
}

.order-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    color: #434343;
    font-size: 14px;
}

.order-discount {
    color: #0f2f36;
    font-weight: 600;
}

.order-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    color: #1e1e1e;
    font-size: 18px;
    font-weight: 700;
}

#place-order-btn {
    width: 100%;
    margin-top: 20px;
    margin-bottom: 12px;
}

.order-summary-note {
    color: #6a6a6a;
    font-size: 12px;
    line-height: 1.6;
    margin: 0;
    text-align: center;
}

/* Address Selection */
.address-selection {
    margin-bottom: 24px;
}

.address-selection-label {
    display: block;
    color: #434343;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}

.saved-addresses {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.saved-address-item {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.saved-address-item:hover {
    border-color: #f26a30;
    box-shadow: 0 4px 12px rgba(242, 106, 48, 0.1);
}

.saved-address-item.selected {
    border-color: #f26a30;
    background: linear-gradient(135deg, #fdf2f7 0%, #fff 100%);
}

.saved-address-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.saved-address-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
}

.saved-address-title {
    font-weight: 700;
    font-size: 16px;
    color: #1e1e1e;
    display: flex;
    align-items: center;
    gap: 8px;
}

.saved-address-title::before {
    content: '📍';
}

.saved-address-default {
    background: linear-gradient(135deg, #f26a30 0%, #ffb07b 100%);
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

.saved-address-details {
    color: #6a6a6a;
    font-size: 13px;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 1024px) {
    .checkout-layout {
        grid-template-columns: 1fr;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }

    .checkout-sidebar {
        position: static;
    }

    .payment-methods {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .checkout-hero-content {
        padding: 30px 0;
    }

    .checkout-steps {
        gap: 12px;
    }

    .checkout-step {
        font-size: 12px;
    }

    .checkout-step span {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .checkout-section {
        padding: 20px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .checkout-hero-content h1 {
        font-size: 24px;
    }
}

/* Discount Code Section */
.discount-code-section {
    margin-top: 16px;
}

.discount-code-input-group {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.discount-code-input-group input {
    flex: 1;
}

.discount-code-input-group button {
    white-space: nowrap;
    min-width: 120px;
}

.discount-code-message {
    margin-top: 12px;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    display: none;
}

.discount-code-message.success {
    background: #9facaf;
    color: #08171a;
    border: 1px solid #9facaf;
    display: block;
}

.discount-code-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* Wallet Payment */
.wallet-balance-display {
    font-size: 0.85em;
    color: #666;
    margin-right: 8px;
}

.wallet-payment-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wallet-payment-info i {
    font-size: 16px;
}

.order-summary-row.order-wallet {
    color: #0066cc;
}

