/* ===============================================
   CHECKOUT MODAL STYLES (Flutter-inspired)
   =============================================== */

:root {
    --checkout-accent: #6C63FF;
    --checkout-primary-pink: #FF6B9D;
    --checkout-background: #F4F6FA;
    --checkout-card-bg: #FFFFFF;
    --checkout-surface: #f8f9fa;
    --checkout-primary-text: #2c3e50;
    --checkout-secondary-text: #7f8c8d;
    --checkout-light-gray: #bdc3c7;
    --checkout-border-color: #ecf0f1;
    --checkout-border: #e9ecef;
    --checkout-hover: #f0f0f0;
    --checkout-success: #2ecc71;
    --checkout-error: #e74c3c;
    --checkout-warning: #f39c12;
}

.checkout-modal {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.checkout-modal.active {
    display: flex;
}

.checkout-modal-content {
    background-color: var(--checkout-background);
    width: 95%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.95);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.checkout-modal.active .checkout-modal-content {
    transform: scale(1);
    opacity: 1;
}

.checkout-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background-color: var(--checkout-card-bg);
    border-bottom: 1px solid var(--checkout-border-color);
    flex-shrink: 0;
}

.checkout-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--checkout-primary-text);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkout-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--checkout-light-gray);
    cursor: pointer;
    transition: color 0.2s ease;
}

.checkout-modal-close:hover {
    color: var(--checkout-error);
}

/* Progress Bar */
.checkout-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background-color: var(--checkout-card-bg);
    border-bottom: 1px solid var(--checkout-border-color);
    flex-shrink: 0;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: var(--checkout-light-gray);
    transition: color 0.3s ease;
    flex: 1;
    position: relative;
}

.step-circle {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 2px solid var(--checkout-light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    background-color: var(--checkout-card-bg);
    z-index: 2;
}

.progress-step span {
    font-size: 0.8rem;
    font-weight: 500;
}

.progress-step.active .step-circle {
    border-color: var(--checkout-accent);
    background-color: var(--checkout-accent);
    color: white;
    transform: scale(1.1);
}

.progress-step.active {
    color: var(--checkout-accent);
    font-weight: 700;
}

.progress-step.completed .step-circle {
    border-color: var(--checkout-success);
    background-color: var(--checkout-success);
    color: white;
}

.progress-step.completed {
    color: var(--checkout-success);
}

.progress-line {
    height: 3px;
    background-color: var(--checkout-light-gray);
    flex: 1;
    margin: 0 -2px;
    transform: translateY(-19px);
    transition: background-color 0.3s ease;
    position: relative;
    z-index: 1;
}

.progress-line.completed {
    background-color: var(--checkout-success);
}

/* Modal Body */
.checkout-modal-body {
    flex-grow: 1;
    overflow: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.checkout-step {
    display: none; /* Controlled by JS */
    height: 100%;
}

/* Step 1, 2, and 3 use flex layout for scrollable content with bottom bar */
#step1[style*="flex"],
#step2[style*="flex"],
#step3[style*="flex"] {
    display: flex !important;
    flex-direction: column;
    min-height: 0;
}

/* Other steps use block */
.checkout-step[style*="block"] {
    display: block !important;
}

/* Step 1 Special Layout */
.step-content-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    position: relative;
}

.step-scrollable-content {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 20px;
    min-height: 0;
    padding-right: 4px;
}

.step-scrollable-content::-webkit-scrollbar {
    width: 6px;
}

.step-scrollable-content::-webkit-scrollbar-track {
    background: transparent;
}

.step-scrollable-content::-webkit-scrollbar-thumb {
    background: rgba(189, 195, 199, 0.3);
    border-radius: 3px;
}

.step-scrollable-content::-webkit-scrollbar-thumb:hover {
    background: rgba(189, 195, 199, 0.5);
}

/* Step 5 Layout - Flutter Style */
/* Note: display is controlled by JS, don't use !important here */
.step5-layout {
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.step5-scrollable-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    padding-bottom: 20px;
    -webkit-overflow-scrolling: touch;
}

.step5-scrollable-content::-webkit-scrollbar {
    width: 6px;
}

.step5-scrollable-content::-webkit-scrollbar-track {
    background: transparent;
}

.step5-scrollable-content::-webkit-scrollbar-thumb {
    background: rgba(189, 195, 199, 0.3);
    border-radius: 3px;
}

.step5-scrollable-content::-webkit-scrollbar-thumb:hover {
    background: rgba(189, 195, 199, 0.5);
}

.step1-bottom-bar,
.step2-bottom-bar,
.step4-bottom-bar,
.step5-bottom-bar {
    flex-shrink: 0;
    background-color: var(--checkout-card-bg);
    padding: 16px 20px 20px;
    border-top: 1px solid rgba(189, 195, 199, 0.15);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.02);
    margin-top: 20px;
    width: 100%;
    position: relative;
    z-index: 10;
}

.step3-bottom-bar {
    flex-shrink: 0;
    background-color: var(--checkout-card-bg);
    padding: 16px 20px 20px;
    border-top: 1px solid rgba(189, 195, 199, 0.15);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.02);
    width: 100%;
    position: sticky;
    bottom: 0;
    z-index: 10;
    margin-top: auto; /* Push to bottom in flex container */
}

/* Step 3 Navigation Buttons */
.step3-nav-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.step3-back-btn {
    padding: 12px 20px;
    font-size: 15px;
    border-radius: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: transparent;
    color: var(--checkout-secondary-text);
    border: 1px solid rgba(189, 195, 199, 0.3);
    transition: all 0.2s ease;
    min-width: 100px;
}

.step3-back-btn:hover {
    background-color: rgba(189, 195, 199, 0.1);
    border-color: rgba(189, 195, 199, 0.5);
    color: var(--checkout-primary-text);
}

.step3-continue-btn {
    padding: 12px 24px;
    font-size: 15px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(108, 99, 255, 0.2);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
    max-width: 400px;
    margin-left: auto;
}

.step3-continue-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 99, 255, 0.3);
}

.step3-continue-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Step 4 & 5 Navigation Buttons */
.step4-nav-buttons,
.step5-nav-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.step4-back-btn,
.step5-back-btn {
    padding: 12px 20px;
    font-size: 15px;
    border-radius: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: transparent;
    color: var(--checkout-secondary-text);
    border: 1px solid rgba(189, 195, 199, 0.3);
    transition: all 0.2s ease;
    min-width: 100px;
}

.step4-back-btn:hover,
.step5-back-btn:hover {
    background-color: rgba(189, 195, 199, 0.1);
    border-color: rgba(189, 195, 199, 0.5);
    color: var(--checkout-primary-text);
}

.step4-continue-btn,
.step5-submit-btn {
    padding: 12px 24px;
    font-size: 15px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(108, 99, 255, 0.2);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
    max-width: 400px;
    margin-left: auto;
}

.step4-continue-btn:hover,
.step5-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 99, 255, 0.3);
}

.step4-continue-btn:disabled,
.step5-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Step 1 Navigation Buttons */
.step1-nav-buttons {
    margin-top: 14px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
}

.step1-nav-spacer {
    flex: 1;
}

.step1-continue-btn {
    padding: 12px 24px;
    font-size: 15px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(108, 99, 255, 0.2);
    font-weight: 600;
    min-width: 140px;
}

.step1-continue-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 99, 255, 0.3);
}

/* Step 2 Navigation Buttons */
.step2-nav-buttons {
    margin-top: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.step2-back-btn {
    padding: 12px 20px;
    font-size: 15px;
    border-radius: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: transparent;
    color: var(--checkout-secondary-text);
    border: 1px solid rgba(189, 195, 199, 0.3);
    transition: all 0.2s ease;
}

.step2-back-btn:hover {
    background-color: rgba(189, 195, 199, 0.1);
    border-color: rgba(189, 195, 199, 0.5);
    color: var(--checkout-primary-text);
}

.step2-continue-btn {
    padding: 12px 24px;
    font-size: 15px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(108, 99, 255, 0.2);
    font-weight: 600;
    min-width: 140px;
}

.step2-continue-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 99, 255, 0.3);
}

.step-header {
    text-align: center;
    margin-bottom: 2rem;
}

.step-header h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.8rem;
    color: var(--checkout-primary-text);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.step-header p {
    margin: 0;
    font-size: 1rem;
    color: var(--checkout-secondary-text);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Modal Footer - Flutter Style */
.checkout-modal-footer {
    padding: 20px;
    background-color: var(--checkout-card-bg);
    border-top: none;
    flex-shrink: 0;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.05);
}

/* Price Summary Box */
.checkout-price-summary {
    background: rgba(189, 195, 199, 0.05);
    border: 1px solid rgba(189, 195, 199, 0.1);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.price-row .price-label {
    color: var(--checkout-secondary-text);
    font-size: 14px;
}

.price-row .price-value {
    color: var(--checkout-primary-text);
    font-size: 14px;
    font-weight: 500;
}

.price-row.discount .price-label,
.price-row.discount .price-value {
    color: var(--checkout-success);
}

.price-row.addon .price-value {
    color: var(--checkout-accent);
    font-weight: 600;
}

.price-divider {
    height: 1px;
    background: rgba(189, 195, 199, 0.3);
    margin: 12px 0;
}

.price-row.total .price-label {
    color: var(--checkout-primary-text);
    font-size: 16px;
    font-weight: 600;
}

.price-row.total .price-value {
    color: var(--checkout-accent);
    font-size: 20px;
    font-weight: 700;
}

.checkout-nav-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.checkout-nav-btn, .checkout-submit-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.checkout-back-btn {
    background-color: transparent;
    color: var(--checkout-secondary-text);
    padding: 12px 20px;
}

.checkout-back-btn:hover {
    background-color: var(--checkout-border-color);
}

.checkout-next-btn {
    background: linear-gradient(135deg, var(--checkout-accent), #5a50e8);
    color: white;
    box-shadow: 0 2px 8px rgba(108, 99, 255, 0.25);
    flex: 1;
    max-width: 300px;
    transition: all 0.2s ease;
}

.checkout-next-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 99, 255, 0.35);
}

.checkout-submit-btn {
    background: linear-gradient(135deg, var(--checkout-accent), #5a50e8);
    color: white;
    box-shadow: 0 2px 8px rgba(108, 99, 255, 0.25);
    flex: 1;
    max-width: 300px;
    transition: all 0.2s ease;
}

.checkout-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 99, 255, 0.35);
}

.checkout-submit-btn:disabled {
    background: var(--checkout-light-gray);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.checkout-total-display {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 14px;
    margin-left: 8px;
}

/* Spinner for buttons */
.checkout-submit-btn .spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* General Form Styles */
.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--checkout-primary-text);
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--checkout-light-gray);
    border-radius: 8px;
    font-size: 1rem;
    color: var(--checkout-primary-text);
    background-color: var(--checkout-card-bg);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--checkout-accent);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.2);
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

/* Addon Products (Step 1) - Flutter Style */
.addon-products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 0 4px;
    align-items: start;
}

@media (min-width: 768px) {
    .addon-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .addon-products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.loading-addons {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--checkout-secondary-text);
}

.loading-addons .fa-spinner {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--checkout-accent);
}

.addon-product-card {
    background-color: var(--checkout-card-bg);
    border-radius: 16px;
    border: 1px solid rgba(189, 195, 199, 0.2);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    height: 100%;
    min-height: 295px; /* Başlık 2 satır için artırıldı */
}

.addon-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.addon-product-card.selected {
    border: 2px solid var(--checkout-accent);
    box-shadow: 0 8px 24px rgba(108, 99, 255, 0.15);
}

/* Image Container - Square (Flutter Style) */
.addon-image-container {
    position: relative;
    width: 100%;
    padding: 6px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.05), rgba(108, 99, 255, 0.1));
    min-height: 0;
    overflow: hidden;
}

.addon-product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    max-width: 100%;
    max-height: 100%;
}

/* Use aspect-ratio for square images */
.addon-image-container::before {
    content: '';
    display: block;
    padding-top: 100%; /* 1:1 Aspect Ratio */
}

.addon-image-container > img,
.addon-image-container > .addon-product-placeholder {
    position: absolute;
    top: 6px;
    left: 6px;
    right: 6px;
    bottom: 6px;
    width: calc(100% - 12px);
    height: calc(100% - 12px);
    border-radius: 12px;
}

.addon-image-container > img {
    object-fit: cover;
}

.addon-product-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(108, 99, 255, 0.1);
    font-size: 32px;
    color: var(--checkout-accent);
}

/* Quantity Badge (Flutter Style) */
.addon-quantity-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: var(--checkout-accent);
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 4px 6px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 2;
    min-width: 20px;
    text-align: center;
}

/* Product Info (Flutter Style - Fixed Height) */
.addon-product-info {
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-height: 85px; /* Başlık 2 satır + açıklama + fiyat için artırıldı */
    flex-shrink: 0;
}

.addon-product-name {
    font-weight: 600;
    color: var(--checkout-primary-text);
    font-size: 12px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 2px;
    min-height: 31.2px; /* 12px * 1.3 * 2 satır için yeterli alan */
    max-height: 31.2px; /* İki satır için maksimum yükseklik */
}

.addon-product-description {
    font-size: 9px;
    color: var(--checkout-secondary-text);
    line-height: 1.1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 0 0 auto;
    margin-bottom: 2px;
    min-height: 19.8px; /* 9px * 1.1 * 2 satır için yeterli alan */
}

/* Price and Quantity Row (Flutter Style) */
.addon-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 2px;
    flex-shrink: 0;
}

.addon-product-price {
    color: var(--checkout-accent);
    font-weight: bold;
    font-size: 14px;
}

/* Quantity Controls - Flutter Style */
.addon-quantity-control {
    display: flex;
    align-items: center;
    background: rgba(189, 195, 199, 0.1);
    border-radius: 14px;
    overflow: hidden;
    gap: 0;
}

.addon-quantity-btn {
    width: 28px;
    height: 28px;
    border: none;
    background-color: transparent;
    border-radius: 14px;
    color: var(--checkout-secondary-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s ease;
}

.addon-quantity-btn:hover:not(:disabled) {
    background: rgba(108, 99, 255, 0.1);
    color: var(--checkout-accent);
}

.addon-quantity-btn.active {
    background: rgba(108, 99, 255, 0.1);
    color: var(--checkout-accent);
}

.addon-quantity-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.addon-quantity-value {
    min-width: 20px;
    text-align: center;
    font-size: 12px;
    font-weight: bold;
    color: var(--checkout-primary-text);
    padding: 0 3px;
}

/* ========================================
   ADDON PRICE SUMMARY (Step 1 - Flutter Style)
======================================== */
.addon-price-summary {
    margin-top: 0;
    padding-top: 0;
    margin-bottom: 0;
}

.price-summary-box {
    background: rgba(189, 195, 199, 0.03);
    border: 1px solid rgba(189, 195, 199, 0.08);
    border-radius: 10px;
    padding: 10px 14px;
}

.price-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
}

.price-summary-label {
    color: var(--checkout-secondary-text);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.price-summary-label i {
    color: var(--checkout-success);
    font-size: 16px;
}

.price-summary-value {
    color: var(--checkout-primary-text);
    font-size: 13px;
    font-weight: 500;
}

.price-summary-value.discount {
    color: var(--checkout-success);
    font-weight: 600;
}

.price-summary-value.addon {
    color: var(--checkout-accent);
    font-weight: 600;
}

.price-summary-value.message-free {
    color: var(--checkout-success);
    font-size: 12px;
    font-weight: 600;
}

.price-summary-value.total {
    color: var(--checkout-accent);
    font-size: 17px;
    font-weight: 700;
}

.price-summary-row.price-summary-total {
    padding: 8px 0 4px;
}

.price-summary-row.price-summary-total .price-summary-label {
    color: var(--checkout-primary-text);
    font-size: 14px;
    font-weight: 600;
}

.price-summary-divider {
    height: 1px;
    background: rgba(189, 195, 199, 0.15);
    margin: 8px 0;
}

/* Message Cards (Step 2) - Flutter Style Row Layout (Exact Match) */
.message-cards-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.message-card-option {
    background-color: var(--checkout-card-bg);
    border-radius: 16px;
    border: 1px solid rgba(189, 195, 199, 0.2);
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: none;
}

.message-card-option:hover {
    transform: none;
}

.message-card-option.selected {
    border: 2px solid var(--checkout-accent);
    box-shadow: 0 2px 8px rgba(108, 99, 255, 0.1);
}

/* Icon Container (60x60 - Flutter Exact) */
.message-card-icon-container {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    background-color: rgba(108, 99, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.message-card-icon-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.message-card-icon {
    font-size: 30px;
    color: var(--checkout-accent);
}

/* Content (Flutter Column with crossAxisAlignment start) */
.message-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
}

.message-card-name {
    font-weight: 600;
    color: var(--checkout-primary-text);
    font-size: 16px;
    line-height: 1.3;
    margin-bottom: 4px;
}

.message-card-description {
    font-size: 13px;
    color: var(--checkout-secondary-text);
    line-height: 1.4;
    margin-bottom: 8px;
}

.message-card-free-badge {
    display: inline-block;
    padding: 4px 8px;
    background-color: rgba(76, 175, 80, 0.1);
    color: #388e3c; /* green.shade700 equivalent */
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    width: fit-content;
}

/* Radio Button (Flutter Exact - 24x24 circle) */
.message-card-radio {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 2px solid rgba(189, 195, 199, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    transition: all 0.2s ease;
}

.message-card-option.selected .message-card-radio {
    border: none;
    background-color: var(--checkout-accent);
}

.message-card-radio i {
    color: white;
    font-size: 16px;
    display: none;
}

.message-card-option.selected .message-card-radio i {
    display: block;
}

/* Message Text Section (Flutter Style - Exact Match) */
.message-text-section {
    margin-top: 24px;
}

.message-text-title {
    color: var(--checkout-primary-text);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

.message-text-container {
    background-color: var(--checkout-card-bg);
    border-radius: 16px;
    border: 1px solid rgba(189, 195, 199, 0.2);
    overflow: hidden;
}

.message-text-section textarea {
    width: 100%;
    min-height: 100px;
    padding: 16px;
    border: none;
    background: transparent;
    color: var(--checkout-primary-text);
    font-size: 16px;
    line-height: 1.4;
    resize: vertical;
    font-family: inherit;
}

.message-text-section textarea::placeholder {
    color: var(--checkout-secondary-text);
}

.message-text-section textarea:focus {
    outline: none;
}

.char-count {
    text-align: right;
    font-size: 12px;
    color: var(--checkout-secondary-text);
    margin-top: 8px;
}

/* Delivery Info (Step 3) */
.delivery-method-section {
    margin-top: 2rem;
}

.delivery-method-options {
    display: flex;
    gap: 16px;
    width: 100%;
}

.delivery-method-option {
    flex: 1;
    background-color: var(--checkout-card-bg);
    border: 1px solid rgba(189, 195, 199, 0.3);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.delivery-method-option.selected {
    border: 2px solid var(--checkout-accent);
    background-color: rgba(108, 99, 255, 0.1);
    box-shadow: 0 2px 8px rgba(108, 99, 255, 0.1);
}

.delivery-method-option .method-icon i {
    font-size: 2.5rem;
    color: var(--checkout-secondary-text);
    margin-bottom: 0.5rem;
}

.delivery-method-option.selected .method-icon i {
    color: var(--checkout-accent);
}

.method-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--checkout-primary-text);
}

.method-desc {
    font-size: 0.9rem;
    color: var(--checkout-secondary-text);
}

.pickup-discount {
    color: var(--checkout-success);
    font-weight: bold;
}

/* Billing Info (Step 4) */
.billing-type-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--checkout-border-color);
}

.billing-tab {
    padding: 1rem 1.5rem;
    border: none;
    background-color: transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: var(--checkout-secondary-text);
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.billing-tab.active {
    color: var(--checkout-accent);
    font-weight: 600;
    border-bottom-color: var(--checkout-accent);
}

/* Payment (Step 5) */
.checkout-section {
    background-color: var(--checkout-card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.checkout-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: var(--checkout-primary-text);
    font-weight: 600;
}

.checkout-order-summary .summary-row, .installment-detail .installment-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
}
.summary-divider {
    border-top: 1px dashed var(--checkout-light-gray);
    margin: 0.5rem 0;
}
.total-row {
    font-weight: bold;
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.payment-method-tile {
    /* Uses .message-card-item styles */
}

.bank-transfer-info {
    margin-top: 1rem;
    background-color: var(--checkout-background);
    padding: 1rem;
    border-radius: 8px;
}

.credit-card-form {
    margin-top: 1.5rem;
}

.terms-conditions {
    margin-top: 1rem;
}
.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.terms-text {
    font-size: 0.9rem;
    color: var(--checkout-secondary-text);
}
.terms-link {
    color: var(--checkout-accent);
    text-decoration: underline;
}

/* Toast */
.checkout-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translate(-50%, -150%);
    background-color: var(--checkout-primary-text);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: transform 0.4s ease;
}
.checkout-toast.show {
    transform: translate(-50%, 0);
}
.checkout-toast-error { background-color: var(--checkout-error); }
.checkout-toast-success { background-color: var(--checkout-success); }

/* ========================================
   ORDER SUCCESS MODAL (Flutter Style)
======================================== */
.order-success-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.order-success-modal.active {
    visibility: visible;
    opacity: 1;
}

.order-success-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.order-success-content {
    position: relative;
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s ease 0.1s;
}

.order-success-modal.active .order-success-content {
    transform: scale(1);
    opacity: 1;
}

.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--checkout-success), #2ecc71);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    animation: successPulse 2s ease infinite;
}

@keyframes successPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.4); }
    50% { box-shadow: 0 0 0 15px rgba(76, 175, 80, 0); }
}

.success-icon i {
    font-size: 36px;
    color: white;
}

.order-success-content h2 {
    font-size: 24px;
    color: var(--checkout-primary-text);
    margin-bottom: 10px;
}

.success-message {
    color: var(--checkout-secondary-text);
    font-size: 15px;
    margin-bottom: 25px;
}

.order-details-card {
    background: var(--checkout-surface);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.order-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--checkout-border);
}

.order-detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: var(--checkout-secondary-text);
    font-size: 14px;
}

.detail-value {
    color: var(--checkout-primary-text);
    font-weight: 600;
    font-size: 14px;
}

.detail-value.status-pending {
    color: #ff9800;
    background: rgba(255, 152, 0, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
}

.success-info-box {
    background: rgba(108, 99, 255, 0.08);
    border-radius: 10px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
}

.success-info-box i {
    color: var(--checkout-accent);
    font-size: 18px;
}

.success-info-box span {
    color: var(--checkout-secondary-text);
    font-size: 13px;
    text-align: left;
}

.success-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.success-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.success-btn.primary {
    background: linear-gradient(135deg, var(--checkout-accent), #5a50e8);
    color: white;
}

.success-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 99, 255, 0.3);
}

.success-btn.secondary {
    background: var(--checkout-surface);
    color: var(--checkout-primary-text);
    border: 1px solid var(--checkout-border);
}

.success-btn.secondary:hover {
    background: var(--checkout-hover);
}

/* ========================================
   STEP 3: ORDER SUMMARY CARD
======================================== */
.order-summary-card {
    background: var(--checkout-card-bg);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid var(--checkout-border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.order-summary-header-row {
    display: flex;
    align-items: flex-start; /* Changed from center to flex-start for better alignment */
    gap: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--checkout-border-color);
    margin-bottom: 15px;
}

.order-summary-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--checkout-accent), #5a50e8);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.order-summary-icon i {
    color: white;
    font-size: 20px;
}

.order-summary-info {
    flex: 1;
    min-width: 0; /* Allow flex item to shrink */
}

.order-summary-title {
    display: block;
    font-weight: 600;
    color: var(--checkout-primary-text);
    font-size: 16px;
    margin: 0 0 4px 0;
}

.order-summary-subtitle {
    display: block;
    color: var(--checkout-secondary-text);
    font-size: 13px;
    margin: 0;
}

.order-summary-total {
    text-align: right;
    flex-shrink: 0;
    min-width: fit-content; /* Prevents squeezing */
}

.order-total-price {
    display: block;
    font-weight: 700;
    color: var(--checkout-accent);
    font-size: 20px;
    margin: 0 0 2px 0;
}

.order-total-tax {
    display: block;
    color: var(--checkout-secondary-text);
    font-size: 11px;
    margin: 0;
    text-align: right;
}

.order-summary-items {
    margin-bottom: 15px;
}

/* Order Item Row (Flutter Style with Images) */
.order-item-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 8px;
    background-color: var(--checkout-background);
    border-radius: 8px;
}

.order-item-image {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    border-radius: 8px;
    background-color: rgba(108, 99, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.order-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.order-item-image i {
    font-size: 30px;
    color: var(--checkout-accent);
}

.order-item-image.addon-image {
    background-color: rgba(108, 99, 255, 0.05);
    border: 1px solid rgba(108, 99, 255, 0.2);
}

.order-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.order-item-row .item-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--checkout-primary-text);
    display: flex;
    align-items: center;
    gap: 4px;
}

.order-item-row .item-name i {
    font-size: 16px;
    color: var(--checkout-accent);
}

.item-details {
    font-size: 12px;
    color: var(--checkout-secondary-text);
}

.order-item-row .item-price {
    font-size: 14px;
    font-weight: 600;
    color: var(--checkout-accent);
    flex-shrink: 0;
}

.order-item-row.addon-item {
    background-color: rgba(108, 99, 255, 0.05);
    border: 1px solid rgba(108, 99, 255, 0.2);
}

.order-item-row.message-card-item {
    background-color: rgba(108, 99, 255, 0.05);
    border: 1px solid rgba(108, 99, 255, 0.2);
}

.order-summary-shipping {
    padding-top: 15px;
    border-top: 1px solid var(--checkout-border-color);
}

.shipping-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.shipping-icon {
    width: 50px;
    height: 50px;
    background: rgba(108, 99, 255, 0.1);
    border-radius: 12px; /* Same as main icon */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.shipping-icon i {
    color: var(--checkout-accent);
    font-size: 20px; /* Same as main icon */
}

.shipping-label {
    flex: 1;
    color: var(--checkout-secondary-text);
    font-size: 14px;
    font-weight: 500;
}

.shipping-value {
    font-weight: 600;
    color: var(--checkout-success);
    font-size: 14px;
    flex-shrink: 0;
}

.shipping-value.discount {
    color: var(--checkout-success);
}

/* ========================================
   BILLING ADDRESS SELECTION (Step 4)
======================================== */
.billing-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.billing-no-address {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.empty-state {
    max-width: 400px;
    width: 100%;
}

.empty-icon {
    width: 120px;
    height: 120px;
    background: rgba(108, 99, 255, 0.1);
    border-radius: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.empty-icon i {
    font-size: 60px;
    color: var(--checkout-accent);
}

.billing-no-address h3 {
    color: var(--checkout-primary-text);
    margin: 0 0 12px;
    font-size: 24px;
}

.billing-no-address p {
    color: var(--checkout-secondary-text);
    margin: 0 0 32px;
    font-size: 16px;
    line-height: 1.5;
}

.billing-instructions {
    text-align: center;
    margin-bottom: 24px;
}

.billing-instructions p {
    color: var(--checkout-secondary-text);
    font-size: 16px;
    line-height: 1.4;
}

.billing-addresses-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

/* Billing Address Card */
.billing-address-card {
    background: var(--checkout-card-bg);
    border: 1px solid var(--checkout-border-color);
    border-radius: 12px;
    overflow: hidden;
}

.billing-address-card.selected {
    border-color: var(--checkout-accent);
    box-shadow: 0 4px 12px rgba(108, 99, 255, 0.15);
}

.billing-address-card-header {
    display: flex;
    align-items: center;
    padding: 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.billing-address-card-header:hover {
    background-color: var(--checkout-background);
}

.billing-address-icon-box {
    width: 36px;
    height: 36px;
    background: rgba(108, 99, 255, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 12px;
}

.billing-address-icon-box i {
    color: var(--checkout-accent);
    font-size: 18px;
}

.billing-address-info {
    flex: 1;
    min-width: 0;
}

.billing-address-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.billing-address-title {
    font-weight: 600;
    color: var(--checkout-primary-text);
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.billing-address-default-badge {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
    font-size: 9px;
    font-weight: 700;
    padding: 4px 6px;
    border-radius: 6px;
    white-space: nowrap;
}

.billing-address-subtitle {
    font-size: 13px;
    color: var(--checkout-secondary-text);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.billing-address-location {
    font-size: 11px;
    color: var(--checkout-secondary-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.billing-address-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 12px;
}

.billing-address-expand-btn,
.billing-address-edit-btn {
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--checkout-secondary-text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.billing-address-expand-btn:hover,
.billing-address-edit-btn:hover {
    background: var(--checkout-background);
    color: var(--checkout-primary-text);
}

.billing-address-radio {
    position: relative;
    display: inline-block;
    width: 20px;
    height: 20px;
}

.billing-address-radio input {
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-custom {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: var(--checkout-background);
    border: 2px solid var(--checkout-light-gray);
    border-radius: 50%;
    transition: all 0.2s ease;
}

input:checked ~ .radio-custom {
    background-color: var(--checkout-accent);
    border-color: var(--checkout-accent);
}

.radio-custom:after {
    content: "";
    position: absolute;
    display: none;
}

input:checked ~ .radio-custom:after {
    display: block;
}

.billing-address-radio input:checked ~ .radio-custom:after {
    left: 50%;
    top: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: white;
    transform: translate(-50%, -50%);
}

.billing-address-details {
    padding: 0 16px 16px;
    border-top: 1px dashed var(--checkout-border-color);
}

.billing-address-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}

.billing-address-detail-item:last-child {
    margin-bottom: 0;
}

.billing-address-detail-item i {
    color: var(--checkout-secondary-text);
    font-size: 14px;
    margin-top: 2px;
    flex-shrink: 0;
}

.billing-address-detail-content {
    flex: 1;
}

.billing-address-detail-label {
    display: block;
    font-size: 12px;
    color: var(--checkout-secondary-text);
    margin-bottom: 2px;
}

.billing-address-detail-value {
    display: block;
    font-size: 14px;
    color: var(--checkout-primary-text);
    font-weight: 500;
    line-height: 1.3;
}

.billing-add-new-section {
    margin: 24px 0;
    text-align: center;
}

.billing-form-section {
    display: none;
    padding: 0 20px 20px;
}

.billing-form-container {
    background: var(--checkout-card-bg);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--checkout-border-color);
}

.section-title h4 {
    margin: 0 0 24px;
    font-size: 20px;
    color: var(--checkout-primary-text);
    text-align: center;
}

.billing-type-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--checkout-border-color);
    padding-bottom: 16px;
}

.customer-type-btn {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--checkout-border-color);
    background: transparent;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--checkout-secondary-text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.customer-type-btn.active {
    border-color: var(--checkout-accent);
    color: var(--checkout-accent);
    background: rgba(108, 99, 255, 0.05);
}

.customer-type-btn i {
    font-size: 18px;
}

.customer-type-btn span {
    font-size: 14px;
    font-weight: 500;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

/* ========================================
   BILLING INFO SUMMARY (Step 5)
======================================== */
.billing-info-summary,
.delivery-info-summary {
    background: var(--checkout-surface);
    border-radius: 12px;
    padding: 15px;
}

.billing-info-row,
.delivery-info-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--checkout-border);
}

.billing-info-row:last-child,
.delivery-info-row:last-child {
    border-bottom: none;
}

.billing-info-row > i,
.delivery-info-row > i {
    width: 32px;
    height: 32px;
    background: rgba(108, 99, 255, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--checkout-accent);
    font-size: 14px;
    flex-shrink: 0;
}

.billing-info-content,
.delivery-info-content {
    flex: 1;
}

.billing-info-content label,
.delivery-info-content label {
    display: block;
    font-size: 12px;
    color: var(--checkout-secondary-text);
    margin-bottom: 3px;
}

.billing-info-content span,
.delivery-info-content span {
    display: block;
    font-size: 14px;
    color: var(--checkout-primary-text);
    font-weight: 500;
    white-space: pre-line;
}

/* ========================================
   DELIVERY METHOD
======================================== */
.delivery-method-section {
    margin-bottom: 24px;
}

.delivery-method-section h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    color: var(--checkout-primary-text);
    margin-bottom: 15px;
}

.delivery-method-section h4 i {
    color: var(--checkout-accent);
}

.delivery-method-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.delivery-method-option {
    padding: 12px;
    border: 2px solid var(--checkout-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.delivery-method-option:hover {
    border-color: var(--checkout-accent);
    background: rgba(108, 99, 255, 0.03);
}

.delivery-method-option.selected {
    border-color: var(--checkout-accent);
    background: rgba(108, 99, 255, 0.08);
}

.method-radio {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--checkout-border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-bottom: 8px;
    flex-shrink: 0;
}

.delivery-method-option.selected .method-radio {
    border-color: var(--checkout-accent);
    background: var(--checkout-accent);
}

.method-radio i {
    font-size: 10px;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.delivery-method-option.selected .method-radio i {
    opacity: 1;
}

.method-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    flex-shrink: 0;
    background: rgba(108, 99, 255, 0.1);
}

.method-icon i {
    font-size: 18px;
    color: var(--checkout-accent);
}

.method-info {
    width: 100%;
}

.method-title {
    display: block;
    font-weight: 600;
    color: var(--checkout-primary-text);
    font-size: 14px;
    margin-bottom: 4px;
}

.delivery-method-option.selected .method-title {
    color: var(--checkout-accent);
}

.method-desc {
    display: block;
    font-size: 12px;
    color: var(--checkout-secondary-text);
    line-height: 1.3;
}

.pickup-discount {
    color: var(--checkout-success);
    font-weight: 600;
    font-size: 12px;
}

/* Pickup Location Card */
.pickup-location-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.05), rgba(108, 99, 255, 0.1));
    border-radius: 12px;
    border: 1px dashed var(--checkout-accent);
}

.pickup-icon {
    width: 50px;
    height: 50px;
    background: var(--checkout-accent);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pickup-icon i {
    font-size: 22px;
    color: white;
}

.pickup-info {
    flex: 1;
}

.pickup-name {
    display: block;
    font-weight: 600;
    color: var(--checkout-primary-text);
    font-size: 15px;
    margin-bottom: 3px;
}

.pickup-address {
    display: block;
    font-size: 13px;
    color: var(--checkout-secondary-text);
    margin-bottom: 5px;
}

.pickup-phone {
    display: block;
    font-size: 13px;
    color: var(--checkout-secondary-text);
    margin-bottom: 10px;
}

.pickup-map-link {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(108, 99, 255, 0.1);
    border-radius: 8px;
    font-size: 13px;
    color: var(--checkout-accent);
    text-decoration: none;
    text-align: center;
    width: fit-content;
}

.pickup-map-link:hover {
    background: rgba(108, 99, 255, 0.2);
    text-decoration: none;
}

/* ========================================
   MOBILE RESPONSIVE
======================================== */
@media (max-width: 768px) {
    .order-success-content {
        padding: 30px 20px;
        margin: 20px;
    }

    .success-icon {
        width: 70px;
        height: 70px;
    }

    .success-icon i {
        font-size: 30px;
    }

    .order-success-content h2 {
        font-size: 20px;
    }

    .delivery-method-options {
        grid-template-columns: 1fr;
    }

    .order-summary-header-row {
        flex-wrap: wrap;
    }

    .order-summary-total {
        width: 100%;
        text-align: left;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px dashed var(--checkout-border);
    }
}
/* ===============================================
   PAYMENT METHOD TILES (Flutter Style)
   =============================================== */

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.payment-method-tile {
    display: flex;
    align-items: center;
    padding: 16px;
    background: var(--checkout-card-bg);
    border: 2px solid var(--checkout-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-method-tile:hover {
    border-color: var(--checkout-accent);
    background: rgba(108, 99, 255, 0.02);
}

.payment-method-tile.active {
    border-color: var(--checkout-accent);
    background: rgba(108, 99, 255, 0.05);
    box-shadow: 0 2px 8px rgba(108, 99, 255, 0.15);
}

.payment-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--checkout-accent), var(--checkout-primary-pink));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    flex-shrink: 0;
}

.payment-icon i {
    font-size: 22px;
    color: white;
}

.payment-info {
    flex: 1;
}

.payment-info h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--checkout-primary-text);
}

.payment-info p {
    margin: 0;
    font-size: 13px;
    color: var(--checkout-secondary-text);
}

.payment-radio {
    margin-left: 12px;
}

.radio-circle {
    width: 22px;
    height: 22px;
    border: 2px solid var(--checkout-light-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.radio-circle.active {
    border-color: var(--checkout-accent);
    background: var(--checkout-accent);
}

.radio-circle.active::after {
    content: '';
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

/* Bank Transfer Info Box */
.bank-transfer-info {
    background: #e3f2fd;
    border: 1px solid #90caf9;
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
}

.bank-info-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #90caf9;
}

.bank-info-header i {
    font-size: 20px;
    color: #1565c0;
    background: #bbdefb;
    padding: 8px;
    border-radius: 8px;
}

.bank-info-header span {
    font-size: 16px;
    font-weight: 600;
    color: #0d47a1;
}

.bank-info-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.bank-info-row i {
    font-size: 16px;
    color: #1565c0;
    margin-top: 2px;
    width: 20px;
}

.bank-info-row div {
    flex: 1;
}

.bank-info-row label {
    display: block;
    font-size: 12px;
    color: #5c6bc0;
    margin-bottom: 2px;
}

.bank-info-row span {
    font-size: 14px;
    font-weight: 500;
    color: #1a237e;
}

.bank-info-notice {
    display: flex;
    gap: 12px;
    background: #fff3e0;
    border: 1px solid #ffcc80;
    border-radius: 8px;
    padding: 12px;
    margin-top: 16px;
}

.bank-info-notice i {
    font-size: 18px;
    color: #e65100;
    flex-shrink: 0;
}

.bank-info-notice strong {
    display: block;
    font-size: 14px;
    color: #e65100;
    margin-bottom: 4px;
}

.bank-info-notice p {
    margin: 0;
    font-size: 13px;
    color: #bf360c;
    line-height: 1.4;
}

/* Credit Card Form */
.credit-card-form {
    background: var(--checkout-card-bg);
    border-radius: 12px;
    padding: 20px;
    margin-top: 16px;
    border: 1px solid var(--checkout-border);
}

.card-form-row {
    margin-bottom: 16px;
}

.card-form-row.three-cols {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

.credit-card-form .form-group {
    margin-bottom: 0;
}

.credit-card-form .form-group.full-width {
    width: 100%;
}

.credit-card-form label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--checkout-secondary-text);
    margin-bottom: 8px;
}

.credit-card-form input,
.credit-card-form select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--checkout-border);
    border-radius: 8px;
    font-size: 15px;
    color: var(--checkout-primary-text);
    background: var(--checkout-surface);
    transition: all 0.3s ease;
}

.credit-card-form input:focus,
.credit-card-form select:focus {
    outline: none;
    border-color: var(--checkout-accent);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--checkout-light-gray);
    font-size: 16px;
}

.input-with-icon input {
    padding-left: 42px;
}

/* Installment Details */
.installment-detail {
    background: var(--checkout-surface);
    border-radius: 8px;
    padding: 12px;
    margin-top: 12px;
}

.installment-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
}

.installment-row span:first-child {
    color: var(--checkout-secondary-text);
}

.installment-row span:last-child {
    font-weight: 500;
    color: var(--checkout-primary-text);
}

.fee-value {
    color: var(--checkout-error) !important;
}

/* 3D Secure Checkbox */
.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0;
}

.checkbox-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--checkout-accent);
    cursor: pointer;
}

.checkbox-row label {
    font-size: 14px;
    color: var(--checkout-primary-text);
    cursor: pointer;
}

/* Terms & Conditions */
.terms-conditions {
    background: var(--checkout-surface);
    border-radius: 12px;
    padding: 16px;
}

.terms-text {
    color: var(--checkout-primary-text);
}

.terms-link {
    color: var(--checkout-accent);
    text-decoration: underline;
    cursor: pointer;
}

.terms-link:hover {
    color: var(--checkout-primary-pink);
}

/* ===============================================
   LEGAL DOCUMENT MODAL (Flutter Style)
   =============================================== */

.legal-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.legal-modal.active {
    display: flex;
}

.legal-modal-content {
    background: var(--checkout-card-bg);
    width: 95%;
    max-width: 700px;
    max-height: 85vh;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.legal-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--checkout-border);
    background: linear-gradient(135deg, var(--checkout-accent), var(--checkout-primary-pink));
}

.legal-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.legal-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.legal-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.legal-modal-close i {
    font-size: 18px;
    color: white;
}

.legal-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--checkout-primary-text);
}

.legal-modal-body h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--checkout-accent);
    margin: 20px 0 12px 0;
}

.legal-modal-body h4:first-child {
    margin-top: 0;
}

.legal-modal-body p {
    margin: 0 0 12px 0;
}

.legal-modal-body ul {
    margin: 0 0 12px 0;
    padding-left: 20px;
}

.legal-modal-body li {
    margin-bottom: 6px;
}

.legal-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--checkout-border);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.legal-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.legal-btn-cancel {
    background: var(--checkout-surface);
    border: 1px solid var(--checkout-border);
    color: var(--checkout-secondary-text);
}

.legal-btn-cancel:hover {
    background: var(--checkout-border);
}

.legal-btn-accept {
    background: linear-gradient(135deg, var(--checkout-accent), var(--checkout-primary-pink));
    border: none;
    color: white;
}

.legal-btn-accept:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Legal Accept Button */
.legal-accept-btn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--checkout-accent), var(--checkout-primary-pink));
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.legal-accept-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.3);
}

.legal-accept-btn i {
    font-size: 16px;
}

/* Legal Content Styles */
.legal-content {
    font-size: 14px;
    line-height: 1.7;
    color: var(--checkout-primary-text);
}

.legal-content h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--checkout-accent);
    margin: 24px 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--checkout-accent);
}

.legal-content h3:first-child {
    margin-top: 0;
}

.legal-content h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--checkout-primary-text);
    margin: 20px 0 10px 0;
}

.legal-content p {
    margin: 0 0 10px 0;
    text-align: justify;
}

/* Legal Tables */
.legal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 13px;
}

.legal-table td,
.legal-table th {
    padding: 10px 12px;
    border: 1px solid var(--checkout-border);
    text-align: left;
}

.legal-table th {
    background: var(--checkout-surface);
    font-weight: 600;
    color: var(--checkout-primary-text);
}

.legal-table tr:nth-child(even) td {
    background: var(--checkout-surface);
}

.legal-table td:first-child {
    width: 35%;
    font-weight: 500;
    color: var(--checkout-secondary-text);
}

.legal-table.product-table td:first-child {
    width: auto;
    font-weight: normal;
    color: var(--checkout-primary-text);
}

.legal-table.product-table th {
    background: var(--checkout-accent);
    color: white;
}

/* Legal Footer Note */
.legal-footer-note {
    margin-top: 24px;
    padding: 16px;
    background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
    border-radius: 10px;
    border-left: 4px solid #4CAF50;
}

.legal-footer-note p {
    margin: 0;
    color: #2E7D32;
}

.legal-footer-note p:last-child {
    margin-top: 8px;
    font-size: 12px;
    color: #558B2F;
}

/* Legal Modal Overlay */
.legal-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: -1;
}

/* Modal display fix */
.legal-modal[style*="display: flex"] {
    display: flex !important;
}

/* Summary Info Cards (Step 5) */
.billing-info-summary,
.delivery-info-summary {
    background: var(--checkout-card-bg);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--checkout-border);
}

.billing-info-row,
.delivery-info-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--checkout-border);
}

.billing-info-row:last-child,
.delivery-info-row:last-child {
    border-bottom: none;
}

.billing-info-row i,
.delivery-info-row i {
    font-size: 16px;
    color: var(--checkout-accent);
    margin-top: 2px;
    width: 20px;
}

.billing-info-content,
.delivery-info-content {
    flex: 1;
}

.billing-info-content label,
.delivery-info-content label {
    display: block;
    font-size: 12px;
    color: var(--checkout-secondary-text);
    margin-bottom: 2px;
}

.billing-info-content span,
.delivery-info-content span {
    font-size: 14px;
    color: var(--checkout-primary-text);
    white-space: pre-line;
}

/* ===============================================
   3D SECURE MODAL STYLES
   =============================================== */

.threeds-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.threeds-modal.active {
    display: flex;
}

.threeds-modal-content {
    background: white;
    width: 95%;
    max-width: 500px;
    max-height: 80vh;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: threeds-slide-up 0.3s ease-out;
}

@keyframes threeds-slide-up {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.threeds-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--checkout-accent), #8B5CF6);
    color: white;
}

.threeds-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.threeds-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.threeds-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.threeds-modal-body {
    padding: 0;
    height: 60vh;
    min-height: 400px;
}

.threeds-modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ===============================================
   TEST CARD BUTTON (Sandbox Only)
   =============================================== */

.test-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #FFF3E0;
    color: #E65100;
    border: 1px dashed #FFB74D;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 12px;
}

.test-card-btn:hover {
    background: #FFE0B2;
    border-color: #FF9800;
}

.test-card-btn i {
    font-size: 14px;
}

/* Card type detection display */
.detected-card-type {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--checkout-surface);
    border-radius: 6px;
    font-size: 12px;
    color: var(--checkout-secondary-text);
    margin-left: auto;
}

.detected-card-type i {
    font-size: 18px;
}

.detected-card-type i.fa-cc-visa {
    color: #1A1F71;
}

.detected-card-type i.fa-cc-mastercard {
    color: #EB001B;
}

/* ===============================================
   CARD FORM ENHANCEMENTS
   =============================================== */

.card-input-wrapper {
    position: relative;
}

.card-input-wrapper input {
    padding-right: 100px;
}

.card-type-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    color: #ccc;
}

.card-type-icon.visa {
    color: #1A1F71;
}

.card-type-icon.mastercard {
    color: #EB001B;
}

.card-type-icon.amex {
    color: #006FCF;
}

/* Installment select enhanced */
.installment-select-wrapper {
    margin-top: 16px;
}

.installment-select-wrapper label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--checkout-primary-text);
    margin-bottom: 8px;
}

.installment-select-wrapper select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--checkout-border);
    border-radius: 10px;
    font-size: 14px;
    background: white;
    color: var(--checkout-primary-text);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236C63FF' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.installment-select-wrapper select:focus {
    outline: none;
    border-color: var(--checkout-accent);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}

/* 3D Secure toggle */
.threeds-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 12px;
    background: #E8F5E9;
    border-radius: 10px;
}

.threeds-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #4CAF50;
}

.threeds-toggle label {
    font-size: 13px;
    color: #2E7D32;
    cursor: pointer;
}

.threeds-toggle .threeds-info {
    margin-left: auto;
    font-size: 11px;
    color: #66BB6A;
}

/* Sandbox mode indicator */
.sandbox-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #FF9800, #F57C00);
    color: white;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sandbox-indicator i {
    font-size: 12px;
}

/* Sandbox test section */
.sandbox-test-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(135deg, #FFF8E1, #FFECB3);
    border: 1px solid #FFD54F;
    border-radius: 12px;
    margin-bottom: 16px;
}

/* Label row with card type */
.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.label-row label {
    margin-bottom: 0 !important;
}

/* Card form enhancements */
.credit-card-form .card-form-row {
    margin-bottom: 16px;
}

.credit-card-form .form-group.full-width {
    width: 100%;
}

.credit-card-form .input-with-icon {
    position: relative;
}

.credit-card-form .input-with-icon i:first-child {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--checkout-secondary-text);
    font-size: 16px;
}

.credit-card-form .input-with-icon input {
    padding-left: 42px;
}

/* Three column layout for expiry/cvv */
.credit-card-form .three-cols {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

/* Installment detail box */
.installment-detail {
    background: var(--checkout-surface);
    border-radius: 10px;
    padding: 12px 16px;
    margin-top: 12px;
}

.installment-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
}

.installment-row:not(:last-child) {
    border-bottom: 1px solid var(--checkout-border);
}

.installment-row .fee-value {
    color: var(--checkout-warning);
    font-weight: 500;
}
