/* Google Fonts'tan Poppins fontunu içe aktar */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* Genel stil */
body, html {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif; /* Poppins fontu kullanımı */
}
.header {
    position: sticky; /* Sticky özelliği */
    top: 0; /* Ekranın üst kısmına yapışmasını sağlar */
    width: 100%;
    background-color: #f0f0f0;
    z-index: 800;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #333;
    box-sizing: border-box;
}

.logo img {
    width: 130px;
    padding: 10px;
}

/* Search bar styling */
.search-container {
    position: relative;
    width: 100%;
    max-width: 600px; /* Make the search bar wider */
    margin-left: 20px;
}

#search {
    width: 100%;
    padding: 12px 40px 12px 50px; /* Space for the search icon */
    border-radius: 25px;
    border: 1px solid #ddd;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#search:focus {
    outline: none;
    border-color: #9e0000;
    box-shadow: 0 0 5px rgb(255 99 99 / 50%);
}

/* Hex kodu arama için özel stiller */
#search.hex-search {
    font-weight: bold;
    background-color: #fffacd;
    border-color: #ffeb3b;
    box-shadow: 0 0 8px rgba(255, 235, 59, 0.3);
}

#search.hex-search:focus {
    border-color: #ffeb3b;
    box-shadow: 0 0 10px rgba(255, 235, 59, 0.5);
}

#search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    opacity: 0.6;
}

/* Styling for search results */
#search-results {
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
    padding: 10px;
}

.result-item {
    padding: 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item:hover {
    background-color: #f0f0f0;
}

.result-item p {
    margin: 0;
    color: #333;
}

.menu {
    display: flex;
    gap: 15px;
    flex-wrap: wrap; /* Ekran daraldığında satırları sarsın */
}

.menu a {
    color: #333;
    text-decoration: none;
    white-space: nowrap; /* Taşma olmaması için tek satırda tut */
}
.menu a:hover {
    color: #9f0101;
    /* font-weight: bold; */
}
.hamburger {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

/* Dar ekranlarda menüyü düzenlemek için medya sorgusu */
@media (max-width: 768px) {
    .header {
        top: 0;
        width: 100%;
        background-color: #f0f0f0;
        z-index: 1000;
        padding: 24px 20px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        color: #333;
        box-sizing: border-box;
        flex-direction: column;
        height: 165px;

    }
    .menu {
        display: flex;
        gap: 15px;
        flex-wrap: wrap;
        flex-direction: column;
        align-items: center;
    }
}

.hamburger {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

/* Mobil Menü Geçiş ve Animasyon */
.mobile-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    right: 0;
    background-color: #333;
    padding: 10px 20px;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1;
}

.mobile-menu.show {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu a {
    color: #fff;
    text-decoration: none;
    padding: 10px 0;
    border-bottom: 1px solid #555;
}

.mobile-menu a:last-child {
    border-bottom: none;
}


/* Sayfa geçişi fade-in efekti */
.fade-in {
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

.fade-in.show {
    opacity: 1;
}
/* Initially hidden */
#search-results {
    display: none; /* Hide by default */
    position: absolute;
    top: 50px;
    left: 0;
    width: 100%;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
    padding: 10px;
}

.result-item {
    padding: 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item:hover {
    background-color: #f0f0f0;
}

.result-item p {
    margin: 0;
    color: #333;
}

/* Hamburger menu styles */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger div {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 4px 0;
    transition: 0.4s;
}

/* Menu styles */
.menu {
    display: flex;
    gap: 15px;
}

/* Mobile styles */
@media (max-width: 768px) {

    .menu {
        /* Initial hidden state */
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        width: 80%;
        max-width: 300px;
        background-color: #fff;
        box-shadow: 2px 0 12px rgba(0, 0, 0, 0.1);
        padding: 20px 10px;
        z-index: 999;
        transform: translateX(-100%); /* Slide off-screen */
        transition: transform 0.4s ease-in-out; /* Smooth animation */
    }
    .menu.show {
        transform: translateX(0); /* Slide into view */
    }

    /* X button for closing the menu */
    .menu .close-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        font-size: 35px;
        cursor: pointer;
    }

    /* Optional styling for menu links */
    .menu a {
        padding: 15px 0;
        color: #333;
        text-decoration: none;
        font-size: 18px;
    }

    .menu a:hover {
        color: #007BFF;
    }

    #search{
        max-width: 70%;
    }


    .hamburger {
        display: flex;
    }
}
    /* Hide close button on desktop */
    @media (min-width: 769px) {
        .menu .close-btn {
            display: none;
        }
    }
    /* Büyük ekranlar (1600px ve altı) */
@media (max-width: 1600px) {
    #search {
        width: 80%; /* Daha dar genişlik */
    }
}

/* Orta ekranlar (1024px ve altı) */
@media (max-width: 1024px) {
    #search {
        width: 70%; /* Orta boy ekranlar için */
    }
}

/* Küçük ekranlar (768px ve altı) */
@media (max-width: 768px) {
    #search {
        width: 90%; /* Mobilde neredeyse tam genişlik */
    }
    
    #search-results {
        position: fixed !important;
        top: 120px !important;
        left: 10px !important;
        right: 10px !important;
        width: calc(100% - 20px) !important;
        max-height: 300px !important;
        z-index: 9999 !important;
        box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
        background: white !important;
        border: 1px solid #ddd !important;
        border-radius: 10px !important;
        overflow-y: auto !important;
    }
    
    .result-item {
        padding: 15px !important;
        border-bottom: 1px solid #f0f0f0 !important;
        display: block !important;
    }
    
    .result-item:last-child {
        border-bottom: none !important;
    }
    
    .search-result-content {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
    }
    
    .search-result-info {
        flex: 1 !important;
        min-width: 0 !important;
    }
    
    .search-result-colors {
        display: flex !important;
        gap: 5px !important;
        flex-shrink: 0 !important;
        margin-left: 10px !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
    }
}

