/*
    Author: GameKing
    Whatsapp: (077) 537-64-93
    Note: Funksiyanin her hansi bir yerini kopya edene ve ya icazesiz istifade edib-satana halalliq verilmir!..
*/

/** {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}*/

/*body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}*/

html {
    font-size: 12px;
}

/* Navbar Styles */
/*.navbar-search {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}*/

/*.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}*/

#searchInput {
    border: initial;
    outline: initial;
    -webkit-box-shadow: initial;
    -moz-box-shadow: initial;
    box-shadow: initial;
    font-size: initial;
    line-height: initial;
    border-radius: initial;
    padding: initial;
    width: initial;
    background: initial;
    color: initial;
}

#searchInput::placeholder {
    font-size  : initial;
    font-weight: initial;
    line-height: initial;
    color: initial;
}

.search-btn, .close-btn, .page-btn {
    font-weight       : initial;
    font-size         : initial;
    line-height       : initial;
    background-color  : initial;
    color             : initial;
    border-radius     : initial;
    padding           : initial;
    border            : initial;
    display           : initial;
    -webkit-appearance: initial;
    -webkit-transition: initial;
    -moz-transition   : initial;
    transition        : initial;
}

.search-btn:hover, .close-btn:hover, .page-btn:hover,
.search-btn:focus, .close-btn:focus, .page-btn:focus
{
    outline: initial;
    border: initial;
    color: initial;
    /* background: initial; */
}

.search-btn {
    background: linear-gradient(45deg, #6345ED, #DC39FC);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

/* Modal Styles */
.search-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 999999;
    animation: fadeIn 0.3s ease;
}

.search-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.search-modal-header {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-modal-header h3 {
    font-size: initial;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Search Box */
.search-container {
    padding: 2rem;
    background: white;
}

.search-box {
    position: relative;
    background: #f8f9fa;
    border-radius: 50px;
    padding: 1rem 1.5rem;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-icon {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

#searchInput {
    border: none;
    background: none;
    width: 100%;
    padding-left: 2rem;
    font-size: 1.2rem;
    outline: none;
    color: #333;
    font-weight: bold;
}

/* Products Container */
.products-container {
    background: white;
    max-height: 230px;
    overflow-y: auto;
    padding: 0 2rem 2rem;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

.loading i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.product-card {
    background: white;
    border-radius: 15px;
    padding: 1rem;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.product-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.product-image {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
    background: #f8f9fa;
}

.product-info h4 {
    color: #333;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.stock-code {
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.product-details {
    margin-top: 0.5rem;
}

.category {
    color: #6c757d;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.price {
    color: #28a745;
    font-weight: bold;
    font-size: 1.1rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.page-btn {
    background: #f8f9fa;
    color: #333333;
    border: 1px solid #dee2e6;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.page-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.page-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, -30%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .search-container {
        padding: 1rem;
    }

    .products-container {
        padding: 0 1rem 1rem;
    }

    .search-modal-content {
        max-height: 100vh;
    }

    .search-btn {
        width: 35px;
        height: 35px;
    }
}