/* * Custom CSS สำหรับเว็บบ้านดีดี
 * รองรับภาษาไทยด้วยฟอนต์ Sarabun
 * Version 2.0 - Enhanced with beautiful colors and animations
 */

/* ===== CSS Variables - Modern Color Palette ===== */
:root {
    /* Primary Colors - Vibrant Blue Gradient */
    --primary-color: #4a90e2;
    --primary-dark: #357abd;
    --primary-light: #6ba6eb;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    
    /* Secondary Colors */
    --secondary-color: #f39c12;
    --secondary-dark: #e67e22;
    
    /* Success, Warning, Danger */
    --success-color: #27ae60;
    --success-light: #2ecc71;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --danger-dark: #c0392b;
    
    /* Neutral Colors */
    --dark-color: #2c3e50;
    --dark-light: #34495e;
    --gray-color: #7f8c8d;
    --gray-light: #95a5a6;
    --light-gray: #ecf0f1;
    --lighter-gray: #f8f9fa;
    
    /* Background */
    --bg-color: #f5f7fa;
    --card-bg: #ffffff;
    
    /* Shadows */
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.15);
    --shadow-xl: 0 15px 50px rgba(0,0,0,0.2);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ===== Global Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Sarabun', sans-serif;
    background-color: var(--bg-color);
    color: var(--dark-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--dark-color);
    letter-spacing: -0.5px;
}

h1 {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out;
}

.animate-fadeIn {
    animation: fadeIn 0.6s ease-out;
}

.animate-slideInLeft {
    animation: slideInLeft 0.6s ease-out;
}

.animate-slideInRight {
    animation: slideInRight 0.6s ease-out;
}

/* ===== Navbar - Enhanced ===== */
.navbar {
    padding: 1rem 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    transition: all var(--transition-normal);
}

.navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all var(--transition-normal);
}

.navbar-brand:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.nav-link {
    font-weight: 500;
    color: var(--dark-color) !important;
    padding: 0.5rem 1rem !important;
    transition: all var(--transition-normal);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--primary-gradient);
    transition: all var(--transition-normal);
    transform: translateX(-50%);
    border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color) !important;
}

/* ===== Hero Section - Enhanced ===== */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    color: white;
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/pattern.png') repeat;
    opacity: 0.1;
    animation: pulse 3s ease-in-out infinite;
}

/* Animated Background Shapes */
.hero-section::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
    top: -200px;
    right: -200px;
    animation: pulse 4s ease-in-out infinite;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    font-size: 2.8rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease-out;
    text-shadow: 0 4px 10px rgba(0,0,0,0.2);
    -webkit-text-fill-color: white;
}

.hero-section p {
    font-size: 1.3rem;
    opacity: 0.95;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
    text-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* ===== Search Box - Enhanced ===== */
.search-box {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: 0 15px 50px rgba(0,0,0,0.15);
    margin-top: 2rem;
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
    transition: all var(--transition-normal);
}

.search-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.search-box .form-control,
.search-box .form-select {
    padding: 0.9rem 1.2rem;
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: all var(--transition-normal);
    background-color: var(--lighter-gray);
}

.search-box .form-control:focus,
.search-box .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.3rem rgba(74, 144, 226, 0.15);
    background-color: white;
    transform: translateY(-2px);
}

/* --- ADJUSTMENT: Search Button Emphasis --- */
.search-box .btn-primary {
    padding: 1rem 1.8rem; /* ทำให้ปุ่มใหญ่ขึ้น */
    font-size: 1.1rem;    /* เพิ่มขนาดตัวอักษร */
    border-radius: var(--radius-sm);
    transform: scale(1.02); /* ทำให้ปุ่มดูมีมิติเล็กน้อย */
}
/* --- END ADJUSTMENT --- */

.search-keywords {
    margin-top: 1.5rem;
}

.search-keywords a {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background: linear-gradient(135deg, var(--light-gray) 0%, var(--lighter-gray) 100%);
    color: var(--primary-color);
    border-radius: var(--radius-xl);
    text-decoration: none;
    margin: 0.4rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition-normal);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.search-keywords a:hover {
    background: var(--primary-gradient);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.3);
}

/* ===== Buttons - Enhanced ===== */
.btn {
    padding: 0.7rem 1.8rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: all var(--transition-normal);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.4);
    filter: brightness(1.1);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(74, 144, 226, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, var(--success-light) 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, var(--danger-dark) 100%);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, var(--secondary-dark) 100%);
    color: white;
}

/* ===== Property Cards - Enhanced ===== */
.property-card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid transparent;
}

.property-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.property-card-img {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--light-gray) 0%, var(--lighter-gray) 100%);
}

.property-card-img::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.3));
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.property-card:hover .property-card-img::after {
    opacity: 1;
}

.property-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.property-card:hover .property-card-img img {
    transform: scale(1.15) rotate(2deg);
}

.property-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.95) 0%, rgba(53, 122, 189, 0.95) 100%);
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: var(--radius-xl);
    font-size: 0.85rem;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
    animation: slideInLeft 0.5s ease-out;
}

.property-badge.urgent {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.95) 0%, rgba(192, 57, 43, 0.95) 100%);
    animation: pulse 2s ease-in-out infinite;
}

.favorite-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    z-index: 2;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    animation: slideInRight 0.5s ease-out;
}

.favorite-btn i {
    font-size: 1.2rem;
    transition: all var(--transition-normal);
}

.favorite-btn:hover {
    background: var(--danger-color);
    color: white;
    transform: scale(1.15) rotate(10deg);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.favorite-btn.active {
    background: linear-gradient(135deg, var(--danger-color) 0%, var(--danger-dark) 100%);
    color: white;
}

.favorite-btn.active i {
    animation: pulse 0.5s ease;
}

.property-card-body {
    padding: 1.8rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.property-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.8rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--transition-normal);
    line-height: 1.4;
}

.property-card:hover .property-title {
    color: var(--primary-color);
}

.property-location {
    color: var(--gray-color);
    font-size: 0.95rem;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.property-location i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.property-features {
    display: flex;
    gap: 1.2rem;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
}

.property-feature {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--gray-color);
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
    background: var(--lighter-gray);
    border-radius: var(--radius-sm);
    transition: all var(--transition-normal);
}

.property-card:hover .property-feature {
    background: var(--light-gray);
}

.property-feature i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* --- ADJUSTMENT: Property Price to Success Color --- */
.property-price {
    font-size: 1.9rem; /* เพิ่มขนาดเล็กน้อย */
    font-weight: 800;
    /* เปลี่ยนจาก danger (แดง) เป็น success (เขียว) เพื่อสื่อถึง Good Deal */
    background: linear-gradient(135deg, var(--success-color) 0%, var(--success-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-top: auto;
    transition: all var(--transition-normal);
    letter-spacing: -0.5px; /* เพิ่มความกระชับ */
}

.property-card:hover .property-price {
    transform: scale(1.05);
}

.property-price-label {
    font-size: 1rem; /* เพิ่มขนาดให้อ่านง่ายขึ้น */
    color: var(--gray-color);
    font-weight: 500;
    display: block; /* ทำให้ /เดือน ขึ้นบรรทัดใหม่เมื่อจำเป็น */
}
/* --- END ADJUSTMENT --- */

/* ===== Stats Section - Enhanced (modified) ===== */
.stats-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 4rem 0;
    margin: 4rem 0;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
    top: -150px;
    left: -150px;
}

.stats-section::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
    bottom: -150px;
    right: -150px;
}

.stat-item {
    text-align: center;
    padding: 2rem;
    position: relative;
    z-index: 1;
    /* ADDED hover effects */
    transition: transform var(--transition-normal);
    cursor: default;
}
.stat-item:hover {
    transform: translateY(-5px); /* เพิ่มเอฟเฟกต์ยกขึ้นเมื่อชี้ */
}

.stat-number {
    font-size: 3.5rem; /* เพิ่มขนาดให้ใหญ่ขึ้น */
    font-weight: 900; /* เน้นความหนาสูงสุด */
    color: white;
    display: block;
    text-shadow: 0 6px 20px rgba(0,0,0,0.4); /* เพิ่มเงาให้เด่นขึ้น */
    animation: fadeInUp 0.8s ease-out;
    letter-spacing: -1px; /* เพิ่มความกระชับ */
}

.stat-label {
    color: rgba(255,255,255,0.95); /* ปรับความทึบแสง */
    font-size: 1.3rem; /* เพิ่มขนาดป้ายกำกับ */
    margin-top: 0.8rem;
    font-weight: 600; /* ทำให้ป้ายกำกับหนาขึ้น */
    text-transform: uppercase; /* ทำให้ดูเป็นทางการ */
}
/* --- END ADJUSTMENT --- */

/* ===== Forms - Enhanced ===== */
.form-control,
.form-select {
    padding: 0.9rem 1.2rem;
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: all var(--transition-normal);
    background-color: white;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.3rem rgba(74, 144, 226, 0.15);
    transform: translateY(-2px);
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.6rem;
    font-size: 0.95rem;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* ===== Cards - Enhanced ===== */
.card {
    border-radius: var(--radius-md);
    border: 1px solid var(--light-gray);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    background: var(--card-bg);
}

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

.card-header {
    border-radius: var(--radius-md) var(--radius-md) 0 0 !important;
    background: var(--primary-gradient);
    color: white;
    font-weight: 600;
    border: none;
    padding: 1.2rem 1.5rem;
}

/* ===== Badges - Enhanced ===== */
.badge {
    padding: 0.6rem 1.2rem;
    font-weight: 600;
    border-radius: var(--radius-xl);
    font-size: 0.85rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.badge.bg-primary {
    background: var(--primary-gradient) !important;
}

.badge.bg-success {
    background: linear-gradient(135deg, var(--success-color) 0%, var(--success-light) 100%) !important;
}

.badge.bg-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, var(--danger-dark) 100%) !important;
}

.badge.bg-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, var(--secondary-dark) 100%) !important;
}

/* ===== Footer - Enhanced ===== */
footer {
    margin-top: auto;
    background: linear-gradient(135deg, var(--dark-color) 0%, var(--dark-light) 100%);
    color: rgba(255,255,255,0.9);
    padding: 3rem 0 1rem;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
}

footer a {
    transition: all var(--transition-normal);
    color: rgba(255,255,255,0.8);
}

footer a:hover {
    color: var(--primary-light) !important;
    transform: translateX(5px);
}

.social-links a {
    display: inline-flex;
    width: 45px;
    height: 45px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    margin: 0 0.4rem;
    transition: all var(--transition-normal);
    backdrop-filter: blur(10px);
}

.social-links a:hover {
    background: var(--primary-gradient);
    transform: translateY(-5px) rotate(5deg);
    box-shadow: 0 5px 20px rgba(74, 144, 226, 0.4);
}

/* ===== Pagination - Enhanced ===== */
.pagination {
    margin-top: 3rem;
}

.page-link {
    color: var(--primary-color);
    border: 2px solid var(--light-gray);
    padding: 0.6rem 1.2rem;
    margin: 0 0.3rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: all var(--transition-normal);
}

.page-link:hover {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.page-item.active .page-link {
    background: var(--primary-gradient);
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

/* ===== Image Upload Preview - Enhanced ===== */
.image-preview-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.2rem;
    margin-top: 1.5rem;
}

.image-preview {
    position: relative;
    width: 100%;
    height: 160px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 3px solid var(--light-gray);
    transition: all var(--transition-normal);
    animation: fadeInUp 0.5s ease-out;
}

.image-preview:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.image-preview:hover img {
    transform: scale(1.1);
}

.image-preview .remove-image {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, var(--danger-color) 0%, var(--danger-dark) 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.image-preview .remove-image:hover {
    transform: scale(1.15) rotate(90deg);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.5);
}

.image-preview .badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    z-index: 2;
}

/* ===== Loading Spinner - Enhanced ===== */
.loading-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.loading-overlay .spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3rem;
    color: var(--primary-color);
}

/* ===== Alert - Enhanced ===== */
.alert {
    border-radius: var(--radius-md);
    border: none;
    padding: 1.2rem 1.8rem;
    box-shadow: var(--shadow-sm);
    animation: fadeInUp 0.5s ease-out;
    position: relative;
    overflow: hidden;
}

.alert::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid var(--success-color);
}

.alert-success::before {
    background: var(--success-color);
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid var(--danger-color);
}

.alert-danger::before {
    background: var(--danger-color);
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-left: 4px solid var(--warning-color);
}

.alert-warning::before {
    background: var(--warning-color);
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid var(--primary-color);
}

.alert-info::before {
    background: var(--primary-color);
}

/* ===== Toast Notifications - Enhanced ===== */
.toast {
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.5s ease-out;
}

/* ===== Table - Enhanced ===== */
.table {
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    background: var(--primary-gradient);
    color: white;
    font-weight: 600;
    border: none;
    padding: 1rem 1.2rem;
}

.table tbody tr {
    transition: all var(--transition-normal);
}

.table tbody tr:hover {
    background-color: var(--lighter-gray);
    transform: scale(1.01);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.table tbody td {
    padding: 1rem 1.2rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--light-gray);
}

/* ===== Modal - Enhanced ===== */
.modal-content {
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: var(--shadow-xl);
    animation: fadeInUp 0.3s ease-out;
}

.modal-header {
    background: var(--primary-gradient);
    color: white;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border: none;
    padding: 1.5rem 2rem;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

/* ===== Utilities ===== */
.shadow-sm {
    box-shadow: var(--shadow-sm) !important;
}

.shadow {
    box-shadow: var(--shadow-md) !important;
}

.shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}

.rounded-lg {
    border-radius: var(--radius-md) !important;
}

.text-muted {
    color: var(--gray-color) !important;
}

.bg-gradient {
    background: var(--primary-gradient) !important;
    color: white !important;
}

/* ===== Hover Effects ===== */
.hover-scale {
    transition: transform var(--transition-normal);
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-lift {
    transition: all var(--transition-normal);
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .search-box {
        padding: 1.5rem;
    }
    
    .stat-number {
        font-size: 2.5rem; /* ปรับขนาด stat-number ให้เล็กลงสำหรับมือถือ */
    }
    
    .property-card-img {
        height: 200px;
    }
    
    .property-price {
        font-size: 1.5rem;
    }
    
    .navbar-brand {
        font-size: 1.3rem;
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 1.6rem;
    }
    
    .property-features {
        gap: 0.8rem;
    }
    
    .property-feature {
        font-size: 0.85rem;
        padding: 0.3rem 0.6rem;
    }
}

/* ===== Print Styles ===== */
@media print {
    .navbar,
    .hero-section,
    footer,
    .btn,
    .favorite-btn {
        display: none !important;
    }
    
    .property-card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}
/* ============================================
   Image Handling - Thumbnail & Responsive
   ============================================ */

/* รูปในการ์ดประกาศ (หน้าแรก, หน้ารายการ) */
.property-card img.card-img-top,
.card-img-top {
    width: 100%;
    height: 250px !important;
    object-fit: cover !important;
    object-position: center;
}

/* รูปในหน้า Admin */
.property-img {
    width: 60px !important;
    height: 60px !important;
    object-fit: cover !important;
    object-position: center;
    border-radius: 8px;
}

/* รูปใหญ่ในหน้ารายละเอียด */
.property-detail-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    object-position: center;
    border-radius: 10px;
}

/* รูป Gallery ย่อยในหน้ารายละเอียด */
.property-gallery-thumb {
    width: 100%;
    height: 100px;
    object-fit: cover;
    object-position: center;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.property-gallery-thumb:hover {
    opacity: 0.8;
    transform: scale(1.05);
    border-color: #667eea;
}

.property-gallery-thumb.active {
    border-color: #667eea;
}

/* รูปเล็กๆ ทั่วไป */
.img-thumbnail-sm {
    width: 80px;
    height: 80px;
    object-fit: cover;
    object-position: center;
    border-radius: 5px;
}

/* รูปกลางๆ */
.img-thumbnail-md {
    width: 200px;
    height: 150px;
    object-fit: cover;
    object-position: center;
    border-radius: 5px;
}

/* Fix responsive images */
img {
    max-width: 100%;
    height: auto;
}

/* Placeholder for no image */
.no-image-placeholder {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 1.2rem;
    border-radius: 10px;
}
