/* Main Container */
.checkout-main {
    background: #ffffff;
    padding: 20px 0;
}

.container {
    max-width: 1032px;
    margin: 0 auto;
    padding: 0 16px;
}

.flex-checkout {
    display: grid;
    grid-template-columns: 1fr 416px;
    gap: 24px;
}

/* Left Column */
.left-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
    box-shadow: 0px 8px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

/* Shadow Container */
.shadow-container {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Address Container */
.address-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.selected-address {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
}

.address-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.address-name {
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.address-badge {
    background-color: #4caf50;
    color: white;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: normal;
}

.address-phone {
    color: #666;
    font-size: 13px;
}

.address-text {
    font-size: 13px;
    color: #333;
    line-height: 1.4;
}

.address-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.address-edit-btn,
.address-delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    font-size: 16px;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.address-edit-btn:hover {
    color: #000;
    transform: scale(1.1);
}

.address-delete-btn {
    color: #d9534f;
}

.address-delete-btn:hover {
    color: #c9302c;
    transform: scale(1.1);
}

/* Add Address Button */
.add-address-btn {
    width: 100%;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px dashed #d4d4d4;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #000;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.add-address-btn:hover {
    background-color: #f5f5f5;
    border-color: #000;
}

/* Payment Section */
.payment-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: auto;
}

.payment-methods {
    display: flex;
    flex-direction: column;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
}

.payment-option {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    position: relative;
    background-color: #ffffff;
    transition: background-color 0.2s ease;
}

.payment-option:last-child {
    border-bottom: none;
}

.payment-option:hover {
    background-color: #f9f9f9;
}

.payment-option.selected {
    background-color: #ffffff;
    border-left: 3px solid #000;
    padding-left: 13px;
}

.payment-option input[type='radio'] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.payment-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}

.payment-icon img {
    max-width: 100%;
    max-height: 100%;
}

.payment-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.payment-text {
    font-weight: 500;
    font-size: 14px;
    color: #333;
}

.payment-desc {
    font-size: 13px;
    color: #666;
}

/* Order Summary */
.order-summary {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0px 8px 10px rgba(0, 0, 0, 0.1);
}

.summary-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.order-item-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-item {
    display: flex;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e5e5;
}

.order-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.out-of-stock-item {
    opacity: 0.6;
    background-color: #f9f9f9;
}

.out-of-stock-item .item-image,
.out-of-stock-item .item-name,
.out-of-stock-item .item-meta,
.out-of-stock-item .item-price {
    pointer-events: none;
}

.item-image {
    width: 54px;
    height: 54px;
    min-width: 54px;
    border: 1px solid #d4d4d4;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
}

.item-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.item-name {
    font-weight: 500;
    font-size: 13px;
    color: #333;
}

.item-variant {
    font-size: 12px;
    color: #666;
}

.item-meta {
    font-size: 12px;
    color: #666;
}

.item-price {
    font-weight: 600;
    font-size: 13px;
    color: #333;
}

.stock-warning {
    font-size: 12px;
    color: #d9534f;
    font-weight: 500;
}

/* Promo Section */
.promo-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.promo-input {
    display: flex;
    gap: 8px;
}

.promo-input input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #d4d4d4;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

.promo-input input:focus {
    border-color: #000;
}

.apply-btn {
    padding: 10px 16px;
    background-color: #171717;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.apply-btn:hover {
    background-color: #000;
}

.promo-hint {
    font-size: 12px;
    color: #666;
}

/* Summary Lines */
.summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
    color: #333;
}

.summary-line.discount {
    color: #d9534f;
}

.summary-line.total {
    font-size: 16px;
    font-weight: 600;
    border-top: 1px solid #e5e5e5;
    margin-top: auto;
    padding-top: 12px;
}

/* Place Order Button */
.place-order-btn {
    width: 100%;
    padding: 12px 16px;
    background-color: #171717;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.place-order-btn:hover {
    background-color: #000;
}

.place-order-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* SweetAlert2 Custom Styles */
.swal2-popup {
    font-family: inherit;
}

.swal2-input {
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    padding: 10px !important;
    font-size: 14px !important;
    margin: 0 !important;
}

.swal2-input:focus {
    border-color: #000 !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.1) !important;
}

.swal2-select {
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    padding: 10px !important;
    font-size: 14px !important;
    margin: 0 !important;
}

.swal2-textarea {
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    padding: 10px !important;
    font-size: 14px !important;
    margin: 0 !important;
    resize: vertical !important;
}

/* SweetAlert2 Form Layout */
.swal2-form-container {
    text-align: left;
}

.swal2-form-group {
    margin-bottom: 15px;
}

.swal2-form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.swal2-form-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition:
        border-color 0.15s ease-in-out,
        box-shadow 0.15s ease-in-out;
}

.swal2-form-input:focus {
    border-color: #000;
    box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.1);
    outline: 0;
}

.swal2-form-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: white;
    transition:
        border-color 0.15s ease-in-out,
        box-shadow 0.15s ease-in-out;
}

.swal2-form-select:focus {
    border-color: #000;
    box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.1);
    outline: 0;
}

.swal2-form-textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    min-height: 60px;
    resize: vertical;
    transition:
        border-color 0.15s ease-in-out,
        box-shadow 0.15s ease-in-out;
}

.swal2-form-textarea:focus {
    border-color: #000;
    box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.1);
    outline: 0;
}

/* Responsive adjustments for SweetAlert2 */
@media (max-width: 768px) {
    .swal2-popup {
        width: 95% !important;
        margin: 0 auto !important;
    }

    .swal2-form-group {
        margin-bottom: 12px;
    }

    .swal2-form-label {
        font-size: 13px;
    }

    .swal2-form-input,
    .swal2-form-select,
    .swal2-form-textarea {
        font-size: 13px;
        padding: 8px;
    }
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .container {
        padding: 0 12px;
    }

    .flex-checkout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .order-summary {
        display: flex;
    }
}

@media (max-width: 768px) {
    .checkout-main {
        padding: 12px 0;
    }

    .flex-checkout {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .left-column {
        gap: 12px;
    }

    .shadow-container {
        border-radius: 4px;
    }

    .section-title {
        font-size: 15px;
        padding: 0 16px;
    }

    .add-address-btn {
        font-size: 13px;
        padding: 10px 12px;
    }

    .order-summary {
        display: flex;
    }

    .summary-title {
        font-size: 16px;
    }

    .place-order-btn {
        padding: 12px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 8px;
    }

    .flex-checkout {
        gap: 12px;
    }

    .left-column {
        gap: 8px;
    }

    .section-title {
        font-size: 14px;
    }

    .shadow-container {
        padding: 12px;
        border-radius: 4px;
    }

    .address-name {
        font-size: 13px;
    }

    .payment-option {
        padding: 12px;
    }

    .order-summary {
        padding: 16px;
    }

    .place-order-btn {
        padding: 10px;
        font-size: 14px;
    }
}
