/* ===== سه‌سوتی - استایل اصلی ===== */

/* ===== Self-hosted Vazirmatn Font ===== */
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-ExtraBold.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Black.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* Screen reader only - برای دسترس‌پذیری */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Vazirmatn', system-ui, sans-serif;
}

body {
    direction: rtl;
    font-feature-settings: "ss01";
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ===== Dark Mode Variables ===== */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --card-bg: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.08);
    --input-bg: #ffffff;
    --header-bg: rgba(255, 255, 255, 0.95);
}

.dark {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --card-bg: #1e293b;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --input-bg: #0f172a;
    --header-bg: rgba(15, 23, 42, 0.95);
}

/* ===== CRITICAL: Dark Mode Background & Text ===== */
html.dark, html.dark body,
.dark, .dark body {
    background-color: #0f172a !important;
    color: #f1f5f9 !important;
}

/* All text colors in dark mode */
.dark .text-slate-900,
.dark .text-slate-800,
.dark .text-slate-700,
.dark .text-gray-900,
.dark .text-gray-800,
.dark .text-gray-700,
.dark .text-black,
.dark h1, .dark h2, .dark h3, .dark h4, .dark h5, .dark h6,
.dark .font-black, .dark .font-bold {
    color: #f1f5f9 !important;
}

.dark .text-slate-600,
.dark .text-slate-500,
.dark .text-slate-400,
.dark .text-gray-600,
.dark .text-gray-500,
.dark .text-gray-400 {
    color: #cbd5e1 !important;
}

.dark .text-slate-300,
.dark .text-gray-300 {
    color: #94a3b8 !important;
}

/* Background colors in dark mode */
.dark .bg-slate-50,
.dark .bg-slate-100,
.dark .bg-slate-200,
.dark .bg-gray-50,
.dark .bg-gray-100,
.dark .bg-gray-200 {
    background-color: #1e293b !important;
}

.dark .bg-white,
.dark .bg-gray-50 {
    background-color: #1e293b !important;
}

.dark .bg-slate-50\/95,
.dark .bg-white\/95 {
    background-color: rgba(30, 41, 59, 0.95) !important;
}

/* Borders in dark mode */
.dark .border-slate-200,
.dark .border-slate-100,
.dark .border-slate-300,
.dark .border-gray-200,
.dark .border-gray-100,
.dark .border-gray-300,
.dark .border,
.dark .border-t,
.dark .border-b,
.dark .border-r,
.dark .border-l {
    border-color: #334155 !important;
}

/* Shadows */
.dark .shadow-md,
.dark .shadow-lg,
.dark .shadow-xl,
.dark .shadow-sm,
.dark .shadow-2xl {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

/* Inputs in dark mode */
.dark .form-input,
.dark input[type="text"],
.dark input[type="email"],
.dark input[type="password"],
.dark input[type="tel"],
.dark input[type="number"],
.dark input[type="date"],
.dark input[type="datetime-local"],
.dark input[type="search"],
.dark input[type="url"],
.dark select,
.dark textarea {
    background: #0f172a !important;
    color: #f1f5f9 !important;
    border-color: #334155 !important;
}

.dark input::placeholder,
.dark textarea::placeholder {
    color: #64748b !important;
}

/* Specific elements */
.dark #site-header {
    background: rgba(15, 23, 42, 0.95) !important;
}

.dark .stat-card {
    background: #1e293b !important;
}

.dark .admin-sidebar {
    background: #0f172a !important;
}

.dark .admin-content {
    background: #0f172a !important;
}

.dark .admin-menu-item {
    color: rgba(255, 255, 255, 0.8) !important;
}

.dark .admin-menu-item.active {
    background: rgba(247, 148, 29, 0.15) !important;
    color: #fff !important;
}

/* Tables in dark mode */
.dark table thead,
.dark thead.bg-slate-50,
.dark .bg-slate-50 thead {
    background: #334155 !important;
}

.dark table tbody tr {
    border-color: #334155 !important;
}

.dark table tbody tr:hover,
.dark .hover\:bg-slate-50:hover,
.dark .hover\:bg-slate-100:hover {
    background: #1e293b !important;
}

.dark .divide-slate-100 > * + *,
.dark .divide-slate-200 > * + * {
    border-color: #334155 !important;
}

/* Footer in dark mode */
.dark footer.bg-slate-900,
.dark footer {
    background: #020617 !important;
}

.dark footer .text-slate-400 {
    color: #64748b !important;
}

.dark footer .text-slate-500 {
    color: #475569 !important;
}

.dark footer .text-slate-600 {
    color: #475569 !important;
}

/* Cards and badges */
.dark .card-hover {
    background: #1e293b !important;
}

.dark .badge {
    color: #f1f5f9 !important;
}

.dark .bg-orange-50 {
    background-color: rgba(247, 148, 29, 0.15) !important;
}

.dark .bg-blue-50 {
    background-color: rgba(59, 130, 246, 0.15) !important;
}

.dark .bg-amber-50 {
    background-color: rgba(245, 158, 11, 0.15) !important;
}

.dark .bg-emerald-50 {
    background-color: rgba(16, 185, 129, 0.15) !important;
}

.dark .bg-red-50 {
    background-color: rgba(239, 68, 68, 0.15) !important;
}

.dark .bg-purple-50 {
    background-color: rgba(168, 85, 247, 0.15) !important;
}

.dark .bg-teal-50 {
    background-color: rgba(20, 184, 166, 0.15) !important;
}

/* Keep brand colors unchanged */
.dark .brand-gradient,
.dark .brand-primary,
.dark .brand-gradient-orange {
    /* Keep original gradient */
}

/* Prose text */
.dark .prose,
.dark .prose p,
.dark .prose li {
    color: #cbd5e1 !important;
}

/* Links */
.dark a:not(.brand-gradient-orange):not(.btn-primary):not(.brand-primary) {
    color: inherit;
}

/* Hover states */
.dark .hover\:text-orange-600:hover,
.dark .hover\:text-blue-700:hover {
    color: #f7941d !important;
}

/* Dropdown */
.dark .search-dropdown {
    background: #1e293b !important;
    border: 1px solid #334155 !important;
}

.dark .search-result-item {
    border-bottom-color: #334155 !important;
}

.dark .search-result-item:hover {
    background: #334155 !important;
}

/* ===== Additional Dark Mode Fixes ===== */

/* Background gradients that use light colors */
.dark .bg-gradient-to-b,
.dark .from-slate-50,
.dark .to-white {
    background: #0f172a !important;
}

/* Cards with bg-white inside other sections */
.dark .bg-white.rounded-2xl,
.dark .bg-white.rounded-xl,
.dark .bg-white.rounded-3xl,
.dark .bg-white.p-6,
.dark .bg-white.p-4,
.dark .bg-white.p-5,
.dark div[class*="bg-white"] {
    background-color: #1e293b !important;
}

/* Quote section (testimonials) */
.dark .bg-white.p-6.rounded-2xl.shadow-md.card-hover {
    background-color: #1e293b !important;
}

/* "Why us" section cards */
.dark .bg-white.p-6.rounded-2xl.shadow-md.card-hover .text-slate-900,
.dark .bg-white.p-6.rounded-2xl.shadow-md.card-hover .text-slate-600,
.dark .bg-white.p-6.rounded-2xl.shadow-md.card-hover .text-slate-700,
.dark .bg-white.p-6.rounded-2xl.shadow-md.card-hover p {
    color: #f1f5f9 !important;
}

.dark .bg-white.p-6.rounded-2xl.shadow-md.card-hover .text-slate-600,
.dark .bg-white.p-6.rounded-2xl.shadow-md.card-hover .text-slate-500,
.dark .bg-white.p-6.rounded-2xl.shadow-md.card-hover .text-slate-400,
.dark .bg-white.p-6.rounded-2xl.shadow-md.card-hover .text-xs {
    color: #cbd5e1 !important;
}

/* Vendors section */
.dark .bg-white.rounded-2xl.shadow-md.overflow-hidden {
    background-color: #1e293b !important;
}

.dark .bg-white.rounded-2xl.shadow-md.overflow-hidden .text-slate-900,
.dark .bg-white.rounded-2xl.shadow-md.overflow-hidden h3,
.dark .bg-white.rounded-2xl.shadow-md.overflow-hidden .font-bold {
    color: #f1f5f9 !important;
}

.dark .bg-white.rounded-2xl.shadow-md.overflow-hidden .text-slate-500,
.dark .bg-white.rounded-2xl.shadow-md.overflow-hidden .text-slate-600,
.dark .bg-white.rounded-2xl.shadow-md.overflow-hidden .text-slate-700,
.dark .bg-white.rounded-2xl.shadow-md.overflow-hidden .text-xs,
.dark .bg-white.rounded-2xl.shadow-md.overflow-hidden .text-sm {
    color: #cbd5e1 !important;
}

/* Vendor card */
.dark .bg-white.rounded-2xl.shadow-md.card-hover,
.dark .bg-white.rounded-2xl.shadow-md.overflow-hidden.card-hover {
    background-color: #1e293b !important;
}

.dark .bg-white.rounded-2xl.shadow-md.card-hover .text-slate-900,
.dark .bg-white.rounded-2xl.shadow-md.card-hover .font-bold,
.dark .bg-white.rounded-2xl.shadow-md.card-hover h3 {
    color: #f1f5f9 !important;
}

.dark .bg-white.rounded-2xl.shadow-md.card-hover .text-slate-500,
.dark .bg-white.rounded-2xl.shadow-md.card-hover .text-slate-600,
.dark .bg-white.rounded-2xl.shadow-md.card-hover .text-slate-700,
.dark .bg-white.rounded-2xl.shadow-md.card-hover .text-slate-400 {
    color: #cbd5e1 !important;
}

/* Value cards in about page */
.dark .bg-orange-50,
.dark .bg-blue-50,
.dark .bg-teal-50,
.dark .bg-amber-50,
.dark .bg-emerald-50,
.dark .bg-red-50,
.dark .bg-purple-50,
.dark .bg-cyan-50,
.dark .bg-slate-50 {
    background-color: #1e293b !important;
}

.dark .bg-orange-50 .text-slate-900,
.dark .bg-orange-50 .text-slate-700,
.dark .bg-orange-50 .text-slate-600,
.dark .bg-blue-50 .text-slate-900,
.dark .bg-blue-50 .text-slate-700,
.dark .bg-blue-50 .text-slate-600,
.dark .bg-teal-50 .text-slate-900,
.dark .bg-teal-50 .text-slate-700,
.dark .bg-teal-50 .text-slate-600,
.dark .bg-amber-50 .text-slate-900,
.dark .bg-amber-50 .text-slate-700,
.dark .bg-amber-50 .text-slate-600,
.dark .bg-emerald-50 .text-slate-900,
.dark .bg-emerald-50 .text-slate-700,
.dark .bg-emerald-50 .text-slate-600,
.dark .bg-purple-50 .text-slate-900,
.dark .bg-purple-50 .text-slate-700,
.dark .bg-purple-50 .text-slate-600 {
    color: #f1f5f9 !important;
}

.dark .bg-orange-50 .text-sm,
.dark .bg-blue-50 .text-sm,
.dark .bg-teal-50 .text-sm,
.dark .bg-amber-50 .text-sm,
.dark .bg-emerald-50 .text-sm,
.dark .bg-purple-50 .text-sm,
.dark .bg-orange-50 p,
.dark .bg-blue-50 p,
.dark .bg-teal-50 p,
.dark .bg-amber-50 p,
.dark .bg-emerald-50 p,
.dark .bg-purple-50 p {
    color: #cbd5e1 !important;
}

/* Border colors for these cards */
.dark .border-orange-200,
.dark .border-blue-200,
.dark .border-teal-200,
.dark .border-amber-200,
.dark .border-emerald-200,
.dark .border-purple-200,
.dark .border-r-4,
.dark .border-r-orange-500,
.dark .border-r-blue-500,
.dark .border-r-teal-500,
.dark .border-r-amber-500,
.dark .border-r-emerald-500 {
    border-color: #475569 !important;
}

/* Generic catch-all for any missed white cards */
.dark .bg-white {
    background-color: #1e293b !important;
}

/* Generic catch-all for any missed slate-50 backgrounds */
.dark .bg-slate-50 {
    background-color: #1e293b !important;
}

/* Section backgrounds */
.dark section.bg-white,
.dark section .bg-white {
    background-color: #0f172a !important;
}

.dark section.bg-gradient-to-b,
.dark section .from-slate-50,
.dark section .to-white,
.dark .from-slate-50,
.dark .to-white {
    background: #0f172a !important;
}

/* Search input bigger and more visible */
.search-input-large {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border-radius: 14px;
    border: 2px solid #e2e8f0;
    font-size: 15px;
    transition: all 0.2s;
}

.dark .search-input-large {
    background: #0f172a !important;
    color: #f1f5f9 !important;
    border-color: #334155 !important;
}

.search-input-large:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* All p, span, div text inside cards */
.dark .bg-white p,
.dark .bg-white span,
.dark .bg-white div,
.dark .bg-white li,
.dark .bg-white td,
.dark .bg-white th {
    color: inherit;
}

/* Fix divide borders */
.dark .divide-y > * + * {
    border-top-color: #334155 !important;
}

.dark .divide-slate-100 > * + *,
.dark .divide-slate-200 > * + *,
.dark .divide-y.divide-slate-100 > * + *,
.dark .divide-y.divide-slate-200 > * + * {
    border-color: #334155 !important;
}

/* Fix hover states */
.dark .hover\:bg-slate-50:hover,
.dark .hover\:bg-slate-100:hover,
.dark .hover\:bg-slate-200:hover {
    background-color: #334155 !important;
}

/* ===== Service Page Dark Mode ===== */

/* All cards in service page */
.dark .bg-white.rounded-2xl.shadow-md,
.dark .bg-white.p-5.rounded-2xl,
.dark .bg-white.p-4.rounded-2xl,
.dark .bg-white.p-6.rounded-2xl,
.dark .bg-white.p-5.rounded-xl,
.dark .bg-white.p-4.rounded-xl,
.dark .bg-white.rounded-xl,
.dark .bg-white.rounded-lg,
.dark .bg-white.shadow-lg {
    background-color: #1e293b !important;
}

/* Service detail main card */
.dark .bg-white.p-6.rounded-2xl.shadow-md,
.dark .bg-white.p-5.rounded-2xl.shadow-md {
    background-color: #1e293b !important;
}

/* Service detail - all text inside */
.dark .bg-white.p-6.rounded-2xl.shadow-md .text-slate-900,
.dark .bg-white.p-6.rounded-2xl.shadow-md .font-black,
.dark .bg-white.p-6.rounded-2xl.shadow-md h1,
.dark .bg-white.p-6.rounded-2xl.shadow-md h2,
.dark .bg-white.p-6.rounded-2xl.shadow-md h3,
.dark .bg-white.p-5.rounded-2xl.shadow-md .text-slate-900,
.dark .bg-white.p-5.rounded-2xl.shadow-md .font-black {
    color: #f1f5f9 !important;
}

.dark .bg-white.p-6.rounded-2xl.shadow-md .text-slate-600,
.dark .bg-white.p-6.rounded-2xl.shadow-md .text-slate-700,
.dark .bg-white.p-5.rounded-2xl.shadow-md .text-slate-600,
.dark .bg-white.p-5.rounded-2xl.shadow-md .text-slate-700,
.dark .bg-white.p-6.rounded-2xl.shadow-md p,
.dark .bg-white.p-5.rounded-2xl.shadow-md p {
    color: #cbd5e1 !important;
}

.dark .bg-white.p-6.rounded-2xl.shadow-md .text-slate-500,
.dark .bg-white.p-6.rounded-2xl.shadow-md .text-slate-400,
.dark .bg-white.p-5.rounded-2xl.shadow-md .text-slate-500,
.dark .bg-white.p-5.rounded-2xl.shadow-md .text-slate-400,
.dark .bg-white.p-6.rounded-2xl.shadow-md .text-sm,
.dark .bg-white.p-5.rounded-2xl.shadow-md .text-sm,
.dark .bg-white.p-6.rounded-2xl.shadow-md .text-xs,
.dark .bg-white.p-5.rounded-2xl.shadow-md .text-xs {
    color: #94a3b8 !important;
}

/* Info boxes in service detail */
.dark .bg-blue-50,
.dark .bg-orange-50,
.dark .bg-emerald-50,
.dark .bg-amber-50,
.dark .bg-red-50,
.dark .bg-purple-50,
.dark .bg-teal-50 {
    background-color: #1e293b !important;
}

.dark .bg-blue-50 .text-slate-700,
.dark .bg-blue-50 p,
.dark .bg-orange-50 .text-slate-700,
.dark .bg-orange-50 p,
.dark .bg-emerald-50 .text-slate-700,
.dark .bg-emerald-50 p,
.dark .bg-amber-50 .text-slate-700,
.dark .bg-amber-50 p,
.dark .bg-red-50 .text-slate-700,
.dark .bg-red-50 p,
.dark .bg-purple-50 .text-slate-700,
.dark .bg-purple-50 p,
.dark .bg-teal-50 .text-slate-700,
.dark .bg-teal-50 p {
    color: #cbd5e1 !important;
}

.dark .bg-blue-50 .text-slate-900,
.dark .bg-blue-50 .font-bold,
.dark .bg-orange-50 .text-slate-900,
.dark .bg-orange-50 .font-bold,
.dark .bg-emerald-50 .text-slate-900,
.dark .bg-emerald-50 .font-bold,
.dark .bg-amber-50 .text-slate-900,
.dark .bg-amber-50 .font-bold,
.dark .bg-red-50 .text-slate-900,
.dark .bg-red-50 .font-bold,
.dark .bg-purple-50 .text-slate-900,
.dark .bg-purple-50 .font-bold,
.dark .bg-teal-50 .text-slate-900,
.dark .bg-teal-50 .font-bold {
    color: #f1f5f9 !important;
}

/* Borders for these boxes */
.dark .border-blue-200,
.dark .border-orange-200,
.dark .border-emerald-200,
.dark .border-amber-200,
.dark .border-red-200,
.dark .border-purple-200,
.dark .border-teal-200 {
    border-color: #475569 !important;
}

/* ===== Order Page Dark Mode ===== */

/* Step indicators */
.dark .step-circle {
    background: #334155 !important;
    color: #94a3b8 !important;
}

.dark .step-circle.active {
    background: linear-gradient(135deg, #F7941D, #FF6B35) !important;
    color: white !important;
}

.dark .step-circle.completed {
    background: #10b981 !important;
    color: white !important;
}

.dark .step-label {
    color: #94a3b8 !important;
}

.dark .step-label.active,
.dark .step-label.completed {
    color: #F7941D !important;
}

/* Progress bar */
.dark .progress-bar {
    background: #334155 !important;
}

/* Order step content */
.dark .bg-white.p-6.lg\:p-8.rounded-2xl.shadow-lg {
    background-color: #1e293b !important;
}

.dark .bg-white.p-6.lg\:p-8.rounded-2xl.shadow-lg .text-slate-900,
.dark .bg-white.p-6.lg\:p-8.rounded-2xl.shadow-lg .font-black,
.dark .bg-white.p-6.lg\:p-8.rounded-2xl.shadow-lg h2 {
    color: #f1f5f9 !important;
}

.dark .bg-white.p-6.lg\:p-8.rounded-2xl.shadow-lg .text-slate-500,
.dark .bg-white.p-6.lg\:p-8.rounded-2xl.shadow-lg .text-slate-600,
.dark .bg-white.p-6.lg\:p-8.rounded-2xl.shadow-lg .text-slate-700,
.dark .bg-white.p-6.lg\:p-8.rounded-2xl.shadow-lg p {
    color: #cbd5e1 !important;
}

/* Urgency options */
.dark .border-2.border-slate-200.rounded-2xl {
    background-color: #0f172a !important;
    border-color: #334155 !important;
}

.dark .border-2.border-slate-200.rounded-2xl .text-slate-900,
.dark .border-2.border-slate-200.rounded-2xl .font-bold {
    color: #f1f5f9 !important;
}

.dark .border-2.border-slate-200.rounded-2xl .text-slate-500,
.dark .border-2.border-slate-200.rounded-2xl .text-slate-600,
.dark .border-2.border-slate-200.rounded-2xl .text-xs {
    color: #94a3b8 !important;
}

.dark .border-2.border-slate-200.rounded-2xl .text-slate-700 {
    color: #cbd5e1 !important;
}

/* Hover for urgency options */
.dark .border-2.border-slate-200.rounded-2xl:hover {
    border-color: #475569 !important;
}

/* Urgency option selected (has-checked) */
.dark .has-checked,
.dark .border-orange-300 {
    border-color: #F7941D !important;
    background-color: rgba(247, 148, 29, 0.1) !important;
}

/* Service selection options in order */
.dark .service-option {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

.dark .service-option .text-slate-900,
.dark .service-option .font-bold {
    color: #f1f5f9 !important;
}

.dark .service-option .text-slate-500,
.dark .service-option .text-slate-600,
.dark .service-option .text-slate-700 {
    color: #cbd5e1 !important;
}

/* Upload dropzone */
.dark .dropzone {
    background-color: #0f172a !important;
    border-color: #334155 !important;
}

.dark .dropzone:hover,
.dark .dropzone.dragover {
    border-color: #F7941D !important;
    background-color: rgba(247, 148, 29, 0.05) !important;
}

.dark .dropzone .text-slate-700 {
    color: #cbd5e1 !important;
}

.dark .dropzone .text-slate-500,
.dark .dropzone .text-slate-400 {
    color: #64748b !important;
}

/* File list items */
.dark .bg-slate-100.rounded-lg {
    background-color: #334155 !important;
}

/* Summary box */
.dark .bg-slate-50.rounded-2xl.p-5,
.dark .bg-slate-50.rounded-2xl {
    background-color: #0f172a !important;
}

.dark .bg-slate-50.rounded-2xl .text-slate-900,
.dark .bg-slate-50.rounded-2xl .font-bold,
.dark .bg-slate-50.rounded-2xl .font-black {
    color: #f1f5f9 !important;
}

.dark .bg-slate-50.rounded-2xl .text-slate-600,
.dark .bg-slate-50.rounded-2xl .text-slate-500 {
    color: #94a3b8 !important;
}

/* Payment option box */
.dark .border-2.border-slate-200.rounded-2xl.p-4 {
    background-color: #1e293b !important;
}

/* Terms box */
.dark .bg-slate-50.border.border-slate-200.rounded-xl {
    background-color: #0f172a !important;
    border-color: #334155 !important;
}

.dark .bg-slate-50.border.border-slate-200.rounded-xl .text-slate-900,
.dark .bg-slate-50.border.border-slate-200.rounded-xl .font-bold {
    color: #f1f5f9 !important;
}

.dark .bg-slate-50.border.border-slate-200.rounded-xl .text-slate-600,
.dark .bg-slate-50.border.border-slate-200.rounded-xl .text-slate-700 {
    color: #cbd5e1 !important;
}

.dark .bg-slate-50.border.border-slate-200.rounded-xl .text-slate-500 {
    color: #94a3b8 !important;
}

/* Terms content */
.dark #terms-content {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}

/* Info boxes (blue, etc) */
.dark .bg-blue-50.border.border-blue-200.rounded-2xl,
.dark .bg-blue-50.border.border-blue-200.rounded-xl {
    background-color: rgba(59, 130, 246, 0.1) !important;
    border-color: rgba(59, 130, 246, 0.3) !important;
}

.dark .bg-blue-50.border.border-blue-200 .text-blue-800,
.dark .bg-blue-50.border.border-blue-200 .text-sm {
    color: #93c5fd !important;
}

/* Red info boxes */
.dark .bg-red-50.border.border-red-200.rounded-xl,
.dark .bg-red-50.border.border-red-200 {
    background-color: rgba(239, 68, 68, 0.1) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
}

.dark .bg-red-50.border.border-red-200 .text-red-700,
.dark .bg-red-50.border.border-red-200 .text-red-800,
.dark .bg-red-50.border.border-red-200 .text-xs {
    color: #fca5a5 !important;
}

.dark .bg-red-50 .text-red-600 {
    color: #fca5a5 !important;
}

/* Amber boxes */
.dark .bg-amber-50.border.border-amber-200,
.dark .bg-amber-50.border.border-amber-300 {
    background-color: rgba(245, 158, 11, 0.1) !important;
    border-color: rgba(245, 158, 11, 0.3) !important;
}

.dark .bg-amber-50 .text-amber-800,
.dark .bg-amber-50 .text-amber-700,
.dark .bg-amber-50 .text-amber-900 {
    color: #fcd34d !important;
}

/* Emerald boxes */
.dark .bg-emerald-50.border.border-emerald-200 {
    background-color: rgba(16, 185, 129, 0.1) !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
}

.dark .bg-emerald-50 .text-emerald-700,
.dark .bg-emerald-50 .text-emerald-800 {
    color: #6ee7b7 !important;
}

/* Sticky sidebar */
.dark .bg-white.p-6.rounded-2xl.shadow-md.sticky {
    background-color: #1e293b !important;
}

/* Vendor comparison cards */
.dark .border-2.border-slate-200.rounded-xl.p-4,
.dark .border-2.border-emerald-300.bg-emerald-50.rounded-xl.p-4,
.dark .border-2.rounded-xl.p-4 {
    background-color: #1e293b !important;
}

.dark .border-2.border-emerald-300 {
    background-color: rgba(16, 185, 129, 0.1) !important;
    border-color: rgba(16, 185, 129, 0.5) !important;
}

.dark .border-2.border-emerald-300 .text-slate-900,
.dark .border-2.border-emerald-300 .font-bold {
    color: #f1f5f9 !important;
}

.dark .border-2.border-emerald-300 .text-slate-500,
.dark .border-2.border-emerald-300 .text-slate-600 {
    color: #cbd5e1 !important;
}

.dark .border-2.border-slate-200.rounded-xl .text-slate-900,
.dark .border-2.border-slate-200.rounded-xl .font-bold {
    color: #f1f5f9 !important;
}

.dark .border-2.border-slate-200.rounded-xl .text-slate-500,
.dark .border-2.border-slate-200.rounded-xl .text-slate-600 {
    color: #cbd5e1 !important;
}

/* Breadcrumb */
.dark nav.text-sm .text-slate-500,
.dark nav.text-sm .text-slate-700 {
    color: #94a3b8 !important;
}

/* Vendor logo placeholder */
.dark .brand-primary {
    /* Keep original */
}

/* Form labels */
.dark label {
    color: #cbd5e1 !important;
}

.dark label .text-slate-700,
.dark label .text-slate-900 {
    color: #cbd5e1 !important;
}

.dark .text-red-500,
.dark .text-red-600 {
    color: #f87171 !important;
}

/* Result message box */
.dark .bg-white.rounded-lg.p-3 {
    background-color: #334155 !important;
}

/* Details element */
.dark details summary {
    color: #60a5fa !important;
}

/* Dark mode toggle button */
.theme-toggle {
    position: relative;
    width: 56px;
    height: 28px;
    background: #e2e8f0;
    border-radius: 14px;
    cursor: pointer;
    transition: background 0.3s;
    border: none;
    padding: 2px;
}

.dark .theme-toggle {
    background: #334155;
}

.theme-toggle-thumb {
    width: 24px;
    height: 24px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.dark .theme-toggle-thumb {
    transform: translateX(-28px);
    background: #0f172a;
}

/* Search dropdown */
.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    max-height: 400px;
    overflow-y: auto;
    z-index: 100;
    margin-top: 8px;
    display: none;
}

.dark .search-dropdown {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
}

.search-dropdown.show {
    display: block;
}

.search-result-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.dark .search-result-item {
    border-bottom-color: var(--border-color);
}

.search-result-item:hover {
    background: #f8fafc;
}

.dark .search-result-item:hover {
    background: var(--bg-secondary);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.search-highlight {
    background: #fef3c7;
    padding: 0 2px;
    border-radius: 2px;
    font-weight: 700;
}

.dark .search-highlight {
    background: #78350f;
    color: #fef3c7;
}

/* Loading spinner for search */
.search-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* ===== Brand Gradients ===== */
.brand-gradient {
    background: linear-gradient(135deg, #0D4F8B 0%, #1E88B8 50%, #14B8A6 100%);
}

.brand-gradient-orange {
    background: linear-gradient(135deg, #F7941D 0%, #FF6B35 100%);
}

/* Plan C: رنگ اصلی آبی-فیروزه‌ای (برای هدر، لوگو، کارت‌ها، CTA sections) */
.brand-primary {
    background: linear-gradient(135deg, #0D4F8B 0%, #1E88B8 100%);
}
.brand-primary-gradient {
    background: linear-gradient(135deg, #0D4F8B 0%, #1E88B8 50%, #14B8A6 100%);
}
.brand-primary-text {
    color: #0D4F8B;
}
.brand-primary-soft {
    background: #E6F3FA;
    color: #0D4F8B;
}

.brand-text-gradient {
    background: linear-gradient(135deg, #0D4F8B 0%, #14B8A6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* ===== Hero Glow ===== */
.hero-glow {
    background:
        radial-gradient(circle at 70% 30%, rgba(247, 148, 29, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 20% 70%, rgba(20, 184, 166, 0.12) 0%, transparent 50%);
}

/* ===== Card Hover ===== */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -10px rgba(13, 79, 139, 0.15);
}

/* ===== Animations ===== */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(247, 148, 29, 0.4); }
    50% { box-shadow: 0 0 0 12px rgba(247, 148, 29, 0); }
}

.animate-pulse-glow {
    animation: pulse-glow 2s infinite;
}

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

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ===== Service Card Colors ===== */
.gradient-orange { background: linear-gradient(135deg, #f97316, #f59e0b); }
.gradient-blue { background: linear-gradient(135deg, #2563eb, #06b6d4); }
.gradient-teal { background: linear-gradient(135deg, #14b8a6, #10b981); }
.gradient-purple { background: linear-gradient(135deg, #a855f7, #ec4899); }
.gradient-rose { background: linear-gradient(135deg, #f43f5e, #f97316); }
.gradient-indigo { background: linear-gradient(135deg, #6366f1, #3b82f6); }
.gradient-amber { background: linear-gradient(135deg, #f59e0b, #eab308); }
.gradient-cyan { background: linear-gradient(135deg, #06b6d4, #14b8a6); }
.gradient-slate { background: linear-gradient(135deg, #475569, #1e293b); }
.gradient-violet { background: linear-gradient(135deg, #8b5cf6, #a855f7); }

/* ===== Persian Numbers ===== */
.persian-nums {
    font-feature-settings: "ss01";
}

/* ===== Loading Spinner ===== */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* ===== Toast Notification ===== */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-right: 4px solid #F7941D;
    z-index: 9999;
    transform: translateX(-400px);
    transition: transform 0.3s ease;
}

.toast.show {
    transform: translateX(0);
}

.toast.success { border-right-color: #10b981; }
.toast.error { border-right-color: #ef4444; }

/* ===== Progress Bar ===== */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #F7941D, #FF6B35);
    border-radius: 999px;
    transition: width 0.5s ease;
}

/* ===== Form Inputs ===== */
.form-input {
    width: 100%;
    padding-top: 12px;
    padding-bottom: 12px;
    padding-left: 16px;
    padding-right: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
    transition: all 0.2s;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: #F7941D;
    box-shadow: 0 0 0 3px rgba(247, 148, 29, 0.1);
}

/* ===== Buttons ===== */
.btn-primary {
    background: linear-gradient(135deg, #F7941D 0%, #FF6B35 100%);
    color: white;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 8px 20px rgba(247, 148, 29, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(247, 148, 29, 0.4);
}

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

.btn-secondary {
    background: white;
    color: #1A1A2E;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s;
}

/* v3.1.2: btn-secondary در دارک مود */
.dark .btn-secondary {
    background: #1e293b;
    color: #f1f5f9;
    border-color: #334155;
}

.dark .btn-secondary:hover {
    background: #334155;
    border-color: #475569;
    color: #ffffff;
}

.btn-secondary:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

/* ===== Stat Card ===== */
.stat-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.stat-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* ===== Order Status Badges ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.badge-new { background: #dbeafe; color: #1d4ed8; }
.badge-in_progress { background: #fef3c7; color: #b45309; }
.badge-done { background: #d1fae5; color: #047857; }
.badge-cancelled { background: #fee2e2; color: #b91c1c; }

.badge-pending { background: #fef3c7; color: #b45309; }
.badge-paid { background: #d1fae5; color: #047857; }
.badge-failed { background: #fee2e2; color: #b91c1c; }

/* ===== Admin Sidebar ===== */
.admin-sidebar {
    width: 250px;
    background: #0D4F8B;
    color: white;
    height: 100vh;
    max-height: 100vh;
    padding: 20px 0 80px 0;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 50;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* اسکرول‌بار سفارشی برای سایدبار */
.admin-sidebar::-webkit-scrollbar {
    width: 6px;
}
.admin-sidebar::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
}
.admin-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
}
.admin-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}

/* منوی سایدبار قابل اسکرول شدن */
.admin-sidebar nav {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 10px;
}
.admin-sidebar nav::-webkit-scrollbar {
    width: 4px;
}
.admin-sidebar nav::-webkit-scrollbar-track {
    background: transparent;
}
.admin-sidebar nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
}

.admin-sidebar .sidebar-bottom {
    flex-shrink: 0;
    position: relative !important;
    margin-top: auto;
    padding: 20px 20px 25px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.2);
    width: 100%;
    min-height: 80px;
}

.admin-content {
    margin-right: 250px;
    padding: 30px;
    min-height: 100vh;
}

/* Mobile overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 45;
}
.sidebar-overlay.show {
    display: block;
}

/* Mobile: sidebar completely hidden */
@media (max-width: 1023px) {
    .admin-sidebar {
        display: none;
    }
    .admin-sidebar.open {
        display: block;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 250px;
        height: 100vh;
        overflow-y: auto;
        z-index: 50;
    }
    .admin-content {
        margin-right: 0;
        padding: 15px;
        width: 100%;
    }
}

.admin-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.2s;
    border-right: 3px solid transparent;
}

.admin-menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.admin-menu-item.active {
    background: rgba(247, 148, 29, 0.15);
    color: white;
    border-right-color: #F7941D;
}

/* ===== Chart Bar ===== */
.chart-bar {
    background: linear-gradient(135deg, #F7941D 0%, #FF6B35 100%);
    border-radius: 8px 8px 0 0;
    transition: all 0.3s;
    cursor: pointer;
    min-height: 10px;
}

.chart-bar:hover {
    opacity: 0.8;
}

/* ===== File Upload Dropzone ===== */
.dropzone {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
}

.dropzone:hover, .dropzone.dragover {
    border-color: #F7941D;
    background: #fff7ed;
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-overlay.show {
    display: flex;
}

/* v3.3.1: مودال امتیازدهی و سایر مودال‌های با ID خاص */
#rating-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#rating-modal.show {
    display: flex !important;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

/* ===== Responsive Utilities ===== */
@media (max-width: 640px) {
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* ===== Print Styles ===== */
@media print {
    header, footer, .no-print {
        display: none !important;
    }
}

/* ===== v3.1 — Cart System, Animations, Modal ===== */

/* ===== v3.1.2: Dark mode text overrides for index.php ===== */
/* v3.3.0: رفع نهایی مشکل دارک مود باکس محبوب‌ها */
.dark .text-slate-900 {
    color: #f1f5f9 !important;
}

.dark .text-slate-700 {
    color: #cbd5e1 !important;
}

.dark .text-slate-600 {
    color: #94a3b8 !important;
}

.dark .text-slate-500 {
    color: #94a3b8 !important;
}

.dark .text-slate-400 {
    color: #64748b !important;
}

/* v3.3.0: اطمینان از خوانایی هدر section در دارک مود */
.dark section.bg-white {
    background-color: #0f172a !important;
}

/* v3.3.0: گرادیان نارنجی روی لوگو + سایه نرم */
img[src*="logo_new"] {
    filter: drop-shadow(0 2px 8px rgba(247, 148, 29, 0.3));
    transition: filter 0.3s ease;
}

img[src*="logo_new"]:hover {
    filter: drop-shadow(0 4px 12px rgba(247, 148, 29, 0.5));
}

/* ===== v3.1.3: Cart Badge — بزرگ و خوانا ===== */
.cart-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f97316, #ef4444);
    color: white !important;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    margin-right: 6px;
    box-shadow: 0 2px 6px rgba(249, 115, 22, 0.4);
    line-height: 1;
}

.cart-badge-icon {
    position: absolute;
    top: -4px;
    right: -4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f97316, #ef4444);
    color: white !important;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 2px 6px rgba(249, 115, 22, 0.5);
    line-height: 1;
    border: 2px solid white;
}

/* ===== Sticky Cart Bar ===== */
/* v3.1.5: رنگ معکوس — Light: مشکی/تیره، Dark: سفید */
.cart-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    /* Light mode: نوار تیره */
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border-top: 2px solid #f97316;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.2);
    padding: 12px 0;
    z-index: 60;
    animation: slideUpBar 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    color: #f1f5f9;
}

/* Dark mode: نوار سفید */
.dark .cart-bar {
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border-top-color: #f97316;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.3);
    color: #1e293b;
}

/* Light mode: متن‌ها روشن */
.cart-bar .text-slate-500,
.cart-bar .text-slate-900,
.cart-bar .text-slate-400 {
    color: #cbd5e1 !important;
}

.cart-bar .text-slate-900 {
    color: #ffffff !important;
}

/* Dark mode: متن‌ها تیره */
.dark .cart-bar .text-slate-500,
.dark .cart-bar .text-slate-900,
.dark .cart-bar .text-slate-400 {
    color: #475569 !important;
}

.dark .cart-bar .text-slate-900 {
    color: #0f172a !important;
}

/* آیکون حذف در light mode (روی پس‌زمینه تیره) */
.cart-bar .text-slate-400:hover {
    color: #f87171 !important;
}

.dark .cart-bar .text-slate-400 {
    color: #64748b !important;
}

.dark .cart-bar .text-slate-400:hover {
    color: #ef4444 !important;
}

@keyframes slideUpBar {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Service Card — selected state */
.service-card {
    cursor: pointer;
    position: relative;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card.cart-pulse {
    animation: cartPulse 0.6s ease-out;
}

@keyframes cartPulse {
    0% { transform: scale(1); }
    30% { transform: scale(0.96); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0.2); }
    60% { transform: scale(1.02); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.service-card .select-service-btn.btn-selected {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Bounce animation for check icon & cart icon */
.cart-bounce {
    animation: cartBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes cartBounce {
    0% { transform: scale(0) rotate(-180deg); }
    50% { transform: scale(1.3) rotate(0deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* Toast Notifications (showToast) */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 360px;
}

/* v3.1.1: اگه cart-bar نشون داده می‌شه، toast container بالاتر بره */
body[style*="padding-bottom: 90px"] .toast-container {
    bottom: 100px;
}

/* v3.1.1: اگه cart-bar نشون داده می‌شه، chat widget هم بالاتر بره */
body[style*="padding-bottom: 90px"] #chat-widget {
    bottom: 90px !important;
}

.toast-item {
    background: white;
    padding: 14px 18px;
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    border-right: 4px solid #F7941D;
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 280px;
    animation: toastIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.dark .toast-item {
    background: #1e293b;
    color: #f1f5f9;
    border-right-color: #F7941D;
}

.toast-item.toast-leaving {
    animation: toastOut 0.3s ease-in forwards;
}

@keyframes toastIn {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes toastOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(120%); opacity: 0; }
}

.toast-item.success { border-right-color: #10b981; }
.toast-item.error { border-right-color: #ef4444; }
.toast-item.warning { border-right-color: #f59e0b; }
.toast-item.info { border-right-color: #3b82f6; }

.toast-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.toast-item.success .toast-icon { color: #10b981; }
.toast-item.error .toast-icon { color: #ef4444; }
.toast-item.warning .toast-icon { color: #f59e0b; }
.toast-item.info .toast-icon { color: #3b82f6; }

.toast-title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 2px;
}

.toast-message {
    font-size: 12px;
    color: #64748b;
}

.dark .toast-message {
    color: #94a3b8;
}

/* Modal — v3.1.5: فقط برای مودال‌های صفحه‌ی اصلی (با ID) */
/* توجه: این استایل فقط برای مودال‌های صفحه‌ی اصلی اعمال می‌شه تا با مودال‌های پنل ادمین تداخل نکنه */
#home-service-modal.modal-overlay,
#service-modal.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.25s ease-out;
}

#home-service-modal.modal-overlay.hidden,
#service-modal.modal-overlay.hidden {
    display: none;
}

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

#home-service-modal .modal-content,
#service-modal .modal-content {
    animation: modalIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 90vh;
    overflow-y: auto;
}

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

/* Quick Order Button (سبز متمایز) */
.btn-quick-order {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.btn-quick-order:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(16, 185, 129, 0.4);
}

/* ===== Dark mode fixes for index.php sections (v3.1) ===== */
.dark section.py-12.bg-white,
.dark section.py-20.bg-white {
    background: #0f172a !important;
}

.dark .bg-gradient-to-b.from-slate-50 {
    background: linear-gradient(to bottom, #1e293b, #0f172a) !important;
}

/* Step circles in "3 sot" section — make labels visible in dark mode */
.dark .step-label {
    color: #cbd5e1 !important;
}

.dark .step-label.active,
.dark .step-label.completed {
    color: #F7941D !important;
}

/* Step number circle wrapper — bordered in dark mode for visibility */
.dark .relative.inline-block.mb-6 .w-24.h-24 {
    border: 4px solid rgba(255, 255, 255, 0.1);
}

/* Popular Services section badge — dark mode */
.dark .bg-orange-50 {
    background: rgba(247, 148, 29, 0.1) !important;
    color: #fb923c !important;
}

/* "سوت اول/دوم/سوم" badge — dark mode */
.dark .bg-orange-100 {
    background: rgba(247, 148, 29, 0.15) !important;
    color: #fb923c !important;
}

/* Service card text in dark mode */
.dark .service-card h3 {
    color: #f1f5f9 !important;
}

.dark .service-card .text-slate-500,
.dark .service-card .text-slate-400 {
    color: #94a3b8 !important;
}

/* Stat card text in dark mode */
.dark .stat-card .text-slate-900 {
    color: #f1f5f9 !important;
}

.dark .stat-card .text-slate-500 {
    color: #94a3b8 !important;
}

/* ===============================================
   v5.5.0 — فاز E1: دسترس‌پذیری (Accessibility)
   =============================================== */

/* Skip-to-content link — فقط کیبوردی‌ها می‌بیننش */
.skip-to-content {
    position: absolute;
    top: -100px;
    right: 16px;
    z-index: 9999;
    background: #1e40af;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 0 0 12px 12px;
    font-weight: 700;
    font-size: 0.875rem;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(30, 64, 175, 0.3);
    transition: top 0.2s ease-in-out;
}

.skip-to-content:focus {
    top: 0;
    outline: 3px solid #fbbf24;
    outline-offset: 2px;
}

/* Focus-visible — فقط موقع ناوبری کیبوردی، حلقه‌ی واضح نشون بده */
*:focus-visible {
    outline: 3px solid #2563eb;
    outline-offset: 2px;
    border-radius: 4px;
}

/* برای دکمه‌های دایره‌ای/مربعی کوچک، offset کمتر */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid #2563eb;
    outline-offset: 2px;
}

/* در دارک‌مود رنگ focus روشن‌تر */
.dark *:focus-visible {
    outline-color: #60a5fa;
}

/* حذف outline فقط برای کلیک موس */
*:focus:not(:focus-visible) {
    outline: none;
}

/* کاهش حرکت — اگه کاربر درخواست داده، انیمیشن‌ها غیرفعال بشن */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .animate-float,
    .animate-pulse,
    .animate-spin,
    .animate-bounce {
        animation: none !important;
    }
}

/* کنتراست بالاتر — اگه کاربر درخواست کرده */
@media (prefers-contrast: more) {
    :root {
        --text-secondary: #1e293b;
        --text-muted: #334155;
        --border-color: #475569;
    }

    .dark {
        --text-secondary: #e2e8f0;
        --text-muted: #cbd5e1;
        --border-color: #94a3b8;
    }

    *:focus-visible {
        outline-width: 4px;
    }
}

/* aria-live region برای toast‌ها — نامرئی اما قابل شنیدن توسط screen reader */
.toast-container,
#toast-container {
    /* aria-live به container اضافه می‌شه، این فقط styling هست */
}

/* مودال‌ها — وقتی باز می‌شن، body اسکرول نشه */
body.modal-open {
    overflow: hidden;
}

/* مودال قابل دسترس — focus ring داخل مودال */
[role="dialog"] {
    outline: none;
}

[role="dialog"]:focus-visible {
    outline: 3px solid #2563eb;
    outline-offset: 4px;
}

/* انیمیشن ورود مودال (محترمانه — fade فقط) */
@keyframes a11yModalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.a11y-modal-overlay {
    animation: a11yModalFadeIn 0.2s ease-out;
}

/* بهبود کنتراست برای متن‌های کم‌رنگ در حالت روشن */
.text-slate-400 {
    color: #64748b !important;
}

.text-slate-500 {
    color: #475569 !important;
}

/* لینک‌های قابل تشخیص بهتر — زیرخط روی hover */
a:not(.btn):not(.brand-gradient-orange):not(.brand-primary):hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* برای دکمه‌های فقط-آیکون، وقتی aria-label دارن، hover واضح‌تر */
button[aria-label]:hover {
    opacity: 0.9;
}

/* اطمینان از اینکه متن داخل دکمه‌ها قابل خواندنه */
button {
    cursor: pointer;
}

/* اطمینان از اینکه فرم‌ها keyboard-friendly هستن */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="search"],
input[type="url"],
textarea,
select {
    min-height: 44px; /* حداقل ارتفاع لمسی */
}

/* checkbox و radio با اندازه‌ی لمسی بزرگتر */
input[type="checkbox"],
input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* پیام خطای فرم — قابل تشخیص با ARIA */
[aria-invalid="true"] {
    border-color: #dc2626 !important;
    background-color: #fef2f2 !important;
}

.dark [aria-invalid="true"] {
    border-color: #f87171 !important;
    background-color: rgba(220, 38, 38, 0.1) !important;
}

/* انیمیشن مودال خطای نام (در order.php) — بدون حرکت بیش از حد */
@keyframes a11yShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

.a11y-shake {
    animation: a11yShake 0.3s ease-in-out;
}

/* برای screen reader-only text */
.sr-only-focusable:focus {
    position: fixed;
    top: 0;
    right: 0;
    width: auto;
    height: auto;
    padding: 12px 16px;
    background: #1e40af;
    color: #ffffff;
    z-index: 9999;
    clip: auto;
    white-space: normal;
}

/* اطمینان از اینکه منوی کشویی موبایل وقتی بازه، focus می‌گیره */
#mobile-menu:not(.hidden) {
    /* منو قابل دیدن با کیبورد */
}

/* announcing live region برای تغییرات سبد خرید */
.cart-announcement {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===============================================
   v5.6.0 — فاز H1: متن‌های راهنما (Helper Text + Tooltip)
   =============================================== */

/* Helper text — متن کوچک زیر فیلدهای فرم */
.helper-text {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    margin-top: 4px;
    font-size: 0.75rem;
    line-height: 1.4;
    color: #64748b;
}

.dark .helper-text {
    color: #94a3b8;
}

.helper-text svg,
.helper-text [data-lucide] {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    margin-top: 2px;
    color: #3b82f6;
}

/* Helper info badge — کنار label */
.helper-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #e0f2fe;
    color: #0284c7;
    font-size: 11px;
    font-weight: bold;
    cursor: help;
    margin-right: 4px;
    vertical-align: middle;
    position: relative;
    border: 1px solid #bae6fd;
}

.dark .helper-badge {
    background: rgba(2, 132, 199, 0.2);
    color: #7dd3fc;
    border-color: rgba(125, 211, 252, 0.3);
}

/* Tooltip — روی hover/focus روی helper-badge */
.helper-badge:hover::after,
.helper-badge:focus::after,
.helper-badge:hover::before,
.helper-badge:focus::before {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.15s ease, visibility 0.15s ease;
}

.helper-badge::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    right: 50%;
    transform: translateX(50%);
    background: #1e293b;
    color: #ffffff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
    max-width: 240px;
    white-space: normal;
    width: max-content;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.helper-badge::before {
    content: '';
    position: absolute;
    bottom: 100%;
    right: 50%;
    transform: translateX(50%);
    border: 4px solid transparent;
    border-top-color: #1e293b;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* مثال نمایش برای راهنمایی فرمت */
.format-hint {
    display: inline-block;
    background: #f1f5f9;
    color: #475569;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Vazirmatn', 'Courier New', monospace;
    font-size: 11px;
    direction: ltr;
    margin: 0 2px;
    border: 1px solid #e2e8f0;
}

.dark .format-hint {
    background: #334155;
    color: #cbd5e1;
    border-color: #475569;
}

/* Empty state — وقتی لیست خالیه */
.empty-state {
    text-align: center;
    padding: 32px 16px;
    color: #64748b;
}

.empty-state [data-lucide],
.empty-state svg {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    color: #cbd5e1;
}

.dark .empty-state [data-lucide],
.dark .empty-state svg {
    color: #475569;
}

.empty-state-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #475569;
    margin-bottom: 4px;
}

.dark .empty-state-title {
    color: #cbd5e1;
}

.empty-state-desc {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 12px;
}

/* Section helper — توضیح ابتدای هر سکشن */
.section-helper {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 14px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 0.8rem;
    color: #1e40af;
    line-height: 1.6;
}

.dark .section-helper {
    background: rgba(30, 64, 175, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

.section-helper [data-lucide] {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}

/* Required field indicator (asterisk red) */
.required-asterisk {
    color: #ef4444;
    margin-right: 2px;
    font-weight: bold;
}

/* Optional field badge */
.optional-badge {
    display: inline-block;
    background: #f1f5f9;
    color: #64748b;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
    margin-right: 4px;
    vertical-align: middle;
}

.dark .optional-badge {
    background: #334155;
    color: #94a3b8;
}

/* ============================================
   v7.9.0: A11Y2 — بهبود دسترس‌پذیری
   ============================================ */

/* حداقل سایز لمسی برای دکمه‌های موبایل (WCAG 2.5.5) */
@media (max-width: 1024px) {
    button,
    .admin-menu-item,
    a.btn-primary,
    a.btn-secondary {
        min-height: 40px;
    }
}

/* بهبود focus-visible — حاشیه آبی واضح‌تر */
*:focus-visible {
    outline: 3px solid #3b82f6 !important;
    outline-offset: 2px !important;
    border-radius: 4px;
}

/* در dark mode، focus-visible سفید باشه */
.dark *:focus-visible {
    outline-color: #60a5fa !important;
}

/* skip-to-content — فقط وقتی focus می‌شه نشون داده بشه */
.skip-to-content {
    position: absolute;
    top: -100px;
    right: 0;
    background: #1e40af;
    color: white;
    padding: 12px 24px;
    border-radius: 0 0 0 8px;
    font-weight: 700;
    z-index: 9999;
    transition: top 0.2s;
}

.skip-to-content:focus {
    top: 0;
    outline: 3px solid #fbbf24;
    outline-offset: 2px;
}

/* بهبود تضاد رنگ (contrast) — متن‌های روشن رو تیره‌تر کن */
.text-slate-400 {
    color: #64748b !important;
}

.dark .text-slate-400 {
    color: #94a3b8 !important;
}

/* بهبود خوانایی placeholder */
input::placeholder,
textarea::placeholder {
    color: #94a3b8;
    opacity: 1;
}

/* اطمینان از اینکه همه‌ی تصاویر alt دارن — اگه ندارن، border قرمز */
img:not([alt]) {
    border: 2px dashed #ef4444;
}

/* اطمینان از اینکه فیلدهای فرم label دارن — اگه ندارن، border نارنجی */
input:not([type="hidden"]):not([type="submit"]):not([type="button"]):not([id]),
textarea:not([id]),
select:not([id]) {
    border-color: #f59e0b;
}

/* کاهش حرکت برای کاربرانی که پیش‌فرض減少 حرکت رو فعال کردن */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* بهبود خوانایی متن طولانی */
p {
    line-height: 1.7;
}

/* بهبود link underline برای دسترس‌پذیری */
a:not([class]) {
    text-decoration: underline;
}

/* اطمینان از اینکه دکمه‌های آیکون‌دار aria-label دارن */
button:not([aria-label]):not([type="submit"]):empty {
    outline: 2px dashed #f59e0b;
}
