/* Modern Search Modal - Apple tarzı minimal tasarım */
/* Custom CSS - Bootstrap ile çakışmayacak şekilde özel prefix kullanıldı */

.gn-search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: none;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gn-search-modal.active {
    display: block;
    opacity: 1;
}

.gn-search-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gn-search-modal.active .gn-search-backdrop {
    opacity: 1;
}

.gn-search-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
}

.gn-search-box {
    position: relative;
    width: 100%;
    max-width: 600px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transform: translateY(-30px) scale(0.92);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), 
                opacity 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gn-search-modal.active .gn-search-box {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.gn-search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
}

.gn-search-icon {
    color: #8b8b8b;
    font-size: 20px;
    margin-right: 16px;
    flex-shrink: 0;
}

.gn-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 18px;
    font-weight: 400;
    color: #1d1d1f;
    background: transparent;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.5;
}

.gn-search-input::placeholder {
    color: #8b8b8b;
    font-weight: 400;
}

.gn-search-close {
    background: none;
    border: none;
    color: #8b8b8b;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    margin-left: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
}

.gn-search-close:hover {
    background: #f5f5f5;
    color: #1d1d1f;
}

.gn-search-results {
    max-height: 60vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.gn-search-results::-webkit-scrollbar {
    width: 8px;
}

.gn-search-results::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.gn-search-results::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 4px;
}

.gn-search-results::-webkit-scrollbar-thumb:hover {
    background: #b0b0b0;
}

.gn-search-result-item {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    text-decoration: none;
    color: #1d1d1f;
    border-bottom: 1px solid #f5f5f5;
    transition: background-color 0.15s ease;
    cursor: pointer;
}

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

.gn-search-result-item:hover {
    background-color: #f9f9f9;
}

.gn-search-result-item:active {
    background-color: #f0f0f0;
}

.gn-search-result-image {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
    margin-right: 16px;
    flex-shrink: 0;
    background: #f9f9f9;
    padding: 4px;
    box-sizing: border-box;
}

.gn-search-result-content {
    flex: 1;
    min-width: 0;
}

.gn-search-result-title {
    font-size: 15px;
    font-weight: 500;
    color: #1d1d1f;
    margin: 0 0 6px 0;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.gn-search-result-price {
    font-size: 14px;
    font-weight: 600;
    color: #4CAF50;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.gn-search-result-price-discount {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.gn-search-result-price-old {
    font-size: 13px;
    color: #8b8b8b;
    text-decoration: line-through;
    font-weight: 400;
}

.gn-search-result-price-new {
    font-size: 14px;
    font-weight: 600;
    color: #4CAF50;
}

.gn-search-no-results {
    padding: 40px 24px;
    text-align: center;
    color: #8b8b8b;
    font-size: 15px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.gn-search-loading {
    padding: 40px 24px;
    text-align: center;
    color: #8b8b8b;
    font-size: 15px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.gn-search-loading::after {
    content: '...';
    animation: gn-search-dots 1.5s steps(4, end) infinite;
}

@keyframes gn-search-dots {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60%, 100% {
        content: '...';
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .gn-search-container {
        padding-top: 10vh;
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .gn-search-box {
        border-radius: 12px;
        max-width: 100%;
    }
    
    .gn-search-input-wrapper {
        padding: 16px 20px;
    }
    
    .gn-search-input {
        font-size: 16px;
    }
    
    .gn-search-icon {
        font-size: 18px;
        margin-right: 12px;
    }
    
    .gn-search-result-item {
        padding: 14px 20px;
    }
    
    .gn-search-result-image {
        width: 50px;
        height: 50px;
        margin-right: 12px;
    }
    
    .gn-search-result-title {
        font-size: 14px;
    }
    
    .gn-search-result-price {
        font-size: 13px;
    }
    
    .gn-search-results {
        max-height: 70vh;
    }
}

/* Tablet responsive */
@media (min-width: 769px) and (max-width: 1024px) {
    .gn-search-container {
        padding-top: 12vh;
    }
    
    .gn-search-box {
        max-width: 700px;
    }
}

/* Body blur efekti için */
body.gn-search-blur {
    overflow: hidden;
}

body.gn-search-blur > *:not(.gn-search-modal) {
    filter: blur(3px);
    transition: filter 0.3s ease;
    will-change: filter;
}

/* Modal açılırken body blur'u hemen uygula */
body.gn-search-blur > *:not(.gn-search-modal) {
    filter: blur(3px) !important;
}

