﻿:root {
    --primary: #5e324f;
    --primary-dark: #4a253e;
    --primary-light: #7d4268;
    --secondary: black;
    --accent: #d946ef;
    --success: #10b981;
    --danger: #ef4444;
    --dark: #1f2937;
    --light: #f8fafc;
    --white: #ffffff;
    --gradient: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    --shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}

* {
    font-family: 'Inter', sans-serif;
}

body {
    background: #fafbfc;
}

/* Compact Header */
.compact-header {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

    .compact-header .navbar {
        padding: 0.5rem 0;
        min-height: 60px;
    }

/* ==================== CATEGORIES DROPDOWN ==================== */
.categories-dropdown {
    position: relative;
    margin-right: 1rem;
}

.categories-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: var(--primary);
    color: white !important;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 2px solid var(--primary);
}

    .categories-toggle:hover {
        background: var(--primary-dark);
        border-color: var(--primary-dark);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(94, 50, 79, 0.2);
    }

    .categories-toggle i {
        font-size: 1rem;
    }

.categories-text {
    font-weight: 600;
}

.dropdown-menu-categories {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: 12px;
    min-width: 260px;
    padding: 0.75rem;
    margin-top: 0.5rem;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: auto !important;
    transform: none !important;
    z-index: 1050;
    background: white;
    display: none;
}

    .dropdown-menu-categories.show {
        display: block;
        animation: slideDown 0.3s ease;
    }

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-menu-categories .dropdown-item-compact {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    color: #6b7280;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 0.9rem;
    font-weight: 500;
}

    .dropdown-menu-categories .dropdown-item-compact:hover {
        background: linear-gradient(135deg, rgba(94, 50, 79, 0.1) 0%, rgba(125, 66, 104, 0.15) 100%);
        color: var(--primary);
        transform: translateX(4px);
    }

    .dropdown-menu-categories .dropdown-item-compact i {
        width: 18px;
        font-size: 0.95rem;
        color: var(--primary);
    }

.dropdown-menu-categories .dropdown-divider {
    margin: 0.5rem 0;
    border-color: #e5e7eb;
}

/* Enhanced Brand Styles */
.navbar-brand-compact {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(94, 50, 79, 0.1);
    box-shadow: 0 8px 32px rgba(94, 50, 79, 0.1), 0 2px 8px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

    .navbar-brand-compact:hover {
        transform: translateY(-3px) scale(1.02);
        box-shadow: 0 20px 40px rgba(94, 50, 79, 0.3), 0 8px 16px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.9);
        border-color: var(--primary);
        text-decoration: none;
    }

    .navbar-brand-compact::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
        border-radius: 14px;
        opacity: 0;
        transition: opacity 0.4s ease;
        z-index: 1;
    }

    .navbar-brand-compact:hover::before {
        opacity: 0.08;
    }

    .navbar-brand-compact::after {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.3) 50%, transparent 70%);
        transform: rotate(45deg);
        transition: all 0.6s ease;
        z-index: 2;
        opacity: 0;
    }

    .navbar-brand-compact:hover::after {
        animation: shimmer 0.8s ease-out;
    }

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
        opacity: 0;
    }
}

.brand-gem {
    font-size: 28px;
    color: var(--primary);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 3;
    filter: drop-shadow(0 3px 6px rgba(94, 50, 79, 0.1));
}

    .brand-gem::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 140%;
        height: 140%;
        background: radial-gradient(circle, rgba(157, 112, 137, 0.3) 0%, transparent 70%);
        border-radius: 50%;
        transform: translate(-50%, -50%) scale(0);
        transition: transform 0.4s ease;
        z-index: -1;
    }

.navbar-brand-compact:hover .brand-gem {
    transform: rotate(15deg) scale(1.15);
    color: var(--primary-dark);
    filter: drop-shadow(0 6px 12px rgba(94, 50, 79, 0.3));
}

    .navbar-brand-compact:hover .brand-gem::before {
        transform: translate(-50%, -50%) scale(1);
    }

.brand-name {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.5px;
    position: relative;
    z-index: 3;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-shadow: 0 2px 4px rgba(94, 50, 79, 0.1);
}

    .brand-name::before {
        content: attr(data-text);
        position: absolute;
        top: 0;
        left: 0;
        color: var(--primary-light);
        z-index: -1;
        opacity: 0;
        transform: translateY(2px);
        transition: all 0.3s ease;
    }

.navbar-brand-compact:hover .brand-name {
    color: var(--primary-dark);
    text-shadow: 0 4px 8px rgba(94, 50, 79, 0.3);
    transform: translateY(-1px);
}

    .navbar-brand-compact:hover .brand-name::before {
        opacity: 0.3;
        transform: translateY(4px);
    }

/* Navigation Links */
.nav-link-compact {
    color: #6b7280;
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

    .nav-link-compact:hover {
        color: var(--primary);
        background: rgba(94, 50, 79, 0.1);
    }

    .nav-link-compact i {
        font-size: 0.85rem;
        opacity: 0.8;
    }

/* Mobile Toggle */
.navbar-toggler {
    border: none;
    background: none;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

    .navbar-toggler:focus {
        box-shadow: 0 0 0 2px rgba(94, 50, 79, 0.2);
    }

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2894, 50, 79, 1%29' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M7 10l8 8 8-8'/%3e%3c/svg%3e");
}

/* Search */
.search-form-compact {
    display: flex;
    background: #f3f4f6;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    margin-right: 0.5rem;
}

    .search-form-compact:focus-within {
        border-color: var(--primary);
        background: white;
        box-shadow: 0 0 0 2px rgba(94, 50, 79, 0.1);
    }

.search-input-compact {
    border: none;
    background: transparent;
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
    outline: none;
    width: 180px;
}

.search-btn-compact {
    background: var(--primary);
    border: none;
    color: white;
    padding: 0.4rem 0.75rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

    .search-btn-compact:hover {
        background: var(--primary-light);
    }

/* Cart */
.cart-link-compact {
    position: relative;
}

.cart-badge-compact {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--secondary);
    color: var(--white);
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-menu-compact {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: 8px;
    min-width: 200px;
    padding: 0.5rem;
    margin-top: 0.25rem;
    position: absolute !important;
    top: 100% !important;
    left: auto !important;
    right: 0 !important;
    transform: none !important;
    z-index: 1050;
    background: white;
    display: none;
}

    .dropdown-menu-compact.show {
        display: block;
    }

.dropdown-item-compact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    color: #6b7280;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 0.85rem;
}

    .dropdown-item-compact:hover {
        background: rgba(94, 50, 79, 0.1);
        color: var(--primary);
    }

    .dropdown-item-compact i {
        width: 14px;
        font-size: 0.8rem;
    }

.admin-link {
    color: var(--secondary) !important;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #ef4444 !important;
}

/* Footer */
/* Footer */
.footer-compact {
    background: linear-gradient(135deg, #f8f9fa 0%, #f3f4f6 100%);
    margin-top: 3rem;
    padding: 2.5rem 0 1.5rem;
    border-top: 2px solid #e5e7eb;
}

    .footer-compact h6 {
        color: var(--primary);
        font-weight: 700;
        font-size: 1rem;
        margin-bottom: 1.2rem;
        letter-spacing: 0.3px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
    }

        .footer-compact h6 i {
            color: var(--primary);
            font-size: 1rem;
        }

    .footer-compact p {
        color: #6b7280;
        line-height: 1.6;
    }

    .footer-compact ul {
        padding-left: 0;
        list-style: none;
    }

        .footer-compact ul li {
            margin-bottom: 0.6rem;
            color: #6b7280;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            font-size: 0.9rem;
        }

            .footer-compact ul li i {
                color: var(--primary);
                width: 18px;
                font-size: 0.9rem;
                margin-right: 0;
            }

    .footer-compact a {
        color: #6b7280;
        text-decoration: none;
        transition: all 0.3s ease;
        position: relative;
        padding-bottom: 2px;
    }

        .footer-compact a:hover {
            color: var(--primary) !important;
            transform: translateX(3px);
        }

        .footer-compact a::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 0;
            height: 1px;
            background: var(--primary);
            transition: width 0.3s ease;
        }

        .footer-compact a:hover::after {
            width: 100%;
        }

    .footer-compact hr {
        margin: 2rem auto 1.5rem;
        border: none;
        height: 1px;
        background: linear-gradient(to right, transparent, #d1d5db, transparent);
        max-width: 80%;
    }

    .footer-compact .text-center:last-child p {
        color: #9ca3af;
        font-size: 0.85rem;
        font-weight: 500;
    }

/* Responsive Footer */


/* Active Navigation */
.nav-item.active .nav-link-compact {
    color: var(--primary);
    background: rgba(94, 50, 79, 0.1);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 991.98px) {
    .navbar-collapse {
        margin-top: 0.5rem;
        padding-top: 0.5rem;
        border-top: 1px solid #e5e7eb;
        position: relative;
    }

    .navbar-nav {
        flex-direction: row !important;
        flex-wrap: wrap;
        gap: 0.25rem;
        align-items: center;
    }

    .nav-item {
        flex: 0 0 auto;
    }

    .nav-link-compact {
        padding: 0.4rem 0.6rem;
        border-radius: 6px;
        margin: 0;
        font-size: 0.8rem;
        white-space: nowrap;
    }

    /* Категории dropdown на мобилен */
    .categories-dropdown {
        order: -1;
        margin-right: 0.5rem;
        margin-bottom: 0.5rem;
    }

    .categories-toggle {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }

        .categories-toggle .categories-text {
            display: inline;
        }

    .dropdown-menu-categories {
        min-width: 220px;
        max-width: calc(100vw - 40px);
    }

    /* Търсачка заема цял ред - първа */
    .nav-item:has(.search-form-compact) {
        flex: 1 1 100%;
        order: 1;
        margin-bottom: 0.5rem;
    }

    .search-form-compact {
        margin: 0 auto;
        width: 100%;
        max-width: 300px;
    }

    .search-input-compact {
        width: 100%;
        flex: 1;
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
    }

    .search-btn-compact {
        padding: 0.5rem 0.75rem;
    }

    /* Количка винаги отдясно */
    .nav-item:has(.cart-link-compact) {
        order: 10;
        margin-left: auto;
    }

    .cart-link-compact {
        display: flex;
        align-items: center;
        gap: 0.3rem;
    }

    /* User dropdown също отдясно, преди количката */
    .nav-item.dropdown:not(.categories-dropdown) {
        order: 9;
        position: relative !important;
    }

    /* Login бутон отдясно */
    .nav-item:has([href*="Login"]) {
        order: 8;
    }

    /* Register бутон отдясно */
    .nav-item:has([href*="Register"]) {
        order: 7;
    }

    /* Dropdown menu - ОТВАРЯ СЕ НАДЯСНО ОТ ИКОНАТА */
    .dropdown-menu-compact {
        position: absolute !important;
        top: calc(100% + 0.25rem) !important;
        left: 0 !important;
        right: auto !important;
        min-width: 200px;
        max-width: calc(100vw - 40px);
        margin-top: 0;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
        border: 1px solid #e5e7eb;
        z-index: 1060;
        transform: none !important;
    }

    /* Осигуряваме, че navbar collapse не ограничава менюто */
    .navbar-collapse {
        overflow: visible !important;
        position: relative;
    }

    /* Container също не ограничава */
    .navbar > .container-fluid {
        position: relative;
        overflow: visible !important;
    }
}

@media (max-width: 768px) {
    .navbar-brand-compact {
        padding: 8px 12px;
        gap: 0.5rem;
        font-size: 1rem;
        border-radius: 12px;
    }

    .brand-gem {
        font-size: 20px;
    }

    .brand-name {
        font-size: 16px;
        letter-spacing: -0.25px;
    }

    .navbar-brand-compact:hover {
        transform: translateY(-2px) scale(1.01);
    }

        .navbar-brand-compact:hover .brand-gem {
            transform: rotate(10deg) scale(1.1);
        }

    .nav-link-compact {
        padding: 0.75rem;
        border-bottom: 1px solid #f3f4f6;
    }

    .dropdown-menu-compact {
        min-width: 200px;
        font-size: 0.9rem;
    }

    .dropdown-item-compact {
        padding: 0.6rem 0.75rem;
    }

    /* Категории на таблет */
    .categories-toggle {
        padding: 0.45rem 0.7rem;
        font-size: 0.8rem;
    }

        .categories-toggle .categories-text {
            font-size: 0.8rem;
        }

    .dropdown-menu-categories {
        min-width: 200px;
        font-size: 0.85rem;
    }

        .dropdown-menu-categories .dropdown-item-compact {
            padding: 0.6rem 0.85rem;
            font-size: 0.85rem;
        }
}

@media (max-width: 576px) {
    .navbar-brand-compact {
        padding: 6px 10px;
        gap: 0.4rem;
    }

    .brand-gem {
        font-size: 18px;
    }

    .brand-name {
        font-size: 15px;
    }

    .search-input-compact {
        width: 120px;
    }

    .compact-header .navbar {
        padding: 0.4rem 0;
    }

    .navbar-nav {
        gap: 0.15rem;
    }

    .nav-link-compact {
        padding: 0.35rem 0.5rem;
        font-size: 0.75rem;
    }

        .nav-link-compact i {
            font-size: 0.9rem;
        }

    .search-form-compact {
        max-width: 250px;
    }

    .search-input-compact {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }

    .search-btn-compact {
        padding: 0.4rem 0.6rem;
    }

    /* Категории на малък телефон */
    .categories-dropdown {
        margin-right: 0.3rem;
    }

    .categories-toggle {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }

        .categories-toggle .categories-text {
            font-size: 0.75rem;
        }

        .categories-toggle i {
            font-size: 0.9rem;
        }

    .dropdown-menu-categories {
        min-width: 180px;
        max-width: calc(100vw - 30px);
        font-size: 0.8rem;
        padding: 0.6rem;
    }

        .dropdown-menu-categories .dropdown-item-compact {
            padding: 0.5rem 0.7rem;
            font-size: 0.8rem;
        }

            .dropdown-menu-categories .dropdown-item-compact i {
                width: 16px;
                font-size: 0.85rem;
            }

    /* Dropdown за много малки екрани */
    .dropdown-menu-compact {
        min-width: 180px;
        max-width: calc(100vw - 30px);
        font-size: 0.85rem;
    }

    .dropdown-item-compact {
        padding: 0.5rem 0.7rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 375px) {
    .navbar-brand-compact {
        padding: 5px 8px;
        gap: 0.3rem;
    }

    .brand-gem {
        font-size: 16px;
    }

    .brand-name {
        font-size: 14px;
    }

    .navbar-nav {
        justify-content: center;
        gap: 0.1rem;
    }

    .nav-link-compact {
        padding: 0.3rem 0.4rem;
        font-size: 0.7rem;
    }

        .nav-link-compact i {
            font-size: 0.85rem;
        }

    .search-form-compact {
        max-width: 200px;
    }

    /* Категории на най-малък екран */
    .categories-toggle {
        padding: 0.35rem 0.5rem;
        font-size: 0.7rem;
    }

        .categories-toggle .categories-text {
            font-size: 0.7rem;
        }

        .categories-toggle i {
            font-size: 0.85rem;
        }

    .dropdown-menu-categories {
        min-width: 160px;
        max-width: calc(100vw - 25px);
        font-size: 0.75rem;
        padding: 0.5rem;
    }

        .dropdown-menu-categories .dropdown-item-compact {
            padding: 0.45rem 0.6rem;
            font-size: 0.75rem;
        }

            .dropdown-menu-categories .dropdown-item-compact i {
                width: 14px;
                font-size: 0.8rem;
            }

    /* Dropdown за най-малки екрани */
    .dropdown-menu-compact {
        min-width: 160px;
        max-width: calc(100vw - 25px);
        font-size: 0.8rem;
    }

    .dropdown-item-compact {
        padding: 0.45rem 0.6rem;
        font-size: 0.8rem;
    }
}
@media (max-width: 768px) {
    .footer-compact {
        padding: 2rem 0 1.2rem;
    }

        .footer-compact h6 {
            font-size: 0.95rem;
            margin-bottom: 1rem;
        }

        .footer-compact ul li {
            font-size: 0.85rem;
            margin-bottom: 0.5rem;
        }

        .footer-compact .col-md-4 {
            margin-bottom: 1.5rem !important;
        }
}

@media (max-width: 576px) {
    .footer-compact {
        padding: 1.5rem 0 1rem;
    }

        .footer-compact h6 {
            font-size: 0.9rem;
        }

        .footer-compact ul li {
            font-size: 0.8rem;
        }

        .footer-compact hr {
            margin: 1.5rem auto 1rem;
        }
}
