/* ===================================
   CSS VARIABLES
   =================================== */
:root {
    --primary-color: rgb(200, 106, 226);
    --primary-light: rgba(200, 106, 226, 0.1);
    --primary-dark: rgba(200, 106, 226, 0.9);
    --text-dark: #333;
    --text-light: #666;
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 6px 20px rgba(0, 0, 0, 0.2);
    --transition: all 0.3s ease;
}

/* ===================================
   NAVBAR BASE STYLES
   =================================== */
.navbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 60px;
    z-index: 1051 !important;
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(139, 92, 246, 0.08);
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
    transition: var(--transition);
}

.navbar.scrolled {
    height: 55px;
    box-shadow: 0 3px 20px rgba(139, 92, 246, 0.12);
}

body {
    padding-top: 60px !important;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

.navbar .container-fluid {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    padding: 0 1rem;
}

/* ===================================
   LOGO STYLING
   =================================== */
.navbar-logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 50%;
    padding: 5px;
    box-shadow: 0 4px 15px rgba(200, 106, 226, 0.3);
    height: 120px;
    width: 120px;
    z-index: 1052;
    transition: var(--transition);
    border: 2px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.navbar-logo:hover {
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 0 6px 20px rgba(200, 106, 226, 0.4);
}

.navbar-logo a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.navbar-logo img {
    max-width: 90%;
    padding-top: 20px;
    height: auto;
    display: block;
}

/* ===================================
   DESKTOP NAVIGATION
   =================================== */
.desktop-nav {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1051;
}

.nav-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* ===================================
   ICON BUTTONS
   =================================== */
.nav-icon-btn {
    background: none;
    border: none;
    color: var(--text-dark);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: var(--transition);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.nav-icon-btn:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

.cart-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--primary-color);
    color: white;
    font-size: 0.65rem;
    font-weight: bold;
    border-radius: 10px;
    padding: 2px 5px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===================================
   SEARCH BAR
   =================================== */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 250px;
    padding: 0.6rem 2.5rem 0.6rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    font-size: 0.9rem;
    transition: var(--transition);
    outline: none;
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.search-btn {
    position: absolute;
    right: 5px;
    background: var(--primary-color);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.search-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    max-height: 400px;
    overflow-y: auto;
    margin-top: 0.5rem;
    display: none;
    z-index: 1053;
}

.search-results.show {
    display: block;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-dark);
    transition: var(--transition);
}

.search-result-item:hover {
    background: var(--primary-light);
}

.search-result-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
}

.search-result-info {
    flex: 1;
}

.search-result-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.search-result-category {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.search-result-price {
    color: var(--primary-color);
    font-weight: 600;
}

.search-no-results,
.search-loading {
    padding: 2rem;
    text-align: center;
    color: var(--text-light);
}

.search-no-results i,
.search-loading i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

/* ===================================
   HAMBURGER MENU
   =================================== */
.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 22px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1053;
}

.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background: var(--text-dark);
    border-radius: 3px;
    transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: translateY(9.5px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-9.5px) rotate(-45deg);
}

/* ===================================
   MOBILE DROPDOWN MENU
   =================================== */
.mobile-dropdown {
    position: fixed;
    top: 60px;
    left: 0;
    width: 280px;
    height: calc(100vh - 60px);
    background: white;
    box-shadow: var(--shadow-lg);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1050;
    overflow-y: auto;
}

.mobile-dropdown.show {
    transform: translateX(0);
}

.mobile-menu {
    padding: 1rem 0;
}

.mobile-menu-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.mobile-menu-link:hover {
    background: var(--primary-light);
    color: var(--primary-color);
}

.mobile-menu-link i {
    font-size: 1.2rem;
    width: 25px;
}

.mobile-menu-divider {
    margin: 1rem 0;
    border-color: var(--border-color);
}

/* ===================================
   MOBILE SEARCH OVERLAY
   =================================== */
.mobile-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 1060;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.mobile-search-overlay.show {
    transform: translateY(0);
}

.mobile-search-container {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.mobile-search-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.mobile-search-header .search-input {
    flex: 1;
    width: auto;
}

.mobile-search-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-dark);
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-search-overlay .search-results {
    position: static;
    flex: 1;
    max-height: none;
    box-shadow: none;
    border-radius: 0;
    margin-top: 0;
    display: block;
}

/* ===================================
   BACKDROPS
   =================================== */
.mobile-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1049;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-backdrop.show {
    opacity: 1;
    visibility: visible;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 768px) {
    .navbar {
        height: 55px;
    }
    
    body {
        padding-top: 55px !important;
    }
    
    .navbar-logo {
        height: 80px;
        width: 80px;
        padding: 3px;
    }
    
    .navbar-logo img {
        max-width: 90%;
        padding-top: 10px;
        height: auto;
        display: block;
    }
}

/* ===================================
   ANIMATIONS
   =================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

/* ===================================
   ACCESSIBILITY
   =================================== */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 9999;
}

.skip-link:focus {
    top: 0;
}

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}