/* ============================================
   MODERN MOBILE SIDEBAR MENU - Sağdan Açılır
   ============================================ */

/* Sidebar Container */
.mobile-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow-y: auto;
    overflow-x: hidden;
}

.mobile-sidebar.active {
    right: 0;
}

/* Scrollbar Styling */
.mobile-sidebar::-webkit-scrollbar {
    width: 6px;
}

.mobile-sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.mobile-sidebar::-webkit-scrollbar-thumb {
    background: rgba(196, 30, 58, 0.7);
    border-radius: 10px;
}

.mobile-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(196, 30, 58, 1);
}

/* Sidebar Header */
.mobile-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(
        135deg,
        rgba(196, 30, 58, 0.2) 0%,
        rgba(196, 30, 58, 0.05) 100%
    );
    border-bottom: 2px solid rgba(196, 30, 58, 0.3);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.sidebar-logo {
    display: block;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.sidebar-logo:hover {
    transform: scale(1.05);
}

.sidebar-logo:active {
    transform: scale(0.95);
}

.sidebar-logo img {
    height: 35px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(196, 30, 58, 0.3));
    padding: 5px 10px;
    background: linear-gradient(135deg, #f7d7d7 0%, #f5f1f1 100%);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.sidebar-logo:hover img {
    filter: drop-shadow(0 4px 12px rgba(196, 30, 58, 0.5));
}

.sidebar-close-btn {
    background: rgba(196, 30, 58, 0.2);
    border: 1px solid rgba(196, 30, 58, 0.5);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 20px;
}

.sidebar-close-btn:hover {
    background: rgba(196, 30, 58, 0.5);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 0 15px rgba(196, 30, 58, 0.5);
}

/* Sidebar Content */
.mobile-sidebar-content {
    padding: 15px;
}

/* Search Section */
.sidebar-search-section {
    margin-bottom: 20px;
}

.sidebar-search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(196, 30, 58, 0.3);
    border-radius: 25px;
    padding: 12px 20px;
    transition: all 0.3s ease;
}

.sidebar-search-box:focus-within {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(196, 30, 58, 0.6);
    box-shadow: 0 0 15px rgba(196, 30, 58, 0.3);
}

.sidebar-search-box i {
    color: rgba(196, 30, 58, 0.8);
    margin-right: 10px;
    font-size: 16px;
}

.sidebar-search-box input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 14px;
    font-weight: 400;
}

.sidebar-search-box input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Sidebar Navigation */
.sidebar-nav {
    margin-top: 10px;
}

.sidebar-menu-item {
    margin-bottom: 8px;
}

/* Menu Toggle Button */
.sidebar-menu-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px 16px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 15px;
    font-weight: 500;
}

.sidebar-menu-toggle:hover {
    background: rgba(196, 30, 58, 0.2);
    border-color: rgba(196, 30, 58, 0.5);
    transform: translateX(-3px);
    box-shadow: 3px 0 10px rgba(196, 30, 58, 0.3);
}

.sidebar-menu-toggle.active {
    background: rgba(196, 30, 58, 0.3);
    border-color: rgba(196, 30, 58, 0.6);
}

.menu-item-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-item-content i {
    font-size: 18px;
    color: rgba(196, 30, 58, 0.9);
    width: 20px;
    text-align: center;
}

.toggle-icon {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    transition: transform 0.3s ease;
}

.sidebar-menu-toggle.active .toggle-icon {
    transform: rotate(180deg);
    color: rgba(196, 30, 58, 1);
}

/* Menu Link (without submenu) */
.sidebar-menu-link {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px 16px;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 15px;
    font-weight: 500;
}

.sidebar-menu-link:hover {
    background: rgba(196, 30, 58, 0.2);
    border-color: rgba(196, 30, 58, 0.5);
    color: #fff;
    transform: translateX(-3px);
    box-shadow: 3px 0 10px rgba(196, 30, 58, 0.3);
}

.sidebar-menu-link .menu-item-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-menu-link .menu-item-content i {
    font-size: 18px;
    color: rgba(196, 30, 58, 0.9);
    width: 20px;
    text-align: center;
}

/* Badge */
.sidebar-badge {
    background: linear-gradient(
        135deg,
        rgba(196, 30, 58, 0.9),
        rgba(196, 30, 58, 0.7)
    );
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(196, 30, 58, 0.4);
}

/* Submenu */
.sidebar-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 8px;
    padding-left: 10px;
}

.sidebar-submenu.active {
    max-height: 1000px;
}

.submenu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 400;
    background: rgba(255, 255, 255, 0.03);
    margin-bottom: 6px;
    border: 1px solid transparent;
}

.submenu-item:hover {
    background: rgba(196, 30, 58, 0.15);
    color: #fff;
    transform: translateX(5px);
    border-color: rgba(196, 30, 58, 0.3);
    box-shadow: 0 2px 8px rgba(196, 30, 58, 0.2);
}

.submenu-item i {
    font-size: 16px;
    color: rgba(196, 30, 58, 0.7);
    width: 18px;
    text-align: center;
}

/* Submenu Category */
.submenu-category {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.submenu-category-title {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    color: rgba(196, 30, 58, 1);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.submenu-category-title i {
    font-size: 14px;
}

.submenu-item.sub-item {
    padding-left: 24px;
    background: rgba(255, 255, 255, 0.02);
    font-size: 13px;
}

.submenu-item.sub-item:hover {
    padding-left: 30px;
}

/* Sidebar Footer */
.sidebar-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-contact-info {
    margin-bottom: 20px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 13px;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-bottom: 8px;
}

.contact-link:hover {
    background: rgba(196, 30, 58, 0.1);
    color: #fff;
    transform: translateX(5px);
}

.contact-link i {
    color: rgba(196, 30, 58, 0.8);
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* Social Links */
.sidebar-social {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 15px 0;
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(196, 30, 58, 0.3);
    border-radius: 50%;
    color: rgba(196, 30, 58, 0.9);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 16px;
}

.social-link:hover {
    background: rgba(196, 30, 58, 0.3);
    color: #fff;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 5px 15px rgba(196, 30, 58, 0.4);
}

/* Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Responsive */
@media (max-width: 576px) {
    .mobile-sidebar {
        width: 100%;
        max-width: 100%;
    }

    .sidebar-close-btn {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .sidebar-logo img {
        height: 32px;
    }

    .mobile-sidebar-header {
        padding: 12px 15px;
    }
}

/* Animasyonlar */
@keyframes slideInRight {
    from {
        right: -100%;
    }
    to {
        right: 0;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ============================================
   SIDEBAR SEARCH RESULTS - Sidebar içinde
   ============================================ */

.sidebar-search-loading {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(196, 30, 58, 0.8);
    font-size: 16px;
}

.sidebar-search-results {
    margin-top: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(196, 30, 58, 0.3);
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.sidebar-search-results::-webkit-scrollbar {
    width: 6px;
}

.sidebar-search-results::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.sidebar-search-results::-webkit-scrollbar-thumb {
    background: rgba(196, 30, 58, 0.7);
    border-radius: 10px;
}

.sidebar-search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: rgba(196, 30, 58, 0.2);
    border-bottom: 1px solid rgba(196, 30, 58, 0.3);
    border-radius: 12px 12px 0 0;
    position: sticky;
    top: 0;
    z-index: 5;
}

.results-title {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.results-close-btn {
    background: rgba(196, 30, 58, 0.3);
    border: 1px solid rgba(196, 30, 58, 0.5);
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.results-close-btn:hover {
    background: rgba(196, 30, 58, 0.5);
    transform: rotate(90deg) scale(1.1);
}

.sidebar-search-results-list {
    padding: 10px;
}

.sidebar-search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-bottom: 10px;
    text-decoration: none;
    color: #fff;
    transition: all 0.3s ease;
}

.sidebar-search-result-item:hover {
    background: rgba(196, 30, 58, 0.2);
    border-color: rgba(196, 30, 58, 0.5);
    transform: translateX(-5px);
    box-shadow: 5px 0 15px rgba(196, 30, 58, 0.3);
}

.sidebar-result-image {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-result-info {
    flex: 1;
    min-width: 0;
}

.sidebar-result-info h4 {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-code {
    font-size: 11px;
    color: rgba(196, 30, 58, 0.9);
    font-weight: 600;
    margin: 0 0 3px 0;
}

.result-type {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 5px 0;
}

.result-price {
    font-size: 12px;
    font-weight: 700;
    color: rgba(196, 30, 58, 1);
}

.sidebar-search-no-results,
.sidebar-search-error {
    text-align: center;
    padding: 30px 20px;
    color: rgba(255, 255, 255, 0.6);
}

.sidebar-search-no-results i,
.sidebar-search-error i {
    font-size: 36px;
    color: rgba(196, 30, 58, 0.5);
    margin-bottom: 12px;
    display: block;
}

.sidebar-search-no-results p,
.sidebar-search-error p {
    font-size: 13px;
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
}
