/* --- Wizard Checkout Styles --- */

:root {
    --primary-color: #2563eb;
    --bg-input: #f9fafb;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --border: #e5e7eb;
}

body.checkout-page {
    background-color: #f3f4f6;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    overflow-x: hidden;
}

/* --- Header (matches main site) --- */
.checkout-page header {
    height: 70px;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #111827;
    color: white;
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Show all navigation elements like main site */
.checkout-page nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.checkout-page nav a {
    color: #e5e7eb;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.checkout-page nav a:hover,
.checkout-page nav a.active {
    color: #3b82f6;
}

.checkout-page .header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.checkout-page .dropdown-btn {
    background: transparent;
    border: none;
    color: #e5e7eb;
    cursor: pointer;
    font-size: 0.95rem;
}

.checkout-page .dropdown-content {
    display: none;
    position: absolute;
    background: #1f2937;
    border-radius: 8px;
    min-width: 180px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 100;
}

.checkout-page .dropdown:hover .dropdown-content {
    display: block;
}

.checkout-page .dropdown-content a {
    display: block;
    padding: 0.75rem 1rem;
    color: #e5e7eb;
    text-decoration: none;
}

.checkout-page .dropdown-content a:hover {
    background: #374151;
}

.checkout-page .brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.checkout-page .brand-logo img {
    height: 35px;
    width: auto;
}

/* --- Wizard Container (Natural Height) --- */
.wizard-checkout {
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: flex-start;
    /* Align top, allow scroll */
    justify-content: center;
    padding: 2rem 1rem;
}

.wizard-container {
    width: 100%;
    max-width: 700px;
    /* Wider for better breathing room */
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: visible;
    /* Allow tooltips/shadows */
}

/* --- Progress Bar --- */
.wizard-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    background: white;
    border-bottom: 1px solid #f3f4f6;
    border-radius: 16px 16px 0 0;
}

/* ... (Progress steps remain similar but check z-index) ... */

/* --- Wizard Form & Steps --- */
.wizard-form {
    padding: 0;
}

.wizard-step {
    padding: 2.5rem;
    display: none;
    /* Hidden by default */
    animation: fadeIn 0.4s ease;
}

.wizard-step.active {
    display: block;
    /* Visible when active */
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.step-header h2 {
    font-size: 1.75rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.step-header p {
    color: var(--text-light);
    font-size: 1rem;
}

.step-content {
    flex: 1;
}

/* --- Components (Inputs, Cards) --- */
/* Reusing Input Wrapper styles from previous iteration */
.input-wrapper {
    position: relative;
    margin-bottom: 1.25rem;
}

.input-wrapper input,
.input-wrapper textarea {
    width: 100%;
    padding: 1rem 1rem 1rem 2.8rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: var(--bg-input);
    font-size: 1rem;
    outline: none;
}

html[dir="rtl"] .input-wrapper input,
html[dir="rtl"] .input-wrapper textarea {
    padding: 1rem 2.8rem 1rem 1rem;
}

.input-wrapper .input-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: #9ca3af;
}

.input-wrapper label {
    position: absolute;
    top: 1rem;
    right: 2.8rem;
    color: #6b7280;
    pointer-events: none;
    transition: all 0.2s;
}

html[dir="rtl"] .input-wrapper label {
    right: 2.8rem;
    left: auto;
}

/* Active Label */
.input-wrapper input:focus+label,
.input-wrapper input:not(:placeholder-shown)+label,
.input-wrapper textarea:focus+label,
.input-wrapper textarea:not(:placeholder-shown)+label {
    top: -0.6rem;
    right: 0.8rem;
    font-size: 0.85rem;
    color: var(--primary-color);
    background: white;
    padding: 0 0.4rem;
}

/* Delivery Cards */
.delivery-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.delivery-card {
    cursor: pointer;
    position: relative;
}

.delivery-card input {
    display: none;
}

.delivery-card .card-content {
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    transition: all 0.2s;
}

.delivery-card input:checked+.card-content {
    border-color: var(--primary-color);
    background: #eff6ff;
}

.delivery-card .check-mark {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid #ccc;
}

.delivery-card input:checked+.card-content .check-mark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* --- Actions --- */
.step-actions {
    margin-top: 2rem;
    display: flex;
}

.step-actions.right {
    justify-content: flex-end;
}

.step-actions.split {
    justify-content: space-between;
}

.btn-wizard {
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-wizard.next {
    background: var(--primary-color);
    color: white;
}

.btn-wizard.next:hover {
    background: #1d4ed8;
    transform: translateX(-2px);
}

.btn-wizard.prev {
    background: transparent;
    color: #6b7280;
}

.btn-wizard.prev:hover {
    color: var(--text-dark);
}

/* Finish Buttons */
.finish-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-premium {
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    border: none;
    color: white;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-premium.primary {
    background: var(--primary-color);
}

.btn-premium.whatsapp {
    background: #25D366;
}

/* --- Summary Card in Step 3 --- */
.wizard-summary-card {
    background: #f9fafb;
    border-radius: 12px;
    padding: 1.5rem;
    font-size: 0.9rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    border-bottom: 1px dashed #e5e7eb;
    padding-bottom: 0.25rem;
}

.summary-items-list {
    margin-top: 1rem;
    max-height: 150px;
    overflow-y: auto;
}

.summary-item {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.total-row {
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
}

/* Trust Badges */
.trust-badges {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.8rem;
    color: #9ca3af;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Error message */
.error-message {
    color: #ef4444;
    font-size: 0.8rem;
    display: none;
    margin-top: 0.2rem;
}

.error-message.show {
    display: block;
}