
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        :root {
            --background: #faf9f7;
            --foreground: #2d2a26;
            --card: #ffffff;
            --card-foreground: #2d2a26;
            --primary: #a0674b;
            --primary-foreground: #faf9f7;
            --secondary: #f0ede8;
            --secondary-foreground: #3a3530;
            --muted: #f5f3f0;
            --muted-foreground: #6b6560;
            --border: #e5e1db;
            --input: #f0ede8;
            --ring: #a0674b;
            --destructive: #dc2626;
            --radius: 0.5rem;
        }

        body {
            font-family: 'Inter', system-ui, -apple-system, sans-serif;
            background-color: var(--background);
            color: var(--foreground);
            line-height: 1.6;
        }

        .font-serif {
            font-family: 'Playfair Display', Georgia, serif;
        }

        .container {
            max-width: 1280px;
            margin: 0 auto;
            padding: 0 1rem;
        }

        /* Gallery */
        .gallery {
            position: relative;
            background-color: var(--muted);
        }

        .gallery-main {
    aspect-ratio: 21/9;
    width: 100%;
    overflow: hidden;
    position: relative;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, opacity 0.5s ease;
    cursor: zoom-in;
    user-select: none;
}

/* انیمیشن ورود */
.slide-in-left {
    transform: translateX(-100%);
    opacity: 0;
}
.slide-in-right {
    transform: translateX(100%);
    opacity: 0;
}
.slide-active {
    transform: translateX(0);
    opacity: 1;
}

/* Fullscreen view */
#fullscreenView {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}
#fullscreenView img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 12px;
    cursor: zoom-out;
    box-shadow: 0 0 40px rgba(255,255,255,0.3);
    transition: transform 0.3s ease;
}
#fullscreenView.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from { opacity: 0; } to { opacity: 1; }
}


        .gallery-btn {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            background-color: transparent;
            border: 1px solid var(--border);
            border-radius: var(--radius);
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s;
        }

        .gallery-btn:hover {
            background-color: var(--card);
        }

        .gallery-btn.prev {
            left: 1rem;
        }

        .gallery-btn.next {
            right: 1rem;
        }

        .gallery-dots {
            position: absolute;
            bottom: 1rem;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            gap: 0.5rem;
        }

        .gallery-dot {
            width: 8px;
            height: 8px;
            border-radius: 9999px;
            background-color: rgba(255, 255, 255, 0.6);
            cursor: pointer;
            transition: all 0.3s;
        }

        .gallery-dot.active {
            width: 32px;
            background-color: var(--primary);
        }

        .gallery-counter {
            position: absolute;
            top: 1rem;
            right: 1rem;
            background-color: rgba(255, 255, 255, 0.9);
            backdrop-filter: blur(8px);
            padding: 0.375rem 0.75rem;
            border-radius: 9999px;
            font-size: 1rem;
            font-weight: 500;
        }

        /* Main Content */
        .main-content {
            padding: 3rem 0;
        }

        .content-grid {
            display: grid;
            grid-template-columns: 1fr;
            gap: 3rem;
        }

        @media (min-width: 1024px) {
            .content-grid {
                grid-template-columns: 1fr;
            }
        }

        /* Property Details */
        .property-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 1rem;
            margin-bottom: 1rem;
        }

        .property-title {
            flex: 1;
        }

        .property-title h1 {
            font-size: 2.5rem;
            font-weight: 700;
            margin-bottom: 0.75rem;
            line-height: 1.2;
        }

        @media (min-width: 768px) {
            .property-title h1 {
                font-size: 3rem;
            }
        }

        .property-location {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            color: var(--muted-foreground);
            font-size: 0.875rem;
        }

        .action-buttons {
            display: flex;
            gap: 0.5rem;
        }

        .btn {
            padding: 0.5rem 1rem;
            border: 1px solid var(--border);
            border-radius: var(--radius);
            background-color: var(--card);
            cursor: pointer;
            transition: all 0.2s;
            font-size: 0.875rem;
            font-weight: 500;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
        }

        .btn:hover {
            background-color: var(--muted);
        }

        .btn-primary {
            background-color: var(--primary);
            color: var(--primary-foreground);
            border-color: var(--primary);
        }

        .btn-primary:hover {
            opacity: 0.9;
        }

        .btn-icon {
            width: 40px;
            height: 40px;
            padding: 0;
            left: -10px;
        }

        .btn-icon.saved {
            color: var(--destructive);
        }

        .btn-icon.saved svg {
            fill: currentColor;
        }

        /* Key Stats */
        .key-stats {
            display: flex;
            flex-wrap: wrap;
            gap: 1.5rem;
            padding: 1rem 0;
            border-top: 1px solid var(--border);
            border-bottom: 1px solid var(--border);
            margin: 1rem 0 2rem;
        }

        .stat-item {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .stat-item svg {
            color: var(--muted-foreground);
        }

        .stat-item span {
            font-size: 1.125rem;
            font-weight: 500;
        }

        /* Section */
        .section {
            margin-bottom: 2rem;
        }

        .section h2 {
            font-size: 1.5rem;
            font-weight: 700;
            margin-bottom: 1rem;
        }

        .description {
            color: var(--muted-foreground);
            font-size: 1.125rem;
            line-height: 1.75;
        }

        .description p {
            margin-bottom: 1rem;
        }

        /* Amenities */
        .amenities-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 1rem;
        }

        @media (min-width: 768px) {
            .amenities-grid {
                grid-template-columns: repeat(4, 1fr);
            }
        }

        .amenity-card {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 1rem;
            background-color: var(--card);
            border: 1px solid var(--border);
            border-radius: var(--radius);
            transition: border-color 0.2s;
        }

        .amenity-card:hover {
            border-color: var(--primary);
        }

        .amenity-card svg {
            color: var(--primary);
            flex-shrink: 0;
        }

        .amenity-card span {
            font-size: 0.875rem;
            font-weight: 500;
        }

        /* Map */
        .map-placeholder {
            aspect-ratio: 16/9;
            width: 100%;
            background: linear-gradient(135deg, rgba(160, 103, 75, 0.2), rgba(160, 103, 75, 0.1));
            border-radius: var(--radius);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            gap: 0.5rem;
        }

        .map-placeholder svg {
            color: var(--primary);
        }

        .map-placeholder p {
            font-size: 0.875rem;
            color: var(--muted-foreground);
        }

        /* Sidebar */
        .sidebar {
            position: sticky;
            top: 2rem;
        }

        .price-card, .agent-card {
            background-color: var(--card);
            border: 1px solid var(--border);
            border-radius: var(--radius);
            padding: 1.5rem;
            margin-bottom: 1.5rem;
        }

        .price {
            font-size: 2.25rem;
            font-weight: 700;
            margin-bottom: 0.5rem;
        }

        .price-note {
            font-size: 0.875rem;
            color: var(--muted-foreground);
            margin-bottom: 1.5rem;
        }

        .form-group {
            margin-bottom: 1rem;
        }

        .form-label {
            display: block;
            font-size: 0.75rem;
            font-weight: 500;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            margin-bottom: 0.5rem;
        }

        .form-input {
            width: 100%;
            padding: 0.5rem 0.75rem;
            border: 1px solid var(--border);
            border-radius: var(--radius);
            background-color: var(--background);
            font-size: 0.875rem;
            font-family: inherit;
        }

        .form-input:focus {
            outline: 2px solid var(--ring);
            outline-offset: 2px;
        }

        .form-row {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 1rem;
        }

        .btn-full {
            width: 100%;
            padding: 0.75rem 1rem;
        }

        .form-note {
            text-align: center;
            font-size: 0.75rem;
            color: var(--muted-foreground);
            margin-top: 1rem;
        }

        .property-info {
            padding-top: 1rem;
            border-top: 1px solid var(--border);
        }

        .info-row {
            display: flex;
            justify-content: space-between;
            font-size: 0.875rem;
            margin-bottom: 0.75rem;
        }

        .info-row span:first-child {
            color: var(--muted-foreground);
        }

        .info-row span:last-child {
            font-weight: 500;
        }

        /* Agent Card */
        .agent-card h3 {
            font-size: 1.125rem;
            font-weight: 700;
            margin-bottom: 1rem;
        }

        .agent-info {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            margin-bottom: 1rem;
        }

        .agent-avatar {
            width: 48px;
            height: 48px;
            border-radius: 9999px;
            background-color: rgba(160, 103, 75, 0.1);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.125rem;
            font-weight: 500;
            color: var(--primary);
        }

        .agent-details p:first-child {
            font-weight: 500;
        }

        .agent-details p:last-child {
            font-size: 0.875rem;
            color: var(--muted-foreground);
        }

        /* Contact Form */
        .contact-section {
            background-color: var(--secondary);
            padding: 5rem 0;
            margin-top: 5rem;
        }

        .contact-header {
            text-align: center;
            margin-bottom: 3rem;
        }

        .contact-header h2 {
            font-size: 2.5rem;
            font-weight: 700;
            margin-bottom: 1rem;
            line-height: 1.2;
        }

        @media (min-width: 768px) {
            .contact-header h2 {
                font-size: 3rem;
            }
        }

        .contact-header p {
            font-size: 1.125rem;
            color: var(--muted-foreground);
        }

        .contact-form {
            max-width: 768px;
            margin: 0 auto;
        }

        .contact-form .form-group {
            margin-bottom: 1.5rem;
        }

        .contact-form textarea {
            width: 100%;
            padding: 0.5rem 0.75rem;
            border: 1px solid var(--border);
            border-radius: var(--radius);
            background-color: var(--background);
            font-size: 0.875rem;
            font-family: inherit;
            resize: vertical;
        }

        .contact-form textarea:focus {
            outline: 2px solid var(--ring);
            outline-offset: 2px;
        }
        /* Icons */
        .icon {
            width: 20px;
            height: 20px;
              left: -9px; 
              top:1px;
        }
        .btn-icon {
  display: block; 
  position: relative; 
}

        .icon-lg {
            width: 48px;
            height: 48px;
        }
        
        /* حالت عمومی (موبایل) */
.sidebar {
  position: static; /* در موبایل چسبان نیست */
  margin-top: 2rem;
    order: 2; /* بیار بعد از محتوا */

}

/* تبلت و بالاتر (≥768px) مثل دسکتاپ رفتار کنه */
@media (min-width: 768px) {
  .content-grid {
    display: grid;
    grid-template-columns: 1fr 2fr; /* ستون چپ: قیمت و مشاور | ستون راست: محتوا */
    gap: 2.5rem;
    align-items: start;
  }

  .sidebar {
    grid-column: 1;
    position: sticky;
    top: 2rem;
    align-self: start;
  }

  .content-main {
    grid-column: 2;
  }
}




/* پاپ‌آپ */
.popup-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    justify-content: center; align-items: center;
    overflow-y: auto;
    padding: 20px;
}

.popup-content {
    background: #fff;
    border-radius: 10px;
    max-width: 800px;
    width: 100%;
    position: relative;
    padding: 20px;
    box-sizing: border-box;
}

/* موبایل تمام صفحه */
@media (max-width: 768px) {
    .popup-content {
        width: 100%;
        height: 100dvh;
        border-radius: 0;
        padding: 20px 10px;
    }
}

.popup-close {
    position: absolute;
    top: 10px; right: 10px;
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

.popup-inner {
    margin-top: 40px;
}
