/* ============================================
   COMPLETE CHECKOUT REDESIGN - MODERN WIZARD
   ============================================ */

/* Global Checkout Styles */
.checkout-wrapper {
    background: #f0f2f5;
    min-height: 100vh;
    padding: 8.5rem 0 5rem;
    /* Increased top padding for navbar clearance */
}





/* High-End Card Container */
.step-container {
    background: #ffffff;
    border-radius: 20px;
    padding: 2.25rem;
    /* Sophisticated layered shadow */
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 10px 15px -3px rgba(0, 0, 0, 0.05),
        0 20px 25px -5px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.step-container:hover {
    transform: translateY(-2px);
    box-shadow:
        0 10px 20px -5px rgba(0, 0, 0, 0.08),
        0 25px 40px -10px rgba(0, 0, 0, 0.06);
}

.step-container.hidden {
    display: none;
}

.step-header {
    margin-bottom: 1rem;
}

.step-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.step-title i,
.step-title>svg {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #AF2032 0%, #E63946 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 12px rgba(175, 32, 50, 0.25);
    padding: 9px;
    /* Space for icon inside box */
    flex-shrink: 0;
}

/* Scoped SVG scaling: Only scale SVGs that are INSIDE a container */
.step-title i svg,
.summary-icon svg {
    width: 100%;
    height: 100%;
}

/* Direct child SVGs are already sized by the rule above, don't let them hit 100% */

.step-description {
    color: #64748b;
    font-size: 0.85rem;
    margin-left: 48px;
    font-weight: 400;
}

/* Modern Form Inputs */
.form-group-modern {
    margin-bottom: 1rem;
}

.form-label-modern {
    display: block;
    font-weight: 500;
    font-size: 0.85rem;
    color: #4b5563;
    margin-bottom: 0.35rem;
}

.form-input-modern {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    color: #1e293b;
}

.form-input-modern:focus {
    outline: none;
    border-color: #AF2032;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(175, 32, 50, 0.08);
}

/* Date Selector - Modern Grid */
.date-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
    /* Even more compact */
    gap: 6px;
    margin-bottom: 1.25rem;
}

.date-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    padding: 0.35rem 0.15rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.date-card:hover {
    transform: translateY(-4px);
    border-color: #AF2032;
    box-shadow: 0 8px 20px rgba(175, 32, 50, 0.15);
}

.date-card.active {
    background: linear-gradient(135deg, #AF2032 0%, #E63946 100%);
    border-color: transparent;
    box-shadow: 0 10px 20px -5px rgba(175, 32, 50, 0.4),
        0 4px 6px -2px rgba(175, 32, 50, 0.1);
    transform: translateY(-4px) scale(1.02);
    /* Added subtle scale */
}

.date-day {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.date-card.active .date-day {
    color: rgba(255, 255, 255, 0.9);
}

.date-number {
    font-size: 1rem;
    /* Perfectly compact number */
    font-weight: 700;
    color: #1f2937;
    line-height: 1;
}

.date-card.active .date-number {
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Time Slots - Chip Style */
.time-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
}

.no-slots-alert {
    grid-column: 1 / -1;
    width: fit-content;
    padding: 0.5rem 1rem !important;
    font-size: 0.85rem;
    border-radius: 10px !important;
}

.time-chip {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
    /* Reduced padding */
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
    /* Shrunk font size */
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
}

.time-chip:hover {
    border-color: #AF2032;
    background: rgba(175, 32, 50, 0.05);
}

.time-chip.active {
    background: #AF2032;
    border-color: #AF2032;
    color: #fff;
    box-shadow: 0 4px 12px rgba(175, 32, 50, 0.25);
}

/* Floating Order Summary */
/* Promo Section Premium Styles */
.promo-card-premium {
    background: rgba(0, 0, 0, 0.02);
    border: 1px dashed rgba(0, 0, 0, 0.1);
}

.promo-input-premium {
    margin-bottom: 0 !important;
    background: #ffffff !important;
    padding: 0.6rem 0.8rem !important;
}

.promo-btn-premium {
    padding: 0.6rem 1rem !important;
    white-space: nowrap;
    flex: 0 0 auto;
    min-width: 80px;
}

.promo-msg-feedback {
    display: none !important;
}

.order-summary-float {
    position: sticky;
    top: 7.5rem;
    /* Precise offset to clear navbar when sticky */
    background: #ffffff;
    border-radius: 20px;
    padding: 2.25rem;
    /* Synchronized with .step-container */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05),
        0 20px 25px -5px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.4s ease;
}


.summary-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.875rem;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
}

.summary-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #AF2032 0%, #E63946 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(175, 32, 50, 0.25);
    padding: 9px;
    flex-shrink: 0;
}

.summary-icon svg {
    width: 100%;
    height: 100%;
}

.summary-title {
    font-size: 1.15rem;
    /* Synchronized with .step-title */
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.summary-item {
    background: #fdfdfd;
    border-radius: 12px;
    padding: 0.75rem 0.9rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Glassmorphism accent on cards */
.summary-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #AF2032, #E63946);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.summary-item:hover::after {
    opacity: 1;
}

.summary-item:hover {
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    border-color: rgba(175, 32, 50, 0.1);
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
}

.item-name {
    font-weight: 600;
    color: #111827;
    font-size: 0.95rem;
    letter-spacing: -0.01em;
}

.item-price {
    font-weight: 700;
    color: #AF2032;
    font-size: 1rem;
}

.item-details {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.4;
}

.summary-totals {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid rgba(0, 0, 0, 0.05);
}

.summary-totals-premium {
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    /* Modified from 0.75rem */
    font-size: 0.95rem;
}

.totals-divider-premium {
    border-bottom: 1px dashed rgba(0, 0, 0, 0.08) !important;
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
}

.total-payable-label {
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #111827;
}

.total-payable-amount {
    color: #AF2032;
    line-height: 1;
    font-size: 1.35rem;
    font-weight: 800;
}

.total-tax-info {
    font-size: 0.65rem;
    font-weight: 500;
    color: #64748b;
}

.total-row.final {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px dashed rgba(175, 32, 50, 0.2);
}

.total-label {
    color: #6b7280;
    font-weight: 500;
}

.total-row.final .total-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.total-amount {
    font-weight: 600;
    color: #111827;
}

.total-row.final .total-amount {
    font-size: 1.2rem;
    color: #AF2032;
    font-weight: 700;
}

/* Action Buttons */
.step-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-wizard {
    flex: 1;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-wizard-primary {
    background: linear-gradient(135deg, #AF2032 0%, #E63946 100%);
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(175, 32, 50, 0.25);
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-size: 0.95rem;
    font-weight: 600;
}

.btn-wizard-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(175, 32, 50, 0.4);
}

.btn-wizard-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: #374151;
    border: 2px solid #e5e7eb;
}

.btn-wizard-secondary:hover {
    background: #fff;
    border-color: #d1d5db;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* .step-container animation placeholder removed for stability */

/* Responsive */
@media (max-width: 768px) {
    .checkout-progress {
        padding: 1.5rem;
    }

    .step-circle {
        width: 40px;
        height: 40px;
        font-size: 0.95rem;
    }

    .step-label {
        font-size: 0.75rem;
    }

    .step-container {
        padding: 1.5rem;
    }

    .date-grid {
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
    }

    .time-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* End of premium cleanup */

/* Premium Quantity Controls */
.summary-qty-wrap {
    background: rgba(243, 244, 246, 0.6);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    padding: 2px;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
}

.summary-qty-wrap:hover {
    background: rgba(243, 244, 246, 0.9);
    border-color: rgba(175, 32, 50, 0.1);
}

.service-qty-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: #ffffff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    color: #4b5563;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.service-qty-btn svg {
    stroke-width: 2.5px;
}

.service-qty-btn:hover {
    background: #AF2032;
    color: #ffffff;
    transform: scale(1.08);
    box-shadow: 0 4px 10px rgba(175, 32, 50, 0.2);
}

.service-qty-btn:active {
    transform: scale(0.92);
}

.qty-display {
    font-weight: 700;
    color: #111827;
    font-size: 0.9rem;
    padding: 0 8px;
    min-width: 28px;
    text-align: center;
    user-select: none;
}

/* Hide Spinners */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Align trash icon with quantity */
.remove-item-link {
    width: 32px;
    height: 32px;
    background: rgba(220, 53, 69, 0.05);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #dc3545 !important;
}

.remove-item-link:hover {
    background: #dc3545;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(220, 53, 69, 0.25);
}

.remove-item-link svg {
    width: 16px;
    height: 16px;
}