:root {
    --primary: #1e3932;
    /* Deep Emerald */
    --secondary: #d4af37;
    /* Muted Gold */
    --bg-color: #fdfbf7;
    /* Warm White */
    --text-dark: #121212;
    --text-light: #fdfbf7;
    --gray-100: #f3f3f3;
    --gray-200: #e5e5e5;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Lato', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden; /* Fix for horizontal scroll gaps */
    width: 100%;
    padding-top: 75px; /* Added to compensate for fixed header */
}

html {
    overflow-x: hidden;
    width: 100%;
}

h1,
h2,
h3,
h4,
.logo {
    font-family: 'Playfair Display', serif;
}

/* Typography & Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px; /* Slightly reduced padding for mobile */
    width: 100%;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary);
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--secondary);
}

.btn-primary {
    display: inline-block;
    background-color: var(--secondary);
    color: var(--primary);
    padding: 12px 30px;
    text-decoration: none;
    font-weight: 700;
    border-radius: 2px;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary:hover {
    background-color: var(--primary);
    color: var(--secondary);
    transform: translateY(-2px);
}

/* Header */
header {
    background-color: rgba(225, 236, 229, 0.95); /* Semi-transparent for premium look */
    backdrop-filter: blur(10px); /* Frosted glass effect */
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2000; /* Higher to ensure visibility */
    padding: 0.7rem 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: auto;
    position: relative;
    z-index: 2500; /* Ensure it stays above the mobile navigation drawer */
}

.mobile-menu-btn {
    display: none; /* Masaüstünde gizle */
    background: rgba(30, 57, 50, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 1.4rem;
    color: var(--primary);
    cursor: pointer;
    margin-left: 15px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
    background: rgba(30, 57, 50, 0.1);
    color: var(--secondary);
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: 1px;
}

.logo span {
    color: var(--secondary);
}

.nav-links {
    list-style: none;
    display: flex;
    /* gap: 2rem; Removed gap, using margin on li for better control with absolute positioning */
    align-items: center;
}

.nav-links li {
    margin-left: 2rem;
    position: relative;
    /* For dropdown */
}

/* Hover Animated Underline */
.nav-links li::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background-color: var(--secondary);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.nav-links li:hover::after {
    width: 70%;
}

/* Dropdown Styles */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #fff;
    min-width: 180px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    border-radius: 4px;
    top: 100%;
    left: 0;
    list-style: none;
    padding: 0.5rem 0;
}

.dropdown:hover .dropdown-content {
    display: block;
    animation: fadeIn 0.3s;
}

.dropdown-content li {
    margin: 0 !important;
    display: block;
}

.dropdown-content a {
    color: var(--primary) !important;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.95rem;
    transition: background-color 0.2s;
}

.dropdown-content a:hover {
    background-color: var(--gray-100);
    color: var(--secondary) !important;
}

.nav-links a {
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--secondary);
}

/* Hero Section */
/* Hero Section */
.hero {
    height: 80vh;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
        url('img/bck.jpg') no-repeat center center/cover;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-light);
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero .btn-primary {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: 0.5px;
}

/* Products Grid */
.products-section {
    padding: 5rem 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.product-card {
    background: white;
    box-shadow: var(--shadow);
    border-radius: 4px;
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.product-img {
    height: 300px;
    width: 100%;
    object-fit: cover;
}

.product-info {
    padding: 1.5rem;
    text-align: center;
}

.product-category {
    font-size: 0.85rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.product-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.product-price {
    font-weight: 700;
    color: var(--secondary);
    font-size: 1.2rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background-color: white;
    display: flex;
    max-width: 1100px;
    width: 95%;
    max-height: 90vh;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.2rem;
    cursor: pointer;
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    backdrop-filter: blur(4px);
    transition: 0.3s;
}

.close-modal:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: rotate(90deg);
}

.modal-img-container {
    flex: 1.4;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #eee;
}

.modal-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.modal-details {
    flex: 1;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background-color: #fafafa;
}

.modal-title {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

#modalFeatures {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 1.5rem;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #eee;
}

#modalFeatures li {
    font-size: 0.85rem;
    display: flex;
    align-items: flex-start;
}

.whatsapp-btn {
    background-color: #25D366;
    color: white;
    padding: 18px 25px;
    text-decoration: none;
    font-weight: 700;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
    margin-top: auto;
}

.whatsapp-btn:hover {
    background-color: #128C7E;
    transform: translateY(-2px);
}

/* Footer */
footer {
    background-color: var(--primary);
    color: var(--text-light);
    padding: 3rem 0;
    text-align: center;
    margin-top: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }

    .hero {
        background-attachment: scroll; /* Mobildeki kayma/yakınlaşma sorununu çözer */
        height: 60vh; /* Mobilde daha dengeli bir yükseklik */
        background-position: center center;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .modal-content {
        flex-direction: column;
        overflow-y: auto;
        margin-top: env(safe-area-inset-top, 20px);
        max-height: 85vh;
    }

    .close-modal {
        top: 20px;
        right: 20px;
        background: rgba(0, 0, 0, 0.7);
    }

    .modal-img-container {
        height: 350px;
        flex: none;
        border-right: none;
        border-bottom: 1px solid #eee;
    }

    .modal-details {
        padding: 1.5rem;
    }
    
    #modalFeatures {
        grid-template-columns: 1fr; /* Mobilde özellikleri tek sütuna düşürdük */
        padding: 15px;
    }

    /* B2B Panel Mobile Optimizations */
    .grid-2 {
        grid-template-columns: 1fr;
        /* Stack columns */
    }

    .header-flex {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .header-flex>div {
        flex-direction: column;
        gap: 10px;
    }

    .header-flex>div>div {
        border-left: none !important;
        padding-left: 0 !important;
        border-top: 1px solid rgba(255, 255, 255, 0.3);
        padding-top: 10px;
        margin-top: 5px;
    }

    .panel-card {
        padding: 1rem;
    }

    input[type="date"] {
        width: 100%;
        /* Full width date inputs */
        margin-bottom: 5px;
    }

    /* Wrap date filter controls */
    .panel-card>div[style*="justify-content: space-between"] {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .panel-card>div>div[style*="display: flex"] {
        flex-wrap: wrap;
        width: 100%;
    }

    /* Mobile Modal Fixes */
    .modal-content {
        width: 95%;
        /* Use almost full width on mobile */
        margin: 10px;
        max-height: 85vh;
        /* Prevent overflow */
        flex-direction: column;
    }

    #editPriceModal .modal-content {
        padding: 15px !important;
    }

    #editPriceModal input {
        font-size: 16px;
        /* Prevent zoom on iOS */
        padding: 10px !important;
        /* Larger touch target */
    }

    #editPriceModal button {
        width: 100%;
        margin-top: 10px;
        padding: 12px !important;
    }

    #editPriceModal div[style*="justify-content: flex-end"] {
        flex-direction: column-reverse;
        /* Stack buttons, Save on top usually or just stack */
        gap: 0;
    }
}

/* Gallery Styles */
.gallery-nav {
    position: absolute;
    top: 0;
    height: 100%;
    width: 15%;
    background-color: transparent;
    color: rgba(255, 255, 255, 0.5);
    border: none;
    font-size: 2.5rem;
    cursor: pointer;
    transition: all 0.4s ease;
    user-select: none;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
}

.modal-img-container:hover .gallery-nav {
    opacity: 1;
}

.gallery-nav:hover {
    color: #fff;
}

.gallery-nav.prev {
    left: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.4), transparent);
}

.gallery-nav.prev:hover {
    background: linear-gradient(to right, rgba(0,0,0,0.6), transparent);
}

.gallery-nav.next {
    right: 0;
    background: linear-gradient(to left, rgba(0,0,0,0.4), transparent);
}

.gallery-nav.next:hover {
    background: linear-gradient(to left, rgba(0,0,0,0.6), transparent);
}

.gallery-nav.next {
    right: 0;
    background: linear-gradient(to left, rgba(0,0,0,0.4), transparent);
}

.gallery-nav.next:hover {
    background: linear-gradient(to left, rgba(0,0,0,0.6), transparent);
}

.gallery-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.gallery-dot {
    width: 10px;
    height: 10px;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.gallery-dot.active {
    background-color: var(--secondary);
    border-color: var(--secondary);
    transform: scale(1.2);
}

/* Scroll Offset for Anchors */
#sofaHeader,
#koseGridHeader,
#ucluGridHeader,
#berjerHeader,
#hakkimizda {
    scroll-margin-top: 15vh;
}

@keyframes fadeEffect {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Logo Shine/Wobble Animation */
.logo img {
    transition: all 0.3s ease;
}

@keyframes shineWobble {
    0% { transform: scale(1) rotate(0deg); filter: drop-shadow(0 0 0 rgba(255,255,255,0)); }
    25% { transform: scale(1.15) rotate(-10deg); filter: drop-shadow(0 0 10px rgba(255,215,0,0.7)) brightness(1.2); }
    50% { transform: scale(1.1) rotate(10deg); filter: drop-shadow(0 0 20px rgba(255,215,0,1)) brightness(1.4); }
    75% { transform: scale(1.12) rotate(-5deg); filter: drop-shadow(0 0 10px rgba(255,215,0,0.7)) brightness(1.2); }
    100% { transform: scale(1) rotate(0deg); filter: drop-shadow(0 0 0 rgba(255,255,255,0)); }
}

.logo:hover img {
    animation: shineWobble 0.6s ease-in-out;
}

/* Floating WhatsApp Button */
.floating-whatsapp {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 35px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    text-decoration: none;
    transition: all 0.3s ease;
    animation: wa-pulse 2s infinite;
}

.floating-whatsapp:hover {
    background-color: #1ebe57;
    transform: scale(1.1);
}

@keyframes wa-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

@media (max-width: 991px) {
    .mobile-menu-btn {
        display: flex; /* Mobilde göster ve ikonları ortala */
        justify-content: center;
        align-items: center;
        position: relative;
        z-index: 2100; /* Ensure button stays on top of the menu */
    }

    #mainNav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: white;
        z-index: 2000;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        transition: 0.4s ease;
        padding: 80px 30px;
        display: flex;
        flex-direction: column;
    }

    #mainNav.active {
        right: 0;
    }

    .nav-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        width: 100%;
    }

    .nav-links li {
        width: 100%;
        margin-left: 0;
        margin-bottom: 15px;
    }

    .nav-links a {
        display: block;
        padding: 12px 15px !important;
        width: 100%;
        text-align: left;
    }

    .dropdown-content {
        position: static;
        display: block;
        box-shadow: none;
        padding-left: 20px;
        background-color: transparent;
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.2rem;
        line-height: 1.2;
    }

    .hero-content p {
        font-size: 1rem;
        padding: 0 10px;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr); /* Premium 2-column layout */
        gap: 10px;
    }

    .product-img {
        height: 180px;
    }

    .product-info {
        padding: 10px;
    }

    .product-title {
        font-size: 1.1rem;
        margin-bottom: 0px;
    }

    .product-price {
        font-size: 0.95rem;
    }

    .category-title {
        font-size: 1.4rem !important;
        margin-bottom: 1rem !important;
    }

    .modal-content {
        width: 100%;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
    }

    .about-feature-grid {
        grid-template-columns: repeat(3, 1fr) !important; /* 3 columns for icons */
        gap: 10px !important;
    }

    footer .container {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    
    .wa-submit-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .about-feature-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}