@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

@font-face {
    font-family: 'UKIJTuzTom';
    src: url('/fonts/UKIJTuzTom.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-20B9, U+20BB-10FFFF; /* Exclude U+20BA (₺) */
}

@font-face {
    font-family: 'TurkishLiraFix';
    src: local('Arial'), local('Helvetica'), local('Segoe UI'), local('Roboto');
    unicode-range: U+20BA; /* Only apply to ₺ symbol */
}

:root {
    /* Urumqi Grand Bazaar Aesthetic (Earthy & Cultural) */
    --primary-color: #3E2723; /* Deep Earth Brown for text/accents */
    --accent-color: #D2691E; /* Terracotta / Brick Red for buttons/highlights */
    --bg-color: #FAF7F2; /* Warm Sand / Beige for background */
    --surface-color: #FFFFFF; /* Crisp White for cards/navbar */
    --border-color: #E8DCCB; /* Subtle sandy border */
    --text-primary: #3E2723; /* Deep brown for readability */
    --text-secondary: #795548; /* Muted brown */
    
    /* Typography */
    --font-sans: 'TurkishLiraFix', 'Montserrat', sans-serif;
    --font-serif: 'TurkishLiraFix', 'Playfair Display', serif;
    --font-arabic: 'TurkishLiraFix', 'UKIJTuzTom', 'Microsoft Uighur', serif;
    
    /* Borders */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    letter-spacing: 0.02em;
    overflow-x: hidden; /* Prevent horizontal overflow */
    width: 100%;
}

/* Prevent long text from breaking layouts */
* {
    overflow-wrap: break-word;
}

.btn {
    white-space: normal !important; /* Allow button text to wrap */
}

.nav-link {
    white-space: nowrap; /* Keep nav links on a single line */
}

/* Typography Overrides */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 600;
    color: var(--primary-color);
}

html[dir="rtl"] body {
    font-family: var(--font-arabic);
}

html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3, 
html[dir="rtl"] h4, html[dir="rtl"] h5, html[dir="rtl"] h6, 
html[dir="rtl"] .section-title {
    font-family: var(--font-arabic);
}

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

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

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

.card {
    background-color: var(--surface-color) !important;
    border-color: var(--border-color) !important;
}

.section-title {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    font-weight: 400;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 1px;
    background-color: var(--primary-color);
}

/* Navbar */
.navbar {
    border-bottom: 1px solid var(--border-color);
    padding-top: 1.2rem;
    padding-bottom: 1.2rem;
    transition: top 0.4s ease-in-out; /* Smooth scroll hide/show */
}

.navbar-glass {
    background: rgba(255, 255, 255, 0.75) !important; 
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.4) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

.navbar-brand {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 1.8rem;
    letter-spacing: 0.05em;
    color: var(--primary-color) !important;
    text-transform: uppercase;
}

.nav-link {
    font-family: var(--font-sans);
    color: var(--text-primary) !important;
    font-weight: 600;
    font-size: 0.75rem; /* Reduced to fit long Cyrillic/Latin strings */
    letter-spacing: 0; 
    transition: color 0.3s ease;
    margin: 0;
}

/* Horizontal scroll for navbar without breaking layout */
.mobile-scroll-nav {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}
.mobile-scroll-nav::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

@media (max-width: 1199.98px) {
    .mobile-scroll-nav {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
    }
}
@media (min-width: 1200px) {
    .mobile-scroll-nav {
        flex-wrap: wrap !important;
        overflow: visible !important;
    }
}

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

/* Mobile dropdown override removed as we now use offcanvas */

@media (min-width: 1200px) {
    .dropdown-menu {
        background-color: var(--surface-color) !important; /* Ensure white background */
        border: 1px solid var(--border-color);
        border-radius: var(--radius-sm);
        box-shadow: 0 15px 35px rgba(0,0,0,0.08);
        padding: 1rem;
        min-width: 200px;
    }
}

.dropdown-item {
    border-radius: var(--radius-sm);
    padding: 0.7rem 1.2rem;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-primary) !important; /* Ensure dark brown text */
    transition: all 0.2s;
}

.dropdown-item:hover {
    background-color: transparent;
    color: var(--accent-color);
    padding-left: 1.5rem;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--surface-color); /* White text on Dark Brown background */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: var(--radius-sm);
    padding: 0.8rem 2rem;
    transition: all 0.4s ease;
}

.btn-primary:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--surface-color);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 600;
}

.btn-outline-primary:hover, .btn-outline-primary:focus, .btn-outline-primary:active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--surface-color) !important;
}

/* Product Cards */
.product-card {
    border: none !important;
    border-radius: 0;
    background-color: transparent;
    margin-bottom: 2rem;
}

.product-img-wrapper {
    position: relative;
    overflow: hidden;
    background-color: var(--surface-color);
    aspect-ratio: 3/4;
    margin-bottom: 1.5rem;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1s ease, filter 0.5s ease;
}

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

.add-to-cart-overlay {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.product-card:hover .add-to-cart-overlay {
    opacity: 1;
    transform: translateY(0);
}

.product-card .card-body {
    padding: 0;
    text-align: left;
}

.hover-shadow-lg:hover {
    box-shadow: 0 1rem 3rem rgba(0,0,0,.175)!important;
    transform: translateY(-5px);
}

.card-title {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.card-title a {
    color: var(--primary-color);
    transition: color 0.3s;
}

.card-title a:hover {
    color: var(--accent-color);
}

.product-price {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 0.4rem 1rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: var(--radius-sm);
    font-weight: 500;
}

/* Carousel Adjustments */
.caption-content {
    background: rgba(250, 247, 242, 0.25) !important; /* Semi-transparent earthy tint */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.caption-content h2 {
    font-family: var(--font-serif);
}

/* Custom Search */
.search-input {
    background-color: transparent;
    border: none;
    border-bottom: 1px solid var(--border-color);
    border-radius: 0;
    padding: 0.5rem 0;
    transition: border-color 0.3s;
    font-size: 0.85rem;
}

.search-input:focus {
    background-color: transparent;
    border-color: var(--primary-color);
    box-shadow: none;
}

/* Footer */
footer {
    background-color: var(--primary-color) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.8) !important;
    padding-top: 4rem;
    padding-bottom: 2rem;
    margin-top: 5rem;
}

footer h4, footer h5 {
    font-family: var(--font-sans);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    color: #fff !important;
}

footer a, footer .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
    transition: color 0.2s;
}

footer a:hover {
    color: var(--accent-color) !important;
}

/* Fix text colors inside footer */
footer .text-primary {
    color: var(--accent-color) !important; /* Make icons visible on dark background */
}
