﻿@font-face {
    font-family: KalamehWeb;
    src: url('lib/fonts/woff2/KalamehWeb-Thin.woff2') format('woff2');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: KalamehWeb;
    src: url('lib/fonts/woff2/KalamehWeb-ExtraLight.woff2') format('woff2');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: KalamehWeb;
    src: url('lib/fonts/woff2/KalamehWeb-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: KalamehWeb;
    src: url('lib/fonts/woff2/KalamehWeb-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: KalamehWeb;
    src: url('lib/fonts/woff2/KalamehWeb-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: KalamehWeb;
    src: url('lib/fonts/woff2/KalamehWeb-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: KalamehWeb;
    src: url('lib/fonts/woff2/KalamehWeb-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: KalamehWeb;
    src: url('lib/fonts/woff2/KalamehWeb-ExtraBold.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: KalamehWeb;
    src: url('lib/fonts/woff2/KalamehWeb-Black.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}
/* ─── Reset & Base ─── */
*, *:focus, *:active {
    outline: none !important;
}

input:focus, textarea:focus, select:focus {
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05) !important;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    direction: rtl;
    font-size: 16px;
}

html, body {
    font-family: KalamehWeb, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #fafafa;
    color: #1a1a1a;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

/* ─── Typography ─── */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 0.5rem;
}

p {
    color: #555;
    line-height: 1.7;
    margin: 0 0 1rem;
}

a {
    color: #6c63ff;
    text-decoration: none;
}

/* ─── Cards ─── */
.card {
    background: #fff;
    border-radius: 20px;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    padding: 1.5rem;
}

/* ─── Inputs ─── */
.form-control,
.form-select {
    background: #fff; /* ← سفید خالص، واضح‌تر */
    border: 2px solid #e2e2e8; /* ← border ملایم خاکستری */
    border-radius: 14px;
    padding: 0.75rem 1rem;
    font-family: KalamehWeb, sans-serif;
    font-size: 0.95rem;
    color: #1a1a1a;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    width: 100%;
}

    .form-control:hover {
        border-color: #c4c4d0; /* ← hover: کمی پررنگ‌تر */
    }

    .form-control:focus,
    .form-select:focus {
        background: #fff;
        border-color: #6c63ff; /* ← focus: بنفش قشنگ */
        box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.12);
        outline: none;
    }

::placeholder {
    color: #b0b0bc; /* ← placeholder کمی تیره‌تر */
    font-family: KalamehWeb, sans-serif;
}


/* ─── Buttons ─── */
.btn {
    border-radius: 14px;
    font-family: KalamehWeb, sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    min-height: 48px;
    padding: 0.6rem 1.5rem;
    border: none;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.2s, background 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

    .btn:active {
        transform: scale(0.98);
    }

.btn-primary {
    background: #6c63ff;
    color: #fff;
    box-shadow: 0 4px 16px rgba(108, 99, 255, 0.3);
}

    .btn-primary:hover {
        background: #5a52d5;
        box-shadow: 0 6px 20px rgba(108, 99, 255, 0.4);
        color: #fff;
    }

.btn-secondary {
    background: #f0f0f5;
    color: #1a1a1a;
}

    .btn-secondary:hover {
        background: #e4e4ec;
        color: #1a1a1a;
    }

.btn-danger {
    background: #fff0f0;
    color: #dc2626;
}

    .btn-danger:hover {
        background: #fde8e8;
        color: #dc2626;
    }

/* ─── Validation ─── */
.valid.modified:not([type=checkbox]) {
    border-color: #16a34a !important;
}

.invalid {
    border-color: #dc2626 !important;
}

.validation-message {
    color: #dc2626;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* ─── Blazor Error ─── */
.blazor-error-boundary {
    background: #1a1a1a;
    color: #fff;
    padding: 1rem 1.25rem;
    border-radius: 16px;
    font-size: 0.875rem;
}

    .blazor-error-boundary::after {
        content: "خطایی رخ داده است.";
    }

/* ─── Utilities ─── */
.text-muted {
    color: #888 !important;
}

.w-100 {
    width: 100%;
}

/* ─── Wizard Actions ─── */
.wizard-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(26, 26, 26, 0.06);
}

.btn-action {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.75rem 1.05rem;
    border: 0;
    border-radius: 16px;
    font-weight: 900;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn-action:not(:disabled):hover {
    transform: translateY(-1px);
}

.btn-action:disabled {
    cursor: not-allowed;
    opacity: 0.45;
    box-shadow: none;
}

.btn-primary-action {
    flex: 1;
    min-width: 0;
    background: #1a1a1a;
    color: #fff;
    box-shadow: 0 12px 24px rgba(26, 26, 26, 0.14);
}

.btn-secondary-action {
    min-width: 112px;
    background: #f7f7f9;
    color: #1a1a1a;
}

@media (max-width: 420px) {
    .wizard-actions {
        flex-direction: column-reverse;
    }

    .btn-action {
        width: 100%;
    }
}

/* Alert Styles - Error Display */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.95rem;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Action Info Box - Multi-Order Guidance */
.action-info-box {
    background: #f0f9ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.info-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.info-content strong {
    color: #1e40af;
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
}

.info-content p {
    color: #1e3a8a;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
}

/* Action Buttons Row - Multi-Button Layout */
.action-buttons-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.action-buttons-row > * {
    flex: 1;
    min-width: 200px;
}

/* Add to Cart Button - Green Success Style */
.btn-add-to-cart {
    background: #10b981;
    color: #fff;
    padding: 0.875rem 1.25rem;
    border-radius: 12px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-add-to-cart:hover {
    background: #059669;
}

.btn-add-to-cart:active {
    background: #047857;
}

/* Order Header Actions - Delete Button */
.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.order-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-delete-order {
    background: transparent;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 0.375rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 32px;
}

.btn-delete-order:hover {
    background: #fef2f2;
    border-color: #f87171;
    transform: scale(1.05);
}

.btn-delete-order:active {
    background: #fee2e2;
    transform: scale(0.98);
}

.btn-delete-order svg {
    flex-shrink: 0;
}

.order-date {
    color: #6b7280;
    font-size: 0.875rem;
}

/* Delete Confirmation Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 420px;
    width: 100%;
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

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

.modal-header {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid #f3f4f6;
}

.modal-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-icon.warning {
    background: #fef3c7;
    color: #f59e0b;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
}

.modal-body {
    padding: 1.5rem;
    text-align: center;
}

.modal-body p {
    margin: 0 0 0.75rem 0;
    color: #4b5563;
    font-size: 0.95rem;
    line-height: 1.6;
}

.modal-body strong {
    color: #1a1a1a;
    font-weight: 600;
}

.modal-warning {
    color: #dc2626 !important;
    font-size: 0.875rem !important;
    font-weight: 500;
}

.modal-actions {
    padding: 1rem 1.5rem 1.5rem;
    display: flex;
    gap: 0.75rem;
    justify-content: stretch;
}

.btn-modal {
    flex: 1;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 48px;
}

.btn-cancel {
    background: #f3f4f6;
    color: #4b5563;
}

.btn-cancel:hover {
    background: #e5e7eb;
}

.btn-confirm-delete {
    background: #dc2626;
    color: #ffffff;
}

.btn-confirm-delete:hover {
    background: #b91c1c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.btn-confirm-delete:active {
    transform: translateY(0);
}
.checkout-container,
.track-container {
    max-width: 560px;
    margin: 0 auto;
    padding: 1rem 1rem 3rem;
}

.checkout-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.checkout-header h2 {
    flex: 1;
    margin: 0;
    font-size: 1.25rem;
    font-weight: 900;
    color: #1a1a1a;
}

.checkout-back {
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 14px;
    background: #f7f7f9;
    color: #1a1a1a;
    cursor: pointer;
}

.checkout-step-count {
    color: #777;
    font-size: 0.8rem;
    font-weight: 800;
}

.checkout-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.stepper-dot {
    display: inline-flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #f0f0f3;
    color: #999;
    font-size: 0.85rem;
    font-weight: 800;
}

.stepper-dot.active {
    background: #1a1a1a;
    color: #fff;
}

.stepper-dot.done {
    background: #16a34a;
    color: #fff;
}

.checkout-step,
.track-container section {
    animation: fadeIn 0.25s ease;
}

.step-title {
    margin: 0 0 0.35rem;
    font-size: 1.15rem;
    font-weight: 900;
    color: #1a1a1a;
}

.step-sub {
    margin: 0 0 1.25rem;
    color: #777;
    font-size: 0.88rem;
}

.form-field {
    margin-bottom: 1rem;
}

.form-field label {
    display: block;
    margin-bottom: 0.4rem;
    color: #444;
    font-size: 0.85rem;
    font-weight: 800;
}

.form-field .optional {
    color: #aaa;
    font-weight: 600;
}

.form-field input,
.form-field textarea {
    width: 100%;
    min-height: 48px;
    padding: 0.7rem 0.9rem;
    border: 0;
    border-radius: 16px;
    background: #f7f7f9;
    color: #1a1a1a;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(26, 26, 26, 0.08);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.address-options {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 0.9rem;
}

.address-card {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    width: 100%;
    padding: 0.9rem;
    border: 2px solid transparent;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    text-align: right;
    cursor: pointer;
    transition: border-color 0.18s ease;
}

.address-card.selected {
    border-color: #1a1a1a;
}

.address-radio {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
    border: 2px solid #ccc;
    border-radius: 999px;
}

.address-card.selected .address-radio {
    border-color: #1a1a1a;
    background: radial-gradient(circle, #1a1a1a 0 5px, transparent 6px);
}

.address-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.address-text strong {
    color: #1a1a1a;
    font-weight: 800;
    font-size: 0.92rem;
}

.address-text small {
    color: #777;
    font-size: 0.78rem;
}

.btn-text-link {
    border: 0;
    background: none;
    color: #1a1a1a;
    font-weight: 800;
    font-size: 0.88rem;
    cursor: pointer;
    padding: 0.4rem 0;
}

.summary-box {
    padding: 1.1rem;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.7rem;
    color: #555;
    font-size: 0.92rem;
    font-weight: 700;
}

.summary-row strong {
    color: #1a1a1a;
}

.summary-divider {
    height: 1px;
    margin: 0.4rem 0 0.8rem;
    background: #eee;
}

.summary-row.total {
    margin-bottom: 0;
    font-size: 1.05rem;
    font-weight: 900;
}

.summary-row.total strong {
    font-size: 1.1rem;
}

.summary-eta {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.9rem;
    padding-top: 0.8rem;
    border-top: 1px dashed #eee;
    color: #16a34a;
    font-size: 0.85rem;
    font-weight: 800;
}

.summary-address {
    display: flex;
    gap: 0.65rem;
    margin-top: 1rem;
    padding: 0.9rem;
    border-radius: 18px;
    background: #f7f7f9;
}

.summary-address-icon {
    font-size: 1.2rem;
}

.summary-address strong {
    color: #1a1a1a;
    font-weight: 900;
    font-size: 0.9rem;
}

.summary-address p {
    margin: 0.15rem 0 0;
    color: #666;
    font-size: 0.82rem;
}

.pay-final {
    padding: 1.1rem;
    border-radius: 20px;
    background: #1a1a1a;
    color: #fff;
    text-align: center;
}

.pay-amount {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.pay-amount span {
    color: #bbb;
    font-size: 0.82rem;
}

.pay-amount strong {
    font-size: 1.5rem;
    font-weight: 900;
}

.pay-note {
    margin: 0.8rem 0 0;
    color: #aaa;
    font-size: 0.78rem;
    line-height: 1.5;
}

.checkout-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.checkout-actions .btn-action {
    flex: 1;
}

.pay-btn {
    background: #16a34a !important;
}

/* â”€â”€â”€â”€â”€â”€â”€â”€â”€ Track page â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.track-header {
    text-align: center;
    margin-bottom: 1.25rem;
}

.track-badge {
    display: inline-block;
    margin-bottom: 0.5rem;
    padding: 0.3rem 0.9rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
}

.track-badge.badge-success { background: #dcfce7; color: #16a34a; }
.track-badge.badge-info { background: #dbeafe; color: #2563eb; }
.track-badge.badge-warning { background: #fef3c7; color: #b45309; }
.track-badge.badge-danger { background: #fee2e3; color: #dc2626; }

.track-header h2 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 900;
}

.track-sub {
    margin: 0.35rem 0 0;
    color: #777;
    font-size: 0.85rem;
}

.track-eta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    margin-bottom: 1.5rem;
    color: #16a34a;
    font-size: 0.88rem;
    font-weight: 800;
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0.5rem 0.5rem 0.5rem;
}

.timeline-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding-bottom: 1.4rem;
    position: relative;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item::before {
    content: "";
    position: absolute;
    right: 11px;
    top: 24px;
    bottom: -4px;
    width: 2px;
    background: #eee;
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-item.done::before {
    background: #16a34a;
}

.timeline-marker {
    display: inline-flex;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #f0f0f3;
    color: #999;
    z-index: 1;
}

.timeline-item.done .timeline-marker {
    background: #16a34a;
    color: #fff;
}

.timeline-item.current .timeline-marker {
    background: #fff;
    border: 2px solid #1a1a1a;
}

.timeline-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #1a1a1a;
}

.timeline-label {
    color: #999;
    font-size: 0.92rem;
    font-weight: 700;
}

.timeline-item.done .timeline-label,
.timeline-item.current .timeline-label {
    color: #1a1a1a;
    font-weight: 900;
}

.track-info-card {
    margin-top: 1.1rem;
    padding: 1rem;
    border-radius: 18px;
    background: #f7f7f9;
}

.track-info-card h4 {
    margin: 0 0 0.45rem;
    color: #444;
    font-size: 0.85rem;
    font-weight: 800;
}

.track-info-card p {
    margin: 0.1rem 0;
    color: #1a1a1a;
    font-size: 0.88rem;
}

.track-orders-btn {
    width: 100%;
    margin-top: 1.5rem;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}


.shipping-form {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.shipping-note {
    margin: 0.75rem 0 0;
    color: #16a34a;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.5;
}

.step-sub {
    margin: 0 0 1rem;
    color: #777;
    font-size: 0.88rem;
}
