/* ============================================================
   showcase.css - ویترین عمومی (نسخه 7.0 نهایی)
   با تب‌های وسط‌چین + تم روشن/تیره کامل + گالری اصلاح‌شده
   ============================================================ */

/* ============================================================
   Dark Theme (پیش‌فرض)
   ============================================================ */
:root,
html[data-theme="dark"] {
    --primary: #6c5ce7;
    --primary-light: #a29bfe;
    --primary-dark: #5541d6;
    --green: #00b894;
    --orange: #fdcb6e;
    --red: #ff6b6b;
    
    --bg: #0f1420;
    --bg2: #1a2130;
    --bg3: #232b3d;
    --card: #1a2130;
    --card-hover: #232b3d;
    --border: rgba(255,255,255,0.08);
    --border-strong: rgba(255,255,255,0.15);
    
    --text: #f0f4ff;
    --text-secondary: #b8c1d9;
    --muted: #7a85a3;
    
    --radius: 14px;
    --radius-sm: 10px;
    --radius-lg: 20px;
    
    --shadow: 0 4px 20px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.5);
}

/* ============================================================
   Light Theme
   ============================================================ */
html[data-theme="light"] {
    --primary: #6c5ce7;
    --primary-light: #7c5ce7;
    --primary-dark: #5541d6;
    --green: #00b894;
    --orange: #e6a93e;
    --red: #ff4757;
    
    --bg: #f0f2f7;
    --bg2: #ffffff;
    --bg3: #e8ecf3;
    --card: #ffffff;
    --card-hover: #f8fafc;
    --border: rgba(0,0,0,0.10);
    --border-strong: rgba(0,0,0,0.18);
    
    --text: #1a2332;
    --text-secondary: #475569;
    --muted: #64748b;
    
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
}

/* ============================================================
   Reset & Base
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    font-family: 'Vazirmatn', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body {
    min-height: 100vh;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.protected * {
    -webkit-user-select: none;
    user-select: none;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
}

img {
    -webkit-user-drag: none;
    user-select: none;
}

/* ============================================================
   Watermark
   ============================================================ */
.watermark-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
    overflow: hidden;
    opacity: 0.035;
}

.watermark-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    color: var(--primary-light);
    font-size: 24px;
    font-weight: 800;
    white-space: nowrap;
    letter-spacing: 6px;
    pointer-events: none;
    user-select: none;
}

html[data-theme="light"] .watermark-overlay {
    opacity: 0.06;
}

html[data-theme="light"] .watermark-text {
    color: var(--primary);
}

/* ============================================================
   Header
   ============================================================ */
.showcase-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 20, 32, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: background-color 0.3s ease;
}

html[data-theme="light"] .showcase-header {
    background: rgba(255, 255, 255, 0.95);
}

.header-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 15px;
    color: var(--text);
    flex: 1;
    min-width: 0;
}

.header-brand img {
    height: 36px;
    border-radius: 8px;
    flex-shrink: 0;
}

.brand-icon {
    font-size: 24px;
}

.brand-name {
    background: linear-gradient(135deg, var(--primary-light), var(--green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.back-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 20px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.back-btn:hover {
    background: var(--card-hover);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateX(-2px);
}

.theme-toggle-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s ease;
    padding: 0;
    flex-shrink: 0;
}

.theme-toggle-btn:hover {
    transform: scale(1.1);
    border-color: var(--primary);
}

.theme-toggle-btn:active {
    transform: scale(0.95);
}

/* ============================================================
   Hero
   ============================================================ */
.hero-section {
    background: linear-gradient(135deg, #6c5ce7, #5541d6);
    padding: 40px 16px 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255,255,255,0.08) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}

.hero-section h1 {
    font-size: 26px;
    font-weight: 800;
    color: white;
    margin-bottom: 8px;
}

.hero-section p {
    font-size: 14px;
    color: rgba(255,255,255,0.85);
}

/* ============================================================
   Container
   ============================================================ */
.container {
    max-width: 1100px;
    margin: -30px auto 0;
    padding: 0 16px 40px;
    position: relative;
    z-index: 2;
}

/* ============================================================
   Search Section
   ============================================================ */
.search-section {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-lg);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.search-form {
    margin-bottom: 14px;
}

.search-input-wrap {
    display: flex;
    align-items: center;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0 16px;
    height: 56px;
    transition: all 0.2s ease;
}

.search-input-wrap:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.15);
}

.search-icon {
    color: var(--muted);
    font-size: 20px;
    margin-left: 10px;
}

.search-input-wrap input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text);
    font-family: inherit;
    font-size: 15px;
    outline: none;
    padding: 14px 0;
    width: 100%;
}

.search-input-wrap input::placeholder {
    color: var(--muted);
}

.search-clear {
    color: var(--muted);
    font-size: 20px;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s ease;
}

.search-clear:hover {
    color: var(--red);
}

/* ============================================================
   Main Tabs (همه / خرید / رهن / اجاره) - وسط‌چین کامل
   ============================================================ */
.main-tabs-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 16px;
}

.main-tabs {
    display: inline-flex;
    gap: 6px;
    padding: 6px;
    background: var(--bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.main-tabs::-webkit-scrollbar {
    display: none;
}

.main-tab {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 20px;
    background: transparent;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
    cursor: pointer;
    min-width: 80px;
    border: none;
}

.main-tab:hover {
    background: var(--card);
    color: var(--text);
}

.main-tab.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

.main-tab .tab-icon {
    font-size: 18px;
    line-height: 1;
}

.main-tab .tab-text {
    font-size: 11px;
    line-height: 1;
    font-weight: 700;
}

/* ============================================================
   Chips (وسط‌چین و مرتب)
   ============================================================ */
.chips-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 12px;
}

.chips-row {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    padding: 4px 0;
    max-width: 100%;
}

.chip {
    padding: 8px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 12px;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    font-weight: 500;
    line-height: 1;
}

.chip:hover {
    border-color: var(--primary);
    color: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.15);
}

.chip.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.4);
    font-weight: 700;
}

/* ============================================================
   Filter Toggle
   ============================================================ */
.filter-toggle-btn {
    width: 100%;
    margin-top: 12px;
    padding: 12px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.filter-toggle-btn:hover {
    border-color: var(--primary);
    color: var(--primary-light);
    background: var(--card-hover);
}

.filter-toggle-btn .arrow {
    transition: transform 0.2s ease;
    font-size: 10px;
}

.filter-toggle-btn.open .arrow {
    transform: rotate(180deg);
}

/* ============================================================
   Advanced Filter
   ============================================================ */
.advanced-filter {
    margin-top: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}

@media (min-width: 640px) {
    .filter-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.filter-group label {
    display: block;
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 4px;
    font-weight: 500;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
    font-size: 13px;
    outline: none;
    transition: all 0.2s ease;
}

.filter-group input:focus,
.filter-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}

.filter-actions {
    display: flex;
    gap: 10px;
}

.filter-actions .btn-primary {
    flex: 1;
    padding: 12px;
    font-size: 14px;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s ease;
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(108, 92, 231, 0.3);
}

.btn-outline {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
    font-size: 13px;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s ease;
    display: inline-block;
    cursor: pointer;
}

.btn-outline:hover {
    background: var(--card-hover);
    border-color: var(--primary);
    color: var(--primary-light);
}

/* ============================================================
   Results Header
   ============================================================ */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 10px;
}

.results-count {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.results-count strong {
    color: var(--primary-light);
}

.results-sort select {
    padding: 8px 14px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s ease;
}

.results-sort select:focus {
    border-color: var(--primary);
}

/* ============================================================
   Properties Grid
   ============================================================ */
.properties-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 640px) {
    .properties-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .properties-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================================
   Showcase Card
   ============================================================ */
.showcase-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: all 0.3s ease;
    position: relative;
}

.showcase-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.card-media {
    position: relative;
    width: 100%;
    height: 200px;
    background: var(--bg3);
    overflow: hidden;
}

.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    pointer-events: none;
    -webkit-user-drag: none;
}

.showcase-card:hover .card-media img {
    transform: scale(1.05);
}

.media-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    color: var(--muted);
    opacity: 0.4;
}

.media-count {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    backdrop-filter: blur(10px);
    font-weight: 600;
}

.card-type-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    color: white;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.card-type-badge.sale {
    background: linear-gradient(135deg, var(--green), #00a383);
}

.card-type-badge.rent {
    background: linear-gradient(135deg, var(--orange), #e6a93e);
    color: #333;
}

.card-body {
    padding: 14px;
}

.card-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text);
}

.card-location {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 10px;
}

.card-meta {
    display: flex;
    gap: 10px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.card-price {
    padding: 10px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 10px;
}

.price-main {
    font-size: 15px;
    font-weight: 800;
    color: var(--green);
}

.price-sub {
    font-size: 11px;
    color: var(--muted);
    margin-top: 3px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--muted);
}

.card-code {
    direction: ltr;
    font-family: monospace;
}

.card-view {
    color: var(--primary-light);
    font-weight: 700;
}

/* ============================================================
   Empty State
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.empty-icon {
    font-size: 60px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 6px;
    color: var(--text);
}

.empty-state p {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 16px;
}

/* ============================================================
   Pagination
   ============================================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.page-link {
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 600;
}

.page-link:hover {
    border-color: var(--primary);
    background: var(--card-hover);
    color: var(--primary-light);
}

.page-link.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border-color: var(--primary);
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

.page-dots {
    padding: 0 6px;
    color: var(--muted);
    align-self: center;
}

/* ============================================================
   Gallery (اصلاح‌شده)
   ============================================================ */
.gallery-container {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 16px;
}

.gallery-main {
    position: relative;
    background: var(--bg);
    border-radius: var(--radius-sm);
    overflow: hidden;
    height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: pan-y;
    cursor: grab;
    user-select: none;
}

.gallery-main:active {
    cursor: grabbing;
}

.gallery-main #galleryDisplay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.gallery-main #galleryDisplay img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: 8px;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.gallery-main #galleryDisplay video {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    background: #000;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
    font-family: inherit;
}

.gallery-nav:hover {
    background: rgba(0, 0, 0, 0.85);
    transform: translateY(-50%) scale(1.1);
}

.gallery-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.gallery-nav.prev {
    left: 12px;
}

.gallery-nav.next {
    right: 12px;
}

.gallery-counter {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    pointer-events: none;
    backdrop-filter: blur(10px);
    z-index: 5;
    font-weight: 600;
}

.gallery-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    overflow-x: auto;
    scrollbar-width: thin;
    padding: 4px 2px;
    scroll-behavior: smooth;
}

.gallery-thumbs::-webkit-scrollbar {
    height: 5px;
}

.gallery-thumbs::-webkit-scrollbar-track {
    background: transparent;
}

.gallery-thumbs::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.gallery-thumbs img,
.gallery-thumbs .video-thumb {
    width: 68px;
    height: 68px;
    object-fit: cover;
    border-radius: 8px;
    border: 3px solid transparent;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
    pointer-events: auto;
    opacity: 0.6;
}

.gallery-thumbs img:hover,
.gallery-thumbs .video-thumb:hover {
    opacity: 1;
    transform: scale(1.05);
}

.gallery-thumbs img.active,
.gallery-thumbs .video-thumb.active {
    border-color: var(--primary);
    opacity: 1;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.4);
}

.video-thumb {
    background: var(--bg3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: white;
}

/* ============================================================
   Detail Cards
   ============================================================ */
.detail-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
    transition: background-color 0.3s ease;
}

.detail-header {
    margin-bottom: 16px;
}

.detail-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--text);
}

.detail-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.badge-type,
.badge-code {
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.badge-type.sale {
    background: rgba(0, 184, 148, 0.15);
    color: var(--green);
}

.badge-type.rent {
    background: rgba(253, 203, 110, 0.15);
    color: var(--orange);
}

.badge-code {
    background: var(--bg);
    color: var(--muted);
    direction: ltr;
    font-family: monospace;
}

/* ============================================================
   Price Box
   ============================================================ */
.detail-price-box {
    background: linear-gradient(135deg, rgba(0, 184, 148, 0.1), rgba(0, 184, 148, 0.03));
    border: 1px solid rgba(0, 184, 148, 0.2);
    border-radius: var(--radius);
    padding: 16px;
}

.price-label {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 4px;
    font-weight: 500;
}

.price-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--green);
}

.price-per-meter {
    font-size: 12px;
    color: var(--muted);
    margin-top: 8px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.price-row > div {
    flex: 1;
    min-width: 120px;
}

/* ============================================================
   Specs
   ============================================================ */
.section-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.spec-item {
    padding: 14px 12px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    text-align: center;
    transition: background-color 0.3s ease;
}

.spec-icon {
    font-size: 22px;
    display: block;
    margin-bottom: 6px;
}

.spec-label {
    font-size: 11px;
    color: var(--muted);
    display: block;
}

.spec-value {
    font-size: 14px;
    font-weight: 700;
    margin-top: 4px;
    display: block;
    color: var(--text);
}

/* ============================================================
   Amenities
   ============================================================ */
.amenities-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.amenity-pill {
    padding: 6px 14px;
    background: rgba(0, 184, 148, 0.1);
    color: var(--green);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* ============================================================
   Location
   ============================================================ */
.location-info {
    margin-bottom: 12px;
}

.location-name {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text);
}

.location-address {
    font-size: 12px;
    color: var(--muted);
}

.map-box {
    height: 240px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border);
    margin-bottom: 12px;
}

/* ============================================================
   Description
   ============================================================ */
.description-text {
    font-size: 13px;
    line-height: 2;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* ============================================================
   Contact Card (فقط اینجا تماس/واتس‌اپ/ایتا)
   ============================================================ */
.contact-card {
    border: 2px solid var(--primary);
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.05), transparent);
}

.agent-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 14px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    transition: background-color 0.3s ease;
}

.agent-avatar {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: white;
    flex-shrink: 0;
}

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

.agent-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.agent-role {
    font-size: 11px;
    color: var(--muted);
    margin-top: 2px;
}

.contact-buttons {
    display: grid;
    gap: 10px;
}

.big-action-btn {
    padding: 14px 16px;
    border-radius: var(--radius);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 700;
    color: white;
    transition: all 0.2s ease;
}

.big-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.big-action-btn > span:first-child {
    font-size: 30px;
}

.big-action-btn strong {
    display: block;
    font-size: 14px;
}

.big-action-btn small {
    font-size: 11px;
    opacity: 0.9;
    display: block;
    margin-top: 2px;
}

.big-action-btn.phone {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
}

.big-action-btn.whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
}

.big-action-btn.eitaa {
    background: linear-gradient(135deg, #f97316, #ea580c);
}

/* ============================================================
   Similar
   ============================================================ */
.similar-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.similar-card {
    background: var(--bg);
    border-radius: var(--radius-sm);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.similar-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.similar-media {
    height: 110px;
    background: var(--bg3);
    overflow: hidden;
}

.similar-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.media-placeholder-small {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    opacity: 0.4;
}

.similar-body {
    padding: 10px;
}

.similar-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text);
}

.similar-loc {
    font-size: 10px;
    color: var(--muted);
    margin-bottom: 4px;
}

.similar-price {
    font-size: 12px;
    font-weight: 700;
    color: var(--green);
}

/* ============================================================
   Back Home
   ============================================================ */
.back-home {
    text-align: center;
    margin: 20px 0;
}

/* ============================================================
   Footer
   ============================================================ */
.showcase-footer {
    background: var(--bg2);
    border-top: 1px solid var(--border);
    padding: 30px 16px;
    margin-top: 40px;
    text-align: center;
    transition: background-color 0.3s ease;
}

.footer-content {
    max-width: 900px;
    margin: 0 auto;
}

.footer-brand {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text);
}

.footer-website {
    font-size: 12px;
    color: var(--primary-light);
    margin-bottom: 10px;
}

.footer-copy {
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 6px;
}

.footer-dev {
    font-size: 11px;
    color: var(--muted);
}

.footer-dev a {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s ease;
}

.footer-dev a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* ============================================================
   Light Theme Overrides
   ============================================================ */
html[data-theme="light"] body {
    background: #f0f2f7;
    color: #1a2332;
}

html[data-theme="light"] .showcase-header {
    background: rgba(255, 255, 255, 0.95);
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .search-section {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .search-input-wrap {
    background: #f8fafc;
    border-color: rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] .search-input-wrap input {
    color: #1a2332;
}

html[data-theme="light"] .search-input-wrap input::placeholder {
    color: #94a3b8;
}

html[data-theme="light"] .search-icon,
html[data-theme="light"] .search-clear {
    color: #64748b;
}

html[data-theme="light"] .main-tabs {
    background: #e8ecf3;
    border-color: rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .main-tab {
    color: #64748b;
}

html[data-theme="light"] .main-tab:hover {
    background: #ffffff;
    color: #1a2332;
}

html[data-theme="light"] .chip {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
    color: #475569;
}

html[data-theme="light"] .chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #f8fafc;
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.15);
}

html[data-theme="light"] .chip.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border-color: var(--primary);
}

html[data-theme="light"] .filter-toggle-btn {
    background: #f8fafc;
    color: #1a2332;
    border-color: rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] .filter-toggle-btn:hover {
    background: #ffffff;
    border-color: var(--primary);
    color: var(--primary);
}

html[data-theme="light"] .filter-group input,
html[data-theme="light"] .filter-group select {
    background: #ffffff;
    color: #1a2332;
    border-color: rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] .filter-group input::placeholder {
    color: #94a3b8;
}

html[data-theme="light"] .results-sort select {
    background: #ffffff;
    color: #1a2332;
    border-color: rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] .showcase-card {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .showcase-card:hover {
    border-color: var(--primary);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
}

html[data-theme="light"] .card-media {
    background: #e8ecf3;
}

html[data-theme="light"] .card-title {
    color: #1a2332;
}

html[data-theme="light"] .card-location {
    color: #64748b;
}

html[data-theme="light"] .card-meta {
    color: #475569;
}

html[data-theme="light"] .card-code {
    color: #64748b;
}

html[data-theme="light"] .card-footer {
    color: #64748b;
}

html[data-theme="light"] .detail-card {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .detail-title {
    color: #1a2332;
}

html[data-theme="light"] .section-title {
    color: #1a2332;
}

html[data-theme="light"] .gallery-container {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .gallery-main {
    background: #e8ecf3;
}

html[data-theme="light"] .gallery-thumbs img {
    border-color: transparent;
}

html[data-theme="light"] .gallery-thumbs img.active {
    border-color: var(--primary);
}

html[data-theme="light"] .video-thumb {
    background: #e8ecf3;
    color: #64748b;
}

html[data-theme="light"] .badge-code {
    background: #f1f5f9;
    color: #64748b;
}

html[data-theme="light"] .spec-item {
    background: #f8fafc;
}

html[data-theme="light"] .spec-label {
    color: #64748b;
}

html[data-theme="light"] .spec-value {
    color: #1a2332;
}

html[data-theme="light"] .similar-card {
    background: #f8fafc;
}

html[data-theme="light"] .similar-media {
    background: #e8ecf3;
}

html[data-theme="light"] .similar-title {
    color: #1a2332;
}

html[data-theme="light"] .similar-loc {
    color: #64748b;
}

html[data-theme="light"] .agent-info {
    background: #f8fafc;
}

html[data-theme="light"] .agent-name {
    color: #1a2332;
}

html[data-theme="light"] .agent-role {
    color: #64748b;
}

html[data-theme="light"] .location-name {
    color: #1a2332;
}

html[data-theme="light"] .location-address {
    color: #64748b;
}

html[data-theme="light"] .description-text {
    color: #475569;
}

html[data-theme="light"] .detail-price-box {
    background: linear-gradient(135deg, rgba(0, 184, 148, 0.08), rgba(0, 184, 148, 0.02));
    border-color: rgba(0, 184, 148, 0.3);
}

html[data-theme="light"] .page-link {
    background: #ffffff;
    color: #1a2332;
    border-color: rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] .page-link:hover {
    border-color: var(--primary);
    background: #f8fafc;
    color: var(--primary);
}

html[data-theme="light"] .page-link.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border-color: var(--primary);
}

html[data-theme="light"] .back-btn,
html[data-theme="light"] .theme-toggle-btn {
    background: #f8fafc;
    color: #1a2332;
    border-color: rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] .back-btn:hover,
html[data-theme="light"] .theme-toggle-btn:hover {
    background: #ffffff;
    border-color: var(--primary);
    color: var(--primary);
}

html[data-theme="light"] .showcase-footer {
    background: #ffffff;
    border-top-color: rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .footer-brand {
    color: #1a2332;
}

html[data-theme="light"] .footer-copy,
html[data-theme="light"] .footer-dev {
    color: #64748b;
}

html[data-theme="light"] .empty-state {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .empty-state h3 {
    color: #1a2332;
}

html[data-theme="light"] .empty-state p {
    color: #64748b;
}

html[data-theme="light"] .results-count {
    color: #475569;
}

html[data-theme="light"] .results-count strong {
    color: var(--primary);
}

html[data-theme="light"] .price-per-meter {
    color: #64748b;
}

html[data-theme="light"] .price-label {
    color: #64748b;
}

html[data-theme="light"] .card-view {
    color: var(--primary);
}

/* ============================================================
   Smooth Theme Transition
   ============================================================ */
body,
.showcase-header,
.showcase-card,
.detail-card,
.search-section,
.gallery-container,
.main-tabs,
.chip,
.filter-toggle-btn,
.filter-group input,
.filter-group select,
.results-sort select,
.page-link,
.back-btn,
.theme-toggle-btn,
.showcase-footer,
.spec-item,
.similar-card,
.agent-info,
.card-media,
.main-tab,
.badge-code {
    transition: background-color 0.3s ease,
                color 0.3s ease,
                border-color 0.3s ease,
                box-shadow 0.3s ease;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
    .gallery-main {
        height: 340px;
    }
    
    .hero-section h1 {
        font-size: 22px;
    }
    
    .detail-title {
        font-size: 18px;
    }
    
    .price-value {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px 40px;
    }
    
    .hero-section {
        padding: 30px 16px 50px;
    }
    
    .hero-section h1 {
        font-size: 20px;
    }
    
    .hero-section p {
        font-size: 12px;
    }
    
    .search-input-wrap {
        height: 50px;
        padding: 0 12px;
    }
    
    .search-input-wrap input {
        font-size: 14px;
    }
    
    .main-tab {
        min-width: 70px;
        padding: 8px 12px;
    }
    
    .main-tab .tab-icon {
        font-size: 16px;
    }
    
    .main-tab .tab-text {
        font-size: 10px;
    }
    
    .chip {
        padding: 7px 14px;
        font-size: 11px;
    }
    
    .gallery-main {
        height: 280px;
    }
    
    .gallery-nav {
        width: 36px;
        height: 36px;
        font-size: 22px;
    }
    
    .gallery-nav.prev {
        left: 6px;
    }
    
    .gallery-nav.next {
        right: 6px;
    }
    
    .gallery-thumbs img,
    .gallery-thumbs .video-thumb {
        width: 56px;
        height: 56px;
    }
    
    .detail-title {
        font-size: 17px;
    }
    
    .price-value {
        font-size: 18px;
    }
    
    .similar-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .specs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .page-link {
        min-width: 38px;
        height: 38px;
        padding: 0 10px;
        font-size: 12px;
    }
}

/* ============================================================
   Print Protection
   ============================================================ */
@media print {
    body * {
        display: none !important;
    }
    
    body::after {
        content: 'این صفحه قابل چاپ نیست';
        display: block;
        text-align: center;
        padding: 50px;
        font-size: 20px;
        color: #000;
        font-family: 'Vazirmatn', sans-serif;
    }
}

/* ============================================================
   Animations
   ============================================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.showcase-card,
.detail-card {
    animation: fadeIn 0.3s ease;
}

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

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ============================================================
   Focus States
   ============================================================ */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ============================================================
   Selection
   ============================================================ */
::selection {
    background: var(--primary);
    color: white;
}

::-moz-selection {
    background: var(--primary);
    color: white;
}