/* Town Country Theme Styles */

/* Navigation Styles */
.navbar-light {
    background-color: #ffffff !important;
    padding: 0.5rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand img {
    height: 60px;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: #141D4C !important;
}

.navbar-nav .nav-link.active {
    color: #141D4C !important;
}


/* Hero Section Styles */
.hero-section {
    min-height: 100vh;
    min-height: 600px;
    position: relative;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-search-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
}

.search-container {
    width: 100%;
    max-width: 600px;
}

.search-box {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    padding: 0;
    display: flex;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.search-input-group {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
}

.search-icon {
    margin-right: 1rem;
    opacity: 0.7;
}

.search-input {
    border: none;
    background: transparent;
    font-size: 1rem;
    color: #333;
    width: 100%;
    outline: none;
}

.search-input::placeholder {
    color: #666;
    font-style: italic;
}

.search-button {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    padding: 1rem 2rem;
    color: #333;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.search-button:hover {
    background: rgba(255, 255, 255, 1);
    color: #000;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        height: 70vh;
        min-height: 500px;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .search-input-group {
        padding: 1rem;
    }
    
    .search-button {
        padding: 1rem;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .navbar-nav {
        text-align: center;
        padding: 1rem 0;
    }
}

/* Additional Theme Colors */
:root {
    --towncountry-gold: #d4af37;
    --towncountry-dark: #1a1a1a;
    --towncountry-light: #f8f9fa;
}

/* Button Styles */
.btn-towncountry {
    background-color: var(--towncountry-gold);
    border-color: var(--towncountry-gold);
    color: white;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.btn-towncountry:hover {
    background-color: #b8941f;
    border-color: #b8941f;
    color: white;
} 

/* Favorite Badge */
.favorite-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.favorite-badge:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.favorite-badge i {
    font-size: 16px;
}

/* Body padding to account for fixed navbar */
body {
    padding-top: 80px;
}

/* Responsive body padding */
@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }
} 


.navbar-localization {
    display: flex;
    align-items: start;
    gap: 8px;
    /* margin-left: auto; */
    padding: 0.5rem 1rem;
    margin-right: 15px;
}

.navbar-localization .dropdown {
    position: relative;
}

.navbar-localization .dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: none;
    background: white;
    color: #333;
    text-decoration: none;
    font-size: 13px;
    border-radius: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-weight: 500;
}

.navbar-localization .dropdown-toggle:hover {
    background-color: #f8f9fa;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.navbar-localization .currency-btn {
    background-color: #f8f9fa;
    color: black !important;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-localization .currency-btn:hover {
    background-color: #f8f9fa !important;
    color: black !important;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.4);
}

.navbar-localization .flag {
    font-size: 16px;
    flex-shrink: 0;
}

.navbar-localization .icon {
    font-size: 16px;
    flex-shrink: 0;
}

.navbar-localization .text {
    font-weight: 500;
    font-size: 13px;
}

.navbar-localization .code {
    font-weight: 600;
    font-size: 11px;
    opacity: 0.8;
}

.navbar-localization .symbol {
    font-weight: 600;
    font-size: 12px;
}

/* Language Dropdown */
.language-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 260px;
    max-height: 350px;
    overflow-y: auto;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background: white;
    z-index: 1050;
}

.language-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
}

.language-option:hover {
    background-color: #f8f9fa;
    color: #333;
}

.language-option.active {
    background-color: #e3f2fd;
    color: #333;
}

.language-option .flag {
    font-size: 16px;
    min-width: 20px;
}

.language-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.language-info .name {
    font-weight: 500;
    font-size: 13px;
}

.language-info .native-name {
    font-size: 11px;
    opacity: 0.7;
}

.language-option .code {
    font-weight: 600;
    font-size: 11px;
    opacity: 0.8;
}

/* Measurement Dropdown */
.measurement-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 280px;
    max-height: 350px;
    overflow-y: auto;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background: white;
    z-index: 1050;
}

.measurement-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
}

.measurement-option:hover {
    background-color: #f8f9fa;
    color: #333;
}

.measurement-option.active {
    background-color: #e3f2fd;
    color: #333;
}

.measurement-option .icon {
    font-size: 16px;
    min-width: 20px;
}

.measurement-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.measurement-info .name {
    font-weight: 500;
    font-size: 13px;
}

.measurement-info .description {
    font-size: 11px;
    opacity: 0.7;
}

.measurement-option .code {
    font-weight: 600;
    font-size: 11px;
    opacity: 0.8;
}

/* Currency Dropdown */
.currency-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 320px;
    max-height: 500px; /* เพิ่มความสูงให้มากขึ้น */
    overflow: hidden; /* เปลี่ยนจาก auto เป็น hidden */
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background: white;
    z-index: 1050;
    padding: 0;
}

/* เพิ่ม custom scrollbar สำหรับ WebKit browsers */
.currency-dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.currency-dropdown-menu::-webkit-scrollbar-track {
    background: #f7fafc;
    border-radius: 3px;
}

.currency-dropdown-menu::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.currency-dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

.currency-dropdown-menu .dropdown-header {
    padding: 10px 12px;
    border-bottom: 1px solid #e1e5e9;
    background-color: #f8f9fa;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1;
}

.currency-dropdown-menu .dropdown-header h6 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

/* แก้ไข dropdown content wrapper */
.dropdown-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    margin: 0;
}

/* สำหรับ desktop ให้แสดงเป็น 3 คอลัมน์ */
@media (min-width: 768px) {
    .dropdown-content-wrapper {
        flex-direction: row;
        gap: 0;
    }
    
    .dropdown-section {
        flex: 1;
        min-width: 0; /* ป้องกัน overflow */
        border-right: 1px solid #e1e5e9;
    }
    
    .dropdown-section:last-child {
        border-right: none;
    }
}

/* ปรับ dropdown section */
.dropdown-section {
    display: flex;
    flex-direction: column;
    min-height: 200px;
}

/* ปรับ header */
.dropdown-section .dropdown-header {
    padding: 10px 12px;
    border-bottom: 1px solid #e1e5e9;
    background-color: #f8f9fa;
    position: sticky;
    top: 0;
    z-index: 1;
    flex-shrink: 0;
}

.dropdown-section:first-child .dropdown-header {
    border-radius: 8px 0 0 0;
}

.dropdown-section:last-child .dropdown-header {
    border-radius: 0 8px 0 0;
}

.dropdown-section:only-child .dropdown-header {
    border-radius: 8px 8px 0 0;
}

/* ปรับ scroll container */
.currency-scroll-container,
.language-scroll-container,
.measurement-scroll-container {
    flex: 1;
    max-height: 200px; /* จำกัดความสูงของแต่ละ section */
    overflow-y: auto;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 #f7fafc;
    padding: 6px;
}

.currency-scroll-container::-webkit-scrollbar,
.language-scroll-container::-webkit-scrollbar,
.measurement-scroll-container::-webkit-scrollbar {
    width: 4px;
}

.currency-scroll-container::-webkit-scrollbar-track,
.language-scroll-container::-webkit-scrollbar-track,
.measurement-scroll-container::-webkit-scrollbar-track {
    background: #f7fafc;
    border-radius: 2px;
}

.currency-scroll-container::-webkit-scrollbar-thumb,
.language-scroll-container::-webkit-scrollbar-thumb,
.measurement-scroll-container::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 2px;
}

.currency-scroll-container::-webkit-scrollbar-thumb:hover,
.language-scroll-container::-webkit-scrollbar-thumb:hover,
.measurement-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

.currency-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    padding: 6px;
    padding-bottom: 10px;
}

.currency-option, .language-option, .measurement-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 1px;
}

.currency-option:hover {
    background-color: #f8f9fa;
}

.currency-option.selected, .language-option.active, .measurement-option.active {
    background-color: #e3f2fd;
    border: 1px solid #2196f3;
}



.currency-option .flag {
    font-size: 16px;
    min-width: 20px;
}

.currency-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.currency-info .name {
    font-weight: 500;
    color: #333;
    font-size: 13px;
}

.currency-info .country {
    font-size: 11px;
    color: #6c757d;
}

.currency-symbols {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
}

.currency-symbols .code {
    font-weight: 600;
    color: #007bff;
    font-size: 11px;
}

.currency-symbols .symbol {
    font-weight: 600;
    color: #28a745;
    font-size: 12px;
}



/* Responsive Breakpoints */
@media (min-width: 576px) {
    .navbar-localization {
        gap: 10px;
    }
    
    .navbar-localization .dropdown-toggle {
        gap: 6px;
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .navbar-localization .currency-btn {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .navbar-localization .flag {
        font-size: 16px;
    }
    
    .currency-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .navbar-localization {
        gap: 12px;
    }
    
    .navbar-localization .dropdown-toggle {
        gap: 8px;
        padding: 8px 14px;
    }
    
    .navbar-localization .currency-btn {
        padding: 8px 14px;
    }
    
    .currency-dropdown-menu {
        min-width: 600px;
        max-height: 500px;
    }
    
    .currency-scroll-container,
    .language-scroll-container,
    .measurement-scroll-container {
        max-height: 220px; /* ปรับความสูงสำหรับ desktop */
    }
    
    .currency-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .currency-dropdown-menu {
        min-width: 600px;
        max-height: 500px;
    }
    
    .currency-scroll-container,
    .language-scroll-container,
    .measurement-scroll-container {
        max-height: 350px; /* ปรับความสูงสำหรับ large desktop */
    }
    
    .currency-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1200px) {
    .currency-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Mobile specific styles */
@media (max-width: 575px) {
    .navbar-localization {
        flex-direction: column;
        gap: 4px;
        width: 100%;
        margin: 10px 0;
    }
    
    .navbar-localization .dropdown {
        width: 100%;
    }
    
    .navbar-localization .dropdown-toggle {
        width: 100%;
        justify-content: center;
        padding: 10px;
    }
    
    .language-dropdown-menu {
        min-width: 100%;
        max-width: 100%;
    }
    
    .measurement-dropdown-menu {
        min-width: 100%;
        max-width: 100%;
    }
    
    .currency-dropdown-menu {
        min-width: 100%;
        max-width: 100%;
        max-height: 60vh;
    }
    
    /* ปรับ scroll container สำหรับ mobile */
    .currency-scroll-container,
    .language-scroll-container,
    .measurement-scroll-container {
        max-height: 150px; /* ลดความสูงสำหรับ mobile */
    }
    
    .currency-grid {
        grid-template-columns: 1fr;
    }
    
    .currency-option {
        padding: 10px 12px;
    }
    
    .currency-info .country {
        display: block !important;
    }
}

/* Tablet specific styles */
@media (min-width: 576px) and (max-width: 991px) {
    .currency-dropdown-menu {
        min-width: 400px;
        max-height: 450px;
    }
    
    .currency-scroll-container,
    .language-scroll-container,
    .measurement-scroll-container {
        max-height: 180px; /* ปรับความสูงสำหรับ tablet */
    }
    
    .currency-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .currency-option {
        padding: 12px 10px;
        min-height: 44px;
    }
    
    .language-option {
        padding: 12px;
        min-height: 44px;
    }
    
    .measurement-option {
        padding: 12px;
        min-height: 44px;
    }
    
    .navbar-localization .dropdown-toggle {
        padding: 10px 12px;
        min-height: 44px;
    }
}
/* Footer Styles */
.footer-section {
    background-color: #2c2c2c;
    color: white;
    padding: 3rem 0 2rem 0;
    text-align: center;
}

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

/* Logo Styles */
.footer-logo {
    margin-bottom: 2rem;
    text-align: center;
}

.footer-logo img {
    height: 60px;
    width: auto;
    max-width: 300px;
    filter: brightness(0) invert(1);
    transition: all 0.3s ease;
}

.footer-logo img:hover {
    filter: brightness(0) invert(0.9);
}

/* Contact Information */
.footer-contact {
    margin-bottom: 2rem;
}

.contact-phone,
.contact-address {
    font-size: 0.95rem;
    color: white;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.contact-phone {
    font-weight: 500;
}

.contact-address {
    font-weight: 400;
    opacity: 0.9;
}

/* Social Media Icons */
.footer-social {
    margin-bottom: 2rem;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: white;
    color: #2c2c2c;
    border-radius: 50%;
    margin: 0 0.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 600;
}

.social-icon:hover {
    background-color: #f8f9fa;
    color: #2c2c2c;
    transform: translateY(-2px);
}

/* Copyright */
.footer-copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
}

.copyright-text {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

/* Footer Terms and Privacy Policy - Simple Style */
.footer-terms-privacy {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 1.5rem 0;
    padding: 1rem 0;
}

.footer-term,
.footer-privacy {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-term:hover,
.footer-privacy:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .footer-section {
        padding: 2rem 0 1.5rem 0;
    }

    .footer-logo img {
        height: 50px;
        max-width: 250px;
    }

    .footer-terms-privacy {
        flex-direction: column;
        gap: 0.5rem;
        margin: 1rem 0;
    }

    .contact-phone,
    .contact-address {
        font-size: 0.9rem;
    }

    .social-icon {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
        margin: 0 0.3rem;
    }
}

@media (max-width: 480px) {
    .footer-logo img {
        height: 45px;
        max-width: 200px;
    }

    .contact-phone,
    .contact-address {
        font-size: 0.85rem;
    }

    .social-icon {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
        margin: 0 0.2rem;
    }
}
