/* ═══════════════════════════════════════════════════════════════
   AutoLogic — Cyber Checkout & Order Fulfillment Experience CSS
   ═══════════════════════════════════════════════════════════════ */

/* ─── Breadcrumb & Header ────────────────────────────────────── */
.checkout-header-area {
    margin-bottom: 2rem;
}

.checkout-badge-strip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #1d4ed8;
    margin-bottom: 0.75rem;
}

.checkout-badge-strip i {
    color: #2563eb;
}

/* ─── Layout Grid ────────────────────────────────────────────── */
.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 1024px) {
    .checkout-grid {
        grid-template-columns: 1fr;
    }
}

/* ─── Card Container ─────────────────────────────────────────── */
.checkout-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 2rem;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.checkout-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #f1f5f9;
}

.step-digit-badge {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #2563eb;
    color: #ffffff;
    font-weight: 800;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    flex-shrink: 0;
}

.step-digit-badge.step-two {
    background: #0f172a;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

.checkout-card-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.3;
}

.checkout-card-header p {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0.2rem 0 0 0;
}

/* ─── Form Fields ────────────────────────────────────────────── */
.cyber-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}

.cyber-input-group label {
    font-size: 0.88rem;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.cyber-input-group label .required-star {
    color: #ef4444;
}

.cyber-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    font-size: 0.95rem;
    color: #0f172a;
    background: #ffffff;
    transition: all 0.2s ease;
    outline: none;
    box-sizing: border-box;
}

.cyber-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.cyber-input:hover:not(:focus) {
    border-color: #94a3b8;
}

.cyber-phone-wrapper {
    display: flex;
    align-items: stretch;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
    transition: all 0.2s ease;
}

.cyber-phone-wrapper:focus-within {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.phone-flag-prefix {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0 0.85rem;
    background: #f8fafc;
    border-right: 1px solid #cbd5e1;
    font-size: 0.88rem;
    font-weight: 700;
    color: #475569;
    user-select: none;
    white-space: nowrap;
}

.cyber-phone-input {
    border: none;
    border-radius: 0;
    padding-left: 0.85rem;
}

.cyber-phone-input:focus {
    box-shadow: none;
    border: none;
}

.form-two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

@media (max-width: 640px) {
    .form-two-cols {
        grid-template-columns: 1fr;
    }
}

/* ─── Dynamic Shipping Notice Box ────────────────────────────── */
.shipping-telemetry-banner {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.shipping-telemetry-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.shipping-radar-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #e0e7ff;
    color: #4338ca;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.shipping-status-pill {
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.shipping-status-pill.free {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
}

.shipping-status-pill.standard {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
}

/* ─── Free Delivery Progress Bar ─────────────────────────────── */
.free-shipping-progress-widget {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.free-shipping-text-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
    color: #166534;
    margin-bottom: 0.6rem;
}

.free-shipping-bar-track {
    width: 100%;
    height: 7px;
    background: #dcfce7;
    border-radius: 9999px;
    overflow: hidden;
}

.free-shipping-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    border-radius: 9999px;
    transition: width 0.4s ease;
}

/* ─── Payment Methods Grid ───────────────────────────────────── */
.payment-methods-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cyber-pay-tile {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    user-select: none;
}

.cyber-pay-tile:hover {
    border-color: #94a3b8;
    background: #fafafa;
}

.cyber-pay-tile.selected {
    border-color: #2563eb;
    background: #f8faff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.cyber-pay-tile input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    outline: none;
    margin: 0;
    cursor: pointer;
    display: grid;
    place-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.cyber-pay-tile input[type="radio"]::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    transform: scale(0);
    transition: 120ms transform ease-in-out;
    background-color: #2563eb;
}

.cyber-pay-tile.selected input[type="radio"] {
    border-color: #2563eb;
}

.cyber-pay-tile.selected input[type="radio"]::before {
    transform: scale(1);
}

.pay-tile-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: #2563eb;
    flex-shrink: 0;
}

.pay-tile-icon-box.cod-icon {
    background: #ecfdf5;
    color: #059669;
}

.pay-tile-icon-box.bkash-icon {
    background: #fff;
    border: 1px solid #fecdd3;
    padding: 6px;
}

.pay-tile-icon-box.bkash-icon img {
    max-height: 100%;
    object-fit: contain;
}

.pay-tile-icon-box.card-icon {
    background: #eff6ff;
    color: #2563eb;
}

.pay-tile-text {
    flex: 1;
}

.pay-tile-title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pay-tile-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.pay-tile-desc {
    font-size: 0.82rem;
    color: #64748b;
    margin: 0.2rem 0 0 0;
}

.pay-tile-badge {
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #dbeafe;
    color: #1e40af;
}

/* ─── Sticky Order Summary ───────────────────────────────────── */
.checkout-summary-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 2rem;
    box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.08);
    position: sticky;
    top: 90px;
}

.summary-shield-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 1.25rem;
}

.summary-shield-header h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.security-ssl-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #059669;
    background: #ecfdf5;
    padding: 0.25rem 0.6rem;
    border-radius: 9999px;
    border: 1px solid #a7f3d0;
}

/* ─── Order Cart Items Scroll ────────────────────────────────── */
.summary-items-list {
    max-height: 280px;
    overflow-y: auto;
    padding-right: 0.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.summary-items-list::-webkit-scrollbar {
    width: 4px;
}

.summary-items-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.summary-item-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px dashed #f1f5f9;
}

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

.summary-item-thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    object-fit: cover;
    flex-shrink: 0;
}

.summary-item-thumb-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.summary-item-details {
    flex: 1;
    min-width: 0;
}

.summary-item-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.summary-item-meta {
    font-size: 0.78rem;
    color: #64748b;
    margin-top: 0.15rem;
}

.summary-item-total {
    font-size: 0.92rem;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
}

/* ─── Financial Rows ─────────────────────────────────────────── */
.summary-cost-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.25rem 0;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 1.25rem;
}

.cost-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.92rem;
    color: #475569;
}

.cost-row .cost-val {
    font-weight: 600;
    color: #0f172a;
}

.cost-row.cost-shipping .cost-val {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.cost-total-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
}

.cost-total-label {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
}

.cost-total-amount {
    font-size: 1.75rem;
    font-weight: 900;
    color: #2563eb;
    letter-spacing: -0.02em;
}

/* ─── Checkout Action Button ─────────────────────────────────── */
.btn-place-order {
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    cursor: pointer;
    box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.4);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-place-order:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: 0 14px 28px -5px rgba(37, 99, 235, 0.5);
}

.btn-place-order:active {
    transform: translateY(0);
}

/* ─── Trust Badges Mini Grid ─────────────────────────────────── */
.summary-trust-grid {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #f1f5f9;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.trust-mini-pill {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 600;
}

.trust-mini-pill i {
    color: #2563eb;
    font-size: 0.85rem;
}

/* ─── Mobile Sticky Dock ─────────────────────────────────────── */
.mobile-checkout-dock {
    display: none;
}

@media (max-width: 768px) {
    .mobile-checkout-dock {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #ffffff;
        padding: 0.85rem 1.25rem;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
        border-top: 1px solid #e2e8f0;
        z-index: 999;
    }

    .dock-total-box {
        display: flex;
        flex-direction: column;
    }

    .dock-total-label {
        font-size: 0.75rem;
        color: #64748b;
        font-weight: 600;
        text-transform: uppercase;
    }

    .dock-total-amount {
        font-size: 1.35rem;
        font-weight: 800;
        color: #2563eb;
        line-height: 1.2;
    }

    .dock-order-btn {
        padding: 0.75rem 1.5rem;
        border-radius: 10px;
        background: #2563eb;
        color: #ffffff;
        font-size: 0.95rem;
        font-weight: 700;
        border: none;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
}

/* ─── Order Success / Receipt Luxury Page ────────────────────── */
.success-hero-box {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 2.5rem;
}

.success-radar-ring {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.25rem;
    margin: 0 auto 1.5rem;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.35);
    animation: scaleInBounce 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scaleInBounce {
    0% { transform: scale(0); opacity: 0; }
    80% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.receipt-order-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 0.35rem 0.85rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0.75rem 0 1.25rem;
}

.copy-order-btn {
    background: transparent;
    border: none;
    color: #2563eb;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.copy-order-btn:hover {
    background: #e0e7ff;
}

/* ─── Fulfillment Stepper on Success ─────────────────────────── */
.order-dispatch-stepper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin: 2rem 0;
    position: relative;
}

@media (max-width: 640px) {
    .order-dispatch-stepper {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

.dispatch-step-box {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    transition: all 0.2s ease;
}

.dispatch-step-box.completed {
    background: #f0fdf4;
    border-color: #86efac;
}

.dispatch-step-box.active {
    background: #eff6ff;
    border-color: #93c5fd;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.1);
}

.dispatch-icon {
    font-size: 1.25rem;
    margin-bottom: 0.4rem;
    color: #64748b;
}

.dispatch-step-box.completed .dispatch-icon {
    color: #10b981;
}

.dispatch-step-box.active .dispatch-icon {
    color: #2563eb;
}

.dispatch-step-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.dispatch-step-sub {
    font-size: 0.72rem;
    color: #64748b;
    margin-top: 0.15rem;
}
