﻿/* ═══════════════════════════════════════════
   BizDirectory - استایل اصلی (تم سبز)
   ═══════════════════════════════════════════ */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
    direction: rtl;
    background: #f4f7f4;
    color: #333;
    line-height: 1.7;
    font-size: 14px;
}

a { color: #2e7d32; text-decoration: none; }
a:hover { text-decoration: underline; }

.header {
    background: linear-gradient(135deg, #2e7d32, #43a047);
    color: #fff;
    padding: 14px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 6px rgba(0,0,0,.12);
    flex-wrap: wrap;
    gap: 10px;
    max-width: 1100px;
    margin: 20px auto;
   /*padding: 0 15px;*/ 
}
.header .logo { font-size: 20px; font-weight: bold; }
.header .logo a { color: #fff; }
.header .nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.header .nav a {
    color: #fff;
    padding: 7px 14px;
    border-radius: 4px;
    background: rgba(255,255,255,.15);
    font-size: 13px;
    transition: background .2s;
}
.header .nav a:hover { background: rgba(255,255,255,.3); text-decoration: none; }
.header .nav a.special {
    background: #ffb300;
    color: #3e2723;
    font-weight: bold;
}
.header .nav a.special:hover { background: #ffa000; }

/* ═══ Container ═══ */
.container {
    max-width: 1100px;
    margin: 20px auto;
    padding: 0 0px;
}

/* ═══ Location Bar ═══ */
.location-bar {
    background: #fff;
    padding: 12px 18px;
    border-radius: 6px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    border-right: 4px solid #43a047;
}
.location-bar .icon { color: #43a047; font-size: 18px; }

/* ═══ Map ═══ */
#userMap {
    height: 220px;
    border-radius: 6px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

/* ═══ Search Tabs ═══ */
/* ═══ تب‌های جستجو ═══ */
.search-tabs {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
    background: #f7faf7;
}
.search-tabs .tab {
    flex: 1;
    text-align: center;
    padding: 14px 13px;
    cursor: pointer;
    font-weight: bold;
    color: #777;
    background: #f7faf7;
    border-bottom: 3px solid transparent;
    transition: all .25s;
    font-size: 13px;
    position: relative;
}
.search-tabs .tab:hover {
    background: #eef5ee;
    color: #2e7d32;
}
.search-tabs .tab.active {
    color: #fff;
    border-bottom-color: rgba(0,0,0,.2);
    box-shadow: 0 3px 8px rgba(0,0,0,.15);
    transform: translateY(-1px);
}
.search-tabs .tab[data-tab="radius"].active {
    background: linear-gradient(135deg, #43a047, #2e7d32);
}
.search-tabs .tab[data-tab="smart"].active {
    background: linear-gradient(135deg, #1e88e5, #1565c0);
}
.search-tabs .tab[data-tab="field"].active {
    background: linear-gradient(135deg, #fb8c00, #e65100);
	
}

/* ═══ پنل‌های جستجو ═══ */
.search-panel {
    padding: 20px;
    display: none;
    border-top: 1px solid #eee;
}
.search-panel.active {
    display: block;
}

/* ═══════════════════════════════════════════
   Search Panels - Gray Theme (آرامش‌بخش)
   ═══════════════════════════════════════════ */

/* پنل جستجوی شعاعی (سبز قبلی) */
#panel-radius.active {
    background: #f5f5f5; /* خاکستری خیلی روشن */
    border-right: 0px solid #9e9e9e; /* نوار کناری خاکستری */
}

/* پنل جستجوی هوشمند (آبی قبلی) */
#panel-smart.active {
    background: #f5f5f5;
    border-right: 0px solid #9e9e9e;
}

/* پنل جستجوی فیلد محور (نارنجی قبلی) */
#panel-field.active {
    background: #f5f5f5;
    border-right: 0px solid #9e9e9e;
}

/* ═══ استایل فیلدهای ورودی داخل پنل‌ها ═══ */
/* برای اینکه فیلدها روی پس‌زمینه خاکستری خودنمایی کنند، پس‌زمینه آن‌ها را سفید می‌کنیم */
.search-panel input[type="text"],
.search-panel input[type="number"],
.search-panel select {
    background-color: #ffffff;
    border: 1px solid #ccc;
}

/* فوکوس روی فیلدها */
.search-panel input[type="text"]:focus,
.search-panel input[type="number"]:focus,
.search-panel select:focus {
    border-color: #757575;
    box-shadow: 0 0 0 3px rgba(117, 117, 117, 0.15);
    outline: none;
}

/* ═══ دکمه‌های داخل پنل‌ها ═══ */
/* برای هماهنگی بیشتر، دکمه‌های جستجو در این پنل‌ها را هم خاکستری تیره می‌کنیم */
#panel-radius .btn,
#panel-smart .btn,
#panel-field .btn {
    background: #616161; /* خاکستری تیره */
    color: #fff;
}

#panel-radius .btn:hover,
#panel-smart .btn:hover,
#panel-field .btn:hover {
    background: #424242; /* خاکستری تیره‌تر در هاور */
}

/* ═══ اسلایدر شعاع (در پنل اول) ═══ */
#panel-radius input[type=range] {
    /* از طیف قرمز-سبز به طیف خاکستری تغییر می‌کند */
    background: linear-gradient(to left, #9e9e9e, #e0e0e0, #f5f5f5); 
}
#panel-radius input[type=range]::-webkit-slider-thumb {
    border-color: #616161;
}
#panel-radius input[type=range]::-moz-range-thumb {
    border-color: #616161;
}

/* ═══ دکمه‌های رنگی داخل هر پنل ═══ */
#panel-radius .btn {
    background: #43a047;
}
#panel-radius .btn:hover {
    background: #2e7d32;
}
#panel-smart .btn {
    background: #1e88e5;
}
#panel-smart .btn:hover {
    background: #1565c0;
}
#panel-field .btn {
    background: #fb8c00;
}
#panel-field .btn:hover {
    background: #e65100;
}

/* ═══ اسلایدر سبز در پنل شعاعی ═══ */
#panel-radius input[type=range] {
    background: linear-gradient(to left, #43a047, #81c784, #c8e6c9);
}
#panel-radius input[type=range]::-webkit-slider-thumb {
    border-color: #2e7d32;
}
#panel-radius input[type=range]::-moz-range-thumb {
    border-color: #2e7d32;
}

/* ═══ فیلدهای ورودی داخل پنل‌ها (کمی هم‌رنگ) ═══ */
#panel-radius input[type=text]:focus,
#panel-radius input[type=number]:focus,
#panel-radius select:focus {
    border-color: #43a047;
    box-shadow: 0 0 0 3px rgba(67,160,71,.15);
}
#panel-smart input[type=text]:focus {
    border-color: #1e88e5;
    box-shadow: 0 0 0 3px rgba(30,136,229,.15);
}
#panel-field input[type=text]:focus,
#panel-field select:focus {
    border-color: #fb8c00;
    box-shadow: 0 0 0 3px rgba(251,140,0,.15);
}

.form-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.form-row > * { flex: 1; min-width: 150px; }
.form-row label { font-size: 12px; color: #555; }

input[type=text], input[type=number], select {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 13px;
    width: 100%;
    transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus {
    outline: none;
    border-color: #43a047;
    box-shadow: 0 0 0 3px rgba(67,160,71,.15);
}

input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to left, #43a047, #fb8c00, #e53935);
    outline: none;
    width: 100%;
}
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #43a047;
    cursor: pointer;
}

.btn {
    padding: 10px 22px;
    background: #43a047;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: bold;
    transition: background .2s;
    display: inline-block;
    text-decoration: none;
}
.btn:hover { background: #388e3c; text-decoration: none; color: #fff; }
.btn-secondary { background: #78909c; }
.btn-secondary:hover { background: #607d8b; }
.btn-special {
    background: #ffb300;
    color: #3e2723;
}
.btn-special:hover { background: #ffa000; color: #3e2723; }

/* ═══ Ads ═══ */
.ad-banner {
    background: #fff;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 15px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    transition: transform .2s;
}
.ad-banner:hover { transform: translateY(-2px); }
.ad-banner img {
    max-width: 100%;
    height: auto;
    max-height: 140px;
    border-radius: 4px;
}

/* ═══ Sidebar Layout ═══ */
.main-wrapper {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 20px;
    align-items: start;
    margin-top: 10px;
}
.main-content { min-width: 0; }
.sidebar { position: sticky; top: 20px; }

.sidebar-ad {
    background: #fff;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 15px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    transition: transform .2s, box-shadow .2s;
}
.sidebar-ad:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,.1);
}
.sidebar-ad img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
}

/* ═══ Section Title ═══ */
.section-title {
    font-size: 17px;
    color: #2e7d32;
    margin: 25px 0 15px;
    padding-right: 12px;
    border-right: 4px solid #43a047;
    font-weight: bold;
}
.section-title:first-child { margin-top: 0; }

/* ═══ Business Cards ═══  display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 15px;*/
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));  /* ← از 260px به 210px */
    gap: 12px;  /* ← از 15px */
    align-items: stretch;  /* ← مهم: کارت‌ها هم‌ارتفاع */
}

.card {
    height: auto;  /* ← ارتفاع بر اساس محتوا */
	background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    transition: transform .2s, box-shadow .2s;
    display: flex;
    flex-direction: column;
    position: relative;
}
.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(67,160,71,.15);
}
.card img {
   
	position: relative;
    width: 100%;
    height: 120px;  /* ← از 160 به 120 کاهش */
    overflow: hidden;
    background: #f4f6f8;
    flex-shrink: 0;
}
.card .body {
    padding: 8px 10px;  /* ← از 12px 14px کاهش */
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: visible;  /* ← مهم: از مخفی شدن جلوگیری کن */
}
.card h3 {
    font-size: 13px;  /* ← از 14px */
    margin: 0 0 4px 0;
    color: #2e7d32;
    line-height: 1.3;
    font-weight: bold;
    display: block;  /* ← مهم: block باشه */
    visibility: visible;  /* ← مهم */
    height: auto;  /* ← مهم: ارتفاع خودکار */
    overflow: visible;  /* ← مهم */
}
.card h3 a {
    color: #2e7d32;
    text-decoration: none;
    display: block;  /* ← مهم */
}
.card h3 a:hover { text-decoration: underline; }
.card .meta {
    font-size: 11px;  /* ← از 12px */
    color: #666;
    margin-bottom: 2px;
    line-height: 1.4;
}
.card .desc {
    color: #555;
    overflow: hidden;
	font-size: 11px;  /* ← از 12px */
    margin: 4px 0;
    height: 32px;     /* ← از 38px */
    line-height: 1.5;
}
.card .footer {
    display: flex;
    justify-content: space-between;
    
    color: #999;
   
   
    border-top: 1px solid #f0f0f0;
	font-size: 10px;  /* ← از 11px */
    padding-top: 4px;
    margin-top: auto;
    gap: 4px;
}
.card .badge-featured {
    background: #43a047;
    color: #fff;
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 10px;
    display: inline-block;
    margin-bottom: 5px;
}

/* ═══ Rating Bar ═══ */
.rating-bar-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0;
    font-size: 12px;
}
.rating-bar {
    flex: 1;
    height: 8px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}
/* ═══ نوار امتیاز (رنگ ثابت سبز) ═══ */
.rating-bar-fill {
    height: 100%;
    border-radius: 4px;
    background: #43a047;  /* ← یک رنگ سبز ثابت */
    transition: width .3s;
}
.rating-bar-num {
    font-weight: bold;
    color: #2e7d32;
    min-width: 45px;
    text-align: left;
    direction: ltr;
}
.rating-count {
    color: #999;
    font-size: 11px;
}
.rating-no-data {
    font-size: 11px;
    color: #bbb;
    margin: 4px 0;
}

/* ═══ Card Routes (مسیریابی) ═══ */
.card-routes {
    display: flex;
    gap: 5px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
}
.route-mini {
    flex: 1;
    text-align: center;
    padding: 4px 2px;
    border-radius: 3px;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    text-decoration: none;
}
.route-mini:hover { opacity: .9; text-decoration: none; color: #fff; }
.route-mini.google { background: #4285f4; }
.route-mini.balad { background: #00a651; }
.route-mini.neshan { background: #6a1b9a; }

/* ═══ Empty Message ═══ */
.empty-msg {
    text-align: center;
    padding: 40px;
    color: #999;
    background: #fff;
    border-radius: 6px;
    font-size: 13px;
}

/* ═══ Footer ═══ */
.footer {
    text-align: center;
    padding: 25px;
    color: #999;
    font-size: 12px;
    margin-top: 40px;
    background: #fff;
    border-top: 3px solid #43a047;
}

/* ═══ Responsive ═══ */
@media (max-width: 900px) {
	
    .main-wrapper { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .sidebar-ad { display: inline-block; width: calc(50% - 8px); margin: 4px; }
}
@media (max-width: 600px) {
    .header { flex-direction: column; align-items: flex-start; }
    .header .nav { width: 100%; }
    .header .nav a { flex: 1; text-align: center; }
    .search-tabs { flex-direction: column; }
    .cards { grid-template-columns: 1fr; }
    .sidebar-ad { display: block; width: auto; margin: 0 0 15px 0; }
}

.card .badge-daily {
    background: #fb8c00;
    color: #fff;
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 10px;
    display: inline-block;
    margin-bottom: 5px;
}
/* ═══ نوار تخفیف‌ها ═══ */
.discount-strip {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #ffb74d;
    box-shadow: 0 2px 8px rgba(229,57,53,.08);
}
.discount-strip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    color: #bf360c;
    font-size: 14px;
}
.discount-strip-header b { font-size: 15px; margin-right: 6px; }
.discount-strip-more {
    color: #bf360c;
    font-size: 12px;
    font-weight: bold;
}
.discount-strip-more:hover { text-decoration: underline; }

.discount-strip-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}
.discount-strip-item {
    background: #fff;
    border-radius: 6px;
    padding: 12px;
    text-decoration: none;
    color: #333;
    transition: transform .2s, box-shadow .2s;
    display: block;
    border-right: 3px solid #e53935;
}
.discount-strip-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
    text-decoration: none;
    color: #333;
}
.discount-strip-item .icon {
    font-size: 18px;
    margin-bottom: 5px;
}
.discount-strip-item .biz {
    font-size: 12px;
    font-weight: bold;
    color: #e53935;
    margin-bottom: 4px;
}
.discount-strip-item .desc {
    font-size: 11px;
    color: #555;
    line-height: 1.5;
    margin-bottom: 6px;
    height: 32px;
    overflow: hidden;
}
.discount-strip-item .expire {
    font-size: 10px;
    color: #bf360c;
    font-weight: bold;
}

/* ═══ نشان «تخفیف دارد» روی کارت ═══ */
.card .badge-discount {
    background: linear-gradient(135deg, #e53935, #ff6f00);
    color: #fff;
    font-size: 10px;
    padding: 4px 10px;
    border-radius: 10px;
    display: inline-block;
    margin-bottom: 6px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(229,57,53,.3);
}

/* ═══ لینک هدر ═══ */
.header .nav a.discount-link {
    background: #e53935;
    color: #fff;
    font-weight: bold;
}
.header .nav a.discount-link:hover { background: #c62828; }

/* ═══ Footer Links ═══ */
.footer {
    text-align: center;
    padding: 25px;
    color: #777;
    font-size: 12px;
    margin-top: 40px;
    background: #fff;
    border-top: 3px solid #43a047;
}
.footer-links {
    margin-bottom: 12px;
    font-size: 13px;
}
.footer-links a {
    color: #2e7d32;
    text-decoration: none;
    margin: 0 8px;
    font-weight: bold;
}
.footer-links a:hover {
    color: #43a047;
    text-decoration: underline;
}
.footer-links span {
    color: #ccc;
}

/* ═══════════════════════════════════════════
   Toast Messages
   ═══════════════════════════════════════════ */
.toast-container {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 380px;
}

.toast {
    background: #fff;
    border-radius: 8px;
    padding: 14px 18px;
    box-shadow: 0 6px 20px rgba(0,0,0,.15);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    animation: toastSlideIn .3s ease;
    border-right: 5px solid #43a047;
    direction: rtl;
    min-width: 300px;
}
.toast.hiding {
    animation: toastSlideOut .3s ease forwards;
}
.toast .toast-icon {
    font-size: 22px;
    flex-shrink: 0;
}
.toast .toast-content {
    flex: 1;
    line-height: 1.7;
}
.toast .toast-title {
    font-weight: bold;
    margin-bottom: 2px;
}
.toast .toast-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    padding: 0 5px;
    flex-shrink: 0;
}
.toast .toast-close:hover {
    color: #333;
}

.toast-success { border-right-color: #43a047; }
.toast-success .toast-icon { color: #43a047; }

.toast-error { border-right-color: #e53935; }
.toast-error .toast-icon { color: #e53935; }

.toast-warning { border-right-color: #fb8c00; }
.toast-warning .toast-icon { color: #fb8c00; }

.toast-info { border-right-color: #1e88e5; }
.toast-info .toast-icon { color: #1e88e5; }

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes toastSlideOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(-50px); }
}

/* ═══════════════════════════════════════════
   Loading Spinner
   ═══════════════════════════════════════════ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,.85);
    z-index: 99998;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 15px;
    backdrop-filter: blur(2px);
}
.loading-overlay.active {
    display: flex;
}
.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e8f5e9;
    border-top-color: #43a047;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
.loading-overlay .loading-text {
    color: #2e7d32;
    font-weight: bold;
    font-size: 14px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════
   Button Loading State
   ═══════════════════════════════════════════ */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}
.btn-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* ═══════════════════════════════════════════
   Inline Loading (برای بخش‌ها)
   ═══════════════════════════════════════════ */
.inline-loader {
    display: none;
    text-align: center;
    padding: 30px;
}
.inline-loader.active {
    display: block;
}
.inline-loader .spinner {
    margin: 0 auto 10px;
    width: 40px;
    height: 40px;
}
.inline-loader .text {
    color: #2e7d32;
    font-size: 13px;
    font-weight: bold;
}

/* ═══ کارت با گالری ═══ */
.card-media {
    position: relative;
    width: 100%;
    height: 160px;
    overflow: hidden;
    background: #f0f0f0;
    flex-shrink: 0;
}
.card-media-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    width: 100%;
    height: 100%;        /* ← به جای 160px، از ارتفاع والد پر کن */
}
.card-media-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.gallery-more-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0,0,0,.7);
    color: #fff;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 12px;
}

.card-media-video {
    position: relative;
    cursor: pointer;
    height: 160px;
    overflow: hidden;
    background: #000;
}
.video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 55px;
    height: 55px;
    background: rgba(229,57,53,.9);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    padding-right: 3px;
    box-shadow: 0 3px 12px rgba(0,0,0,.3);
}

/* ═══════════════════════════════════════════
   Home Businesses - کارت‌های افقی
   ═══════════════════════════════════════════ */
.homebiz-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    overflow: hidden;
    margin-bottom: 15px;
    display: grid;
    grid-template-columns: 220px 1fr;
    transition: transform .2s, box-shadow .2s;
    border-right: 5px solid #ffb300;
}
.homebiz-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,.1);
}
.homebiz-card .image {
    position: relative;
    width: 220px;
    height: 100%;
    min-height: 200px;
    background: #f5f5f5;
    overflow: hidden;
}
.homebiz-card .image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.homebiz-card .image .placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 60px;
    color: #ddd;
}
.homebiz-card .content {
    padding: 18px 22px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.homebiz-card .badge-home {
    display: inline-block;
    background: linear-gradient(135deg, #ffb300, #ff8f00);
    color: #fff;
    font-size: 11px;
    padding: 4px 12px;
    border-radius: 14px;
    font-weight: bold;
    margin-bottom: 8px;
    align-self: flex-start;
}
.homebiz-card h3 {
    font-size: 17px;
    color: #e65100;
    margin: 0 0 8px 0;
    font-weight: bold;
    line-height: 1.4;
}
.homebiz-card .meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
}
.homebiz-card .meta-row span {
    display: flex;
    align-items: center;
    gap: 4px;
}
.homebiz-card .description {
    font-size: 13px;
    color: #444;
    line-height: 1.9;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.homebiz-card .contact-box {
    background: #fff8e1;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    color: #5d4037;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    border-right: 3px solid #ffb300;
}
.homebiz-card .contact-box .icon {
    font-size: 18px;
}
.homebiz-card .contact-box .label {
    font-weight: bold;
    color: #e65100;
    min-width: 80px;
}
.homebiz-card .expiry {
    font-size: 11px;
    color: #999;
    margin-top: 8px;
}

/* ═══ ریسپانسیو ═══ */
@media (max-width: 700px) {
    .homebiz-card {
        grid-template-columns: 1fr;
    }
    .homebiz-card .image {
        width: 100%;
        height: 180px;
        min-height: 180px;
    }
}

/* ═══ دکمه ثبت جدید ═══ */
.homebiz-add-btn {
    display: block;
    background: linear-gradient(135deg, #ffb300, #ff8f00);
    color: #fff;
    padding: 18px 25px;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(255,179,0,.3);
    transition: transform .2s, box-shadow .2s;
}
.homebiz-add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,179,0,.4);
    color: #fff;
    text-decoration: none;
}
.homebiz-add-btn .subtitle {
    font-size: 12px;
    font-weight: normal;
    opacity: .9;
    margin-top: 4px;
}

/* ═══ باکس جستجو ═══ */
.homebiz-search {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    border-top: 4px solid #ffb300;
}
.homebiz-search h3 {
    font-size: 15px;
    color: #e65100;
    margin: 0 0 15px 0;
}
.homebiz-search .search-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.homebiz-search .search-row > * {
    flex: 1;
    min-width: 150px;
}

/* ═══ هدر صفحه ═══ */
.homebiz-header {
    background: linear-gradient(135deg, #ffb300, #ff8f00);
    color: #fff;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(255,179,0,.25);
}
.homebiz-header h1 {
    font-size: 24px;
    margin-bottom: 8px;
}
.homebiz-header p {
    font-size: 13px;
    opacity: .95;
}

/* ═══ لینک کسب‌وکارهای خانگی در هدر ═══ */
.header .nav a.homebiz-link {
    background: linear-gradient(135deg, #ffb300, #ff8f00);
    color: #fff;
    font-weight: bold;
}
.header .nav a.homebiz-link:hover {
    background: linear-gradient(135deg, #ffa000, #ef6c00);
}




/* ═══════════════════════════════════════════
   PWA & Mobile Optimizations
   ═══════════════════════════════════════════ */

/* حذف Tap Highlight */
* {
    -webkit-tap-highlight-color: transparent;
}

/* جلوگیری از زوم روی input */
input, select, textarea {
    font-size: 16px !important; /* جلوگیری از زوم iOS */
}

/* Safe Area (برای iPhone X+) */
body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}

/* ═══ در حالت Standalone (نصب‌شده) ═══ */
@media all and (display-mode: standalone) {
    /* مخفی کردن عناصری که در اپ معنی ندارن */
    .pwa-hide {
        display: none !important;
    }
}

/* ═══ بهینه‌سازی موبایل ═══ */
@media (max-width: 600px) {
    .container {
        padding: 0 10px;
    }

    .header {
        padding: 10px 15px;
    }

    .header .logo {
        font-size: 16px;
    }

    .header .nav {
        gap: 5px;
    }

    .header .nav a {
        padding: 6px 10px;
        font-size: 12px;
    }

    /* کارت‌ها در موبایل کوچک‌تر */
    .cards {
        grid-template-columns: 1fr;
    }

    /* دکمه‌ها بزرگ‌تر برای لمس */
    .btn {
        padding: 12px 24px;
        font-size: 14px;
    }
}

/* ═══════════════════════════════════════════
   Weather Section
   ═══════════════════════════════════════════ */
.weather-section {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(30,136,229,.15);
    border-right: 1px solid #1e88e5;
}

.weather-section .section-title {
    color: #1565c0;
    border-right-color: #1e88e5;
    margin-bottom: 15px;
}

.weather-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.weather-card {
    background: #fff;
    border-radius: 10px;
    padding: 15px 10px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
    transition: transform .2s, box-shadow .2s;
}
.weather-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(30,136,229,.2);
}

.weather-card .weather-day {
    font-size: 13px;
    font-weight: bold;
    color: #1565c0;
    margin-bottom: 2px;
}

.weather-card .weather-date {
    font-size: 11px;
    color: #999;
    margin-bottom: 8px;
}

.weather-card .weather-icon {
    font-size: 36px;
    margin: 8px 0;
    line-height: 1;
}

.weather-card .weather-temp {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 8px 0;
    direction: ltr;
}

.weather-card .weather-temp .max {
    font-size: 18px;
    font-weight: bold;
    color: #e53935;
}

.weather-card .weather-temp .min {
    font-size: 14px;
    color: #1e88e5;
}

.weather-card .weather-title {
    font-size: 11px;
    color: #666;
    margin-top: 6px;
    line-height: 1.5;
}

/* موبایل */
@media (max-width: 600px) {
    .weather-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 8px;
    }
    .weather-card {
        padding: 12px 8px;
    }
    .weather-card .weather-icon {
        font-size: 28px;
    }
    .weather-card .weather-temp .max {
        font-size: 16px;
    }
    .weather-card .weather-temp .min {
        font-size: 12px;
    }
    .weather-card .weather-day {
        font-size: 12px;
    }
    .weather-card .weather-title {
        font-size: 10px;
    }
}

/* ═══════════════════════════════════════════
   Price Section (طلا، سکه، دلار)
   ═══════════════════════════════════════════ */
.price-section {
    background: linear-gradient(135deg, #fff8e1, #ffecb3);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(255,179,0,.2);
    border-right: 1px solid #ffb300;
}

.price-section .section-title {
    color: #e65100;
    border-right-color: #ffb300;
    margin-bottom: 15px;
}

.price-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.price-card {
    background: #fff;
    border-radius: 10px;
    padding: 15px 12px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
    transition: transform .2s, box-shadow .2s;
    border-top: 3px solid #ffb300;
}
.price-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255,179,0,.3);
}

.price-card .price-flag {
    font-size: 24px;
    margin-bottom: 6px;
}

.price-card .price-title {
    font-size: 12px;
    color: #666;
    font-weight: bold;
    margin-bottom: 8px;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.price-card .price-value {
    font-size: 16px;
    font-weight: bold;
    color: #e65100;
    direction: rtl;
    margin-bottom: 4px;
}

.price-card .price-unit {
    font-size: 10px;
    color: #999;
}

/* موبایل */
@media (max-width: 600px) {
    .price-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .price-card {
        padding: 12px 8px;
    }
    .price-card .price-flag {
        font-size: 20px;
    }
    .price-card .price-title {
        font-size: 11px;
    }
    .price-card .price-value {
        font-size: 14px;
    }
}
.price-card .price-change {
    font-size: 11px;
    margin-top: 4px;
    font-weight: bold;
}
.price-card .price-change.up { color: #43a047; }
.price-card .price-change.down { color: #e53935; }
.price-card .price-change.flat { color: #999; }

/* ═══════════════════════════════════════════
   Distance Badge
   ═══════════════════════════════════════════ */
.distance-badge {
    display: inline-block !important;
    padding: 3px 10px !important;
    border-radius: 12px !important;
    font-size: 11px !important;
    font-weight: bold !important;
    margin: 4px 0 !important;
    width: auto !important;
}

.distance-badge.near {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.distance-badge.mid {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffb74d;
}

.distance-badge.far {
    background: #eceff1;
    color: #546e7a;
    border: 1px solid #b0bec5;
}

.distance-badge.very-far {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

/* ═══════════════════════════════════════════
   Latest Businesses (Compact Cards)
   ═══════════════════════════════════════════ */
.latest-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.latest-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
    text-decoration: none;
    color: #333;
    transition: transform .2s, box-shadow .2s;
    border: 2px solid transparent;
    display: block;
}
.latest-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(67,160,71,.2);
    border-color: #43a047;
    text-decoration: none;
    color: #333;
}

.latest-img {
    width: 100%;
    height: 110px;
    background: #f0f0f0;
    overflow: hidden;
}
.latest-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;  /* ← تغییر */
    background: #f9f9f9;
    padding: 3px;
}

.latest-body {
    padding: 10px 12px;
}
.latest-body h4 {
    font-size: 13px;
    color: #2e7d32;
    font-weight: bold;
    margin: 0 0 6px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.latest-body .meta {
    font-size: 11px;
    color: #666;
    line-height: 1.6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* موبایل */
@media (max-width: 600px) {
    .latest-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .latest-img {
        height: 90px;
    }
    .latest-body h4 {
        font-size: 12px;
    }
}

