﻿/* SnowStore Enhanced CSS - Modern Winter Theme */
:root {
    --snow-blue: #4A90E2;
    --ice-blue: #7FB3D3;
    --frost-white: #F8FAFB;
    --winter-gray: #E8F4F8;
    --deep-blue: #2C5282;
    --accent-cyan: #00B4D8;
    --text-dark: #2D3748;
    --snow-shadow: rgba(116, 185, 255, 0.2);
    --gradient-primary: linear-gradient(135deg, #4A90E2, #7FB3D3);
    --gradient-secondary: linear-gradient(135deg, #E8F4F8, #F8FAFB);
    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.18);
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Styles */
* {
    box-sizing: border-box;
}

body {
    background: var(--gradient-secondary);
    color: var(--text-dark);
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    position: relative;
    line-height: 1.6;
    overflow-x: hidden;
}
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

    .lightbox.show {
        display: block;
    }

@@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.lightbox-main-image {
    max-width: 80%;
    max-height: 70%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.lightbox-thumbnails {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    max-width: 80%;
    overflow-x: auto;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.lightbox-thumbnail {
    width: 60px;
    height: 60px;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
}

    .lightbox-thumbnail:hover {
        border-color: var(--secondary-color);
        transform: scale(1.05);
    }

    .lightbox-thumbnail.active {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.5);
    }

    .lightbox-thumbnail img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

    .lightbox-close:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: scale(1.1);
    }

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

    .lightbox-nav:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: translateY(-50%) scale(1.1);
    }

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

.lightbox-info {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    backdrop-filter: blur(10px);
}
/* Enhanced Navbar Styles */
.snow-navbar {
/*    background: linear-gradient(135deg, rgba(74, 144, 226, 0.95), rgba(127, 179, 211, 0.95)) !important;*/
    background: black;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: none;
    box-shadow: 0 8px 32px rgba(74, 144, 226, 0.2);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1050;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition-smooth);
}

    .snow-navbar.scrolled {
        background: linear-gradient(135deg, rgba(74, 144, 226, 0.98), rgba(127, 179, 211, 0.98)) !important;
        box-shadow: 0 10px 40px rgba(74, 144, 226, 0.3);
        padding: 0.75rem 0;
    }

/* Brand Enhancement */
.snow-brand {
    color: white !important;
    font-family: "Brush Script MT", "Lucida Handwriting", cursive;
    font-weight: 800;
    font-size: 4rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    text-decoration: none !important;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: var(--transition-smooth);
    padding: 0.5rem 0;
    margin: -30px 20px;
}

    .snow-brand:hover {
        transform: scale(1.05);
        color: var(--winter-gray) !important;
        filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
    }

.brand-icon {
    animation: rotate 8s linear infinite;
    font-size: 1.5em;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Enhanced Navigation Links */
.navbar-nav {
    align-items: center;
    gap: 0.25rem;
}

.nav-link-custom {
    color: rgba(255, 255, 255, 0.95) !important;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.75rem 1.25rem !important;
    border-radius: 30px;
    margin: 0 0.1rem;
    transition: var(--transition-smooth);
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    backdrop-filter: blur(10px);
    border: 1px solid transparent;
}

    .nav-link-custom::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 30px;
        opacity: 0;
        transition: opacity 0.3s ease;
        z-index: -1;
    }

    .nav-link-custom:hover::before {
        opacity: 1;
    }

    .nav-link-custom:hover {
        color: white !important;
        transform: translateY(-2px);
        box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
        border-color: rgba(255, 255, 255, 0.3);
    }

    .nav-link-custom.active {
        background: rgba(255, 255, 255, 0.25) !important;
        color: white !important;
        box-shadow: 0 4px 20px rgba(255, 255, 255, 0.3);
        border-color: rgba(255, 255, 255, 0.4);
        backdrop-filter: blur(15px);
    }

        .nav-link-custom.active::after {
            content: '';
            position: absolute;
            bottom: -2px;
            left: 50%;
            transform: translateX(-50%);
            width: 60%;
            height: 3px;
            background: linear-gradient(90deg, transparent, white, transparent);
            border-radius: 2px;
        }

    .nav-link-custom i {
        font-size: 0.9em;
        margin-right: 0.25rem;
    }

/* Admin and Special Links */
.admin-link {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.3), rgba(255, 193, 7, 0.2)) !important;
    border: 1px solid rgba(255, 193, 7, 0.4) !important;
    color: #fff !important;
}

    .admin-link:hover {
        background: linear-gradient(135deg, rgba(255, 193, 7, 0.4), rgba(255, 193, 7, 0.3)) !important;
        border-color: rgba(255, 193, 7, 0.6) !important;
        box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
    }

.btn-register {
    background: linear-gradient(135deg, var(--accent-cyan), #0099cc) !important;
    border: 1px solid var(--accent-cyan) !important;
    border-radius: 30px !important;
    font-weight: 600;
    padding: 0.75rem 1.5rem !important;
    transition: var(--transition-smooth);
}

    .btn-register:hover {
        background: linear-gradient(135deg, #0099cc, var(--accent-cyan)) !important;
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0, 180, 216, 0.4);
        color: white !important;
    }

/* Enhanced Search Bar */
.search-form {
    min-width: 320px;
    position: relative;
}

.input-group {
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition-smooth);
}

.search-input {
    border: none;
    border-radius: 30px 0 0 30px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-dark);
    box-shadow: none;
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    backdrop-filter: blur(10px);
}

    .search-input:focus {
        background: white;
        box-shadow: inset 0 0 0 2px var(--accent-cyan);
        outline: none;
    }

    .search-input::placeholder {
        color: rgba(45, 55, 72, 0.6);
        font-size: 0.9rem;
    }

.search-btn {
    background: linear-gradient(135deg, var(--accent-cyan), #0099cc);
    border: none;
    border-radius: 0 30px 30px 0;
    color: white;
    padding: 0.75rem 1.25rem;
    transition: var(--transition-smooth);
    font-size: 1rem;
}

    .search-btn:hover {
        background: linear-gradient(135deg, #0099cc, var(--deep-blue));
        transform: scale(1.05);
        box-shadow: 0 4px 15px rgba(0, 180, 216, 0.4);
    }

.search-form:focus-within .input-group {
    transform: scale(1.02);
    box-shadow: 0 6px 25px rgba(0, 180, 216, 0.2);
}

/* Enhanced Dropdown Menus */
.snow-dropdown {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    padding: 0.75rem;
    margin-top: 0.75rem;
    animation: dropdownFadeIn 0.3s ease;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.snow-dropdown .dropdown-item {
    border-radius: 12px;
    padding: 0.75rem 1rem;
    color: var(--text-dark);
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    font-weight: 500;
}

    .snow-dropdown .dropdown-item:hover {
        background: linear-gradient(135deg, var(--winter-gray), rgba(248, 250, 251, 0.8));
        color: var(--snow-blue);
        transform: translateX(5px);
    }

    .snow-dropdown .dropdown-item.text-danger:hover {
        background: linear-gradient(135deg, rgba(220, 53, 69, 0.1), rgba(220, 53, 69, 0.05));
        color: #dc3545;
    }

    .snow-dropdown .dropdown-item i {
        width: 16px;
        text-align: center;
    }

/* User Menu Enhancement */
.user-menu {
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}
.navbar-collapse {
    transition: all 0.25s ease-out; /* Transition ngắn gọn hơn */
    transform-origin: top;
    will-change: transform, opacity; /* Optimize cho GPU */
}

    .navbar-collapse.collapsing {
        transition: height 0.25s ease-out; /* Chỉ animate height */
        overflow: hidden;
    }

    .navbar-collapse.show {
        animation: slideDown 0.25s ease-out;
    }

/* Mobile Responsive Navigation */
/* Mobile Responsive Navigation - Improved Layout */
@media (max-width: 991px) {
    .navbar-collapse {
        background: black;
        backdrop-filter: blur(20px);
        border-radius: 20px;
        margin-top: 1rem;
        padding: 1.5rem;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
        border: 1.5px solid white;
    }

    /* Mobile navbar nav alignment */
    .navbar-nav {
        align-items: stretch !important;
        gap: 0;
        margin-bottom: 1rem;
    }

    /* Mobile nav links - left aligned and compact */
    .nav-link-custom {
        color: white;
        margin: 0.15rem 0;
        justify-content: flex-start;
        text-align: left;
        padding: 0.75rem 1rem !important;
        border-radius: 12px;
        font-size: 0.95rem;
        width: 100%;
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

        .nav-link-custom:hover {
            background: none;
            color: white !important;
            transform: translateX(5px);
        }

        .nav-link-custom.active {
            background: var(--gradient-primary);
            color:white !important;
            box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
        }

    /* Admin dropdown in mobile */
    .admin-link {
        background: linear-gradient(135deg, rgba(255, 193, 7, 0.2), rgba(255, 193, 7, 0.1)) !important;
        border: 1px solid rgba(255, 193, 7, 0.3) !important;
        color: var(--text-dark) !important;
    }

        .admin-link:hover {
            background: linear-gradient(135deg, rgba(255, 193, 7, 0.3), rgba(255, 193, 7, 0.2)) !important;
            color: #e67e22 !important;
        }

    /* Mobile dropdown menu */
    .snow-dropdown {
        position: static !important;
        transform: none !important;
        box-shadow: none;
        background: rgba(248, 250, 251, 0.8);
        margin: 0.5rem 0 0 1rem;
        padding: 0.5rem;
        border-radius: 12px;
        border: 1px solid rgba(232, 244, 248, 0.8);
        width: calc(100% - 1rem);
    }

        .snow-dropdown .dropdown-item {
            padding: 0.6rem 1rem;
            font-size: 0.9rem;
            border-radius: 8px;
        }

    /* Mobile search form - full width and compact */
    .search-form {
        min-width: 100%;
        margin: 1rem 0;
        order: 2;
    }

    .search-input {
        font-size: 0.95rem;
        padding: 0.75rem 1rem;
    }

    .search-btn {
        padding: 0.75rem 1rem;
    }

    /* Mobile user menu - properly aligned */
/*    .navbar-nav:last-child {
        margin-top: 0.5rem;
        border-top: 1px solid rgba(232, 244, 248, 0.8);
        padding-top: 1rem;
    }*/

    /* Register button in mobile */
    .btn-register {
        margin-top: 0.5rem;
        text-align: center;
        justify-content: center;
        background: #3498db !important;
        color: white !important;
        border: none !important;
        font-weight: 600;
    }

        .btn-register:hover {
            background: linear-gradient(135deg, #0099cc, var(--accent-cyan)) !important;
            color: white !important;
            transform: translateX(5px);
        }

    /* User dropdown menu in mobile */
    .user-menu {
        background: rgba(74, 144, 226, 0.1) !important;
        color: var(--snow-blue) !important;
        border: 1px solid rgba(74, 144, 226, 0.2) !important;
    }

    /* Mobile brand adjustment */
    .snow-brand {
        font-size: 1.5rem;
    }

    /* Ensure proper ordering */
    .navbar-collapse .navbar-nav:first-child {
        order: 1;
    }

    .search-form {
        order: 2;
    }

    .navbar-collapse .navbar-nav:last-child {
        order: 3;
    }
}

/* Extra small mobile devices */
@media (max-width: 576px) {
    .navbar-collapse {
        padding: 1rem;
        margin-top: 0.75rem;
        border-radius: 16px;
    }

    .nav-link-custom {
        padding: 0.65rem 0.85rem !important;
        font-size: 0.9rem;
        gap: 0.6rem;
    }

    .search-input {
        font-size: 0.9rem;
        padding: 0.65rem 0.9rem;
    }

    .search-btn {
        padding: 0.65rem 0.9rem;
    }

    .snow-brand {
        font-size: 1.4rem;
    }

    .brand-icon {
        font-size: 1.3em;
    }
}

/* Main Container */
.main-container {
    padding-top: 2rem;
    min-height: calc(100vh - 200px);
    position: relative;
    z-index: 1;
}

/* Enhanced Footer */
.snow-footer {
/*    background: var(--gradient-primary);*/
    background: black;
    color: white;
    padding: 4rem 0 2rem;
/*    margin-top: 4rem;*/
    position: relative;
    overflow: hidden;
    z-index: 10; /* Ensure footer doesn't interfere with back-to-top */
}

    .snow-footer::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 2px;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    }

.footer-brand {
    font-size: 1.6rem;
    font-weight: bold;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

    .footer-brand i {
        animation: rotate 6s linear infinite reverse;
        filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
    }

.footer-text {
    opacity: 0.9;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: var(--transition-smooth);
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    display: inline-block;
}

    .footer-links a:hover {
        color: var(--winter-gray);
        background: rgba(255, 255, 255, 0.1);
        transform: translateY(-2px);
    }

.footer-copyright {
    margin-top: 2rem;
    opacity: 0.8;
    font-size: 0.95rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* Enhanced Snowflake Animation */
.snowflakes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.snowflake {
    position: absolute;
    top: -10px;
    color: rgba(255, 255, 255, 0.8);
    user-select: none;
    pointer-events: none;
    animation: fall linear infinite;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

    .snowflake:nth-child(1) {
        left: 10%;
        animation-duration: 8s;
        font-size: 1.2rem;
        animation-delay: 0s;
    }

    .snowflake:nth-child(2) {
        left: 20%;
        animation-duration: 12s;
        font-size: 0.8rem;
        animation-delay: 2s;
    }

    .snowflake:nth-child(3) {
        left: 30%;
        animation-duration: 10s;
        font-size: 1rem;
        animation-delay: 4s;
    }

    .snowflake:nth-child(4) {
        left: 40%;
        animation-duration: 14s;
        font-size: 1.4rem;
        animation-delay: 1s;
    }

    .snowflake:nth-child(5) {
        left: 50%;
        animation-duration: 9s;
        font-size: 0.9rem;
        animation-delay: 3s;
    }

    .snowflake:nth-child(6) {
        left: 60%;
        animation-duration: 11s;
        font-size: 1.1rem;
        animation-delay: 5s;
    }

    .snowflake:nth-child(7) {
        left: 70%;
        animation-duration: 13s;
        font-size: 1.3rem;
        animation-delay: 2s;
    }

    .snowflake:nth-child(8) {
        left: 80%;
        animation-duration: 7s;
        font-size: 0.7rem;
        animation-delay: 4s;
    }

    .snowflake:nth-child(9) {
        left: 90%;
        animation-duration: 15s;
        font-size: 1.5rem;
        animation-delay: 1s;
    }

    .snowflake:nth-child(10) {
        left: 5%;
        animation-duration: 6s;
        font-size: 1rem;
        animation-delay: 3s;
    }

@keyframes fall {
    from {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }

    to {
        transform: translateY(calc(100vh + 100px)) rotate(360deg);
        opacity: 0;
    }
}

/* Enhanced Button Styles */
.btn-snow {
    background: var(--gradient-primary);
    border: none;
    color: white;
    border-radius: 30px;
    padding: 0.875rem 2.5rem;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition-smooth);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.3);
    position: relative;
    overflow: hidden;
    text-transform: none;
    letter-spacing: 0.025em;
}

    .btn-snow::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
        transition: left 0.6s;
    }

    .btn-snow:hover::before {
        left: 100%;
    }

    .btn-snow:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 30px rgba(74, 144, 226, 0.4);
        color: white;
        background: linear-gradient(135deg, #5ba0f2, #8fc5dd);
    }

    .btn-snow:active {
        transform: translateY(-1px);
        transition: transform 0.1s;
    }

/* Enhanced Card Styles */
.card-snow {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
    transition: var(--transition-smooth);
    overflow: hidden;
    position: relative;
}

    .card-snow::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 3px;
        background: var(--gradient-primary);
        transition: left 0.6s ease;
    }

    .card-snow:hover::before {
        left: 0;
    }

    .card-snow:hover {
        transform: translateY(-8px) scale(1.02);
        box-shadow: 0 20px 60px rgba(74, 144, 226, 0.15);
        border-color: rgba(74, 144, 226, 0.2);
    }

/* Styling cho brands có 0 sản phẩm */
.brand-item.no-products {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

    .brand-item.no-products .brand-count {
        color: #999;
    }

    .brand-item.no-products .brand-name {
        color: #999;
    }

/* Đảm bảo brand active luôn hiển thị bình thường */
.brand-item.active {
    opacity: 1 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
}

    .brand-item.active .brand-count,
    .brand-item.active .brand-name {
        color: inherit !important;
    }
/* Fixed Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px; /* nhỏ gọn */
    height: 60px; /* chiều cao bằng chiều rộng => tròn */
    border-radius: 50%;
    background: var(--gradient-primary);
    border: none;
    color: white;
    font-size: 1rem; /* icon vừa */
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.8);
    transition: var(--transition-smooth);
    z-index: 9999;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.35);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex; /* Thêm để căn icon */
    align-items: center; /* Căn giữa dọc */
    justify-content: center; /* Căn giữa ngang */
    padding: 0; /* Bỏ padding thừa */
}



    .back-to-top.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1);
    }

    .back-to-top:hover {
        transform: translateY(-5px) scale(1.1);
        box-shadow: 0 10px 35px rgba(74, 144, 226, 0.6);
        color: white;
        background: linear-gradient(135deg, #5ba0f2, #8fc5dd);
    }

    .back-to-top:active {
        transform: translateY(-3px) scale(1.05);
    }

/* Loading Animation */
.loading-snow {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Enhanced Notification System */
.snow-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 320px;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    z-index: 10001;
    transform: translateX(450px);
    transition: var(--transition-smooth);
    border-left: 4px solid var(--snow-blue);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

    .snow-notification.show {
        transform: translateX(0);
    }

    .snow-notification.success {
        border-left-color: #28a745;
    }

    .snow-notification.error {
        border-left-color: #dc3545;
    }

    .snow-notification.warning {
        border-left-color: #ffc107;
    }

.notification-content {
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notification-close {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0.25rem;
    margin-left: auto;
    transition: color 0.3s;
    border-radius: 6px;
}

    .notification-close:hover {
        color: #666;
        background: rgba(0, 0, 0, 0.05);
    }

/* Enhanced Search Suggestions */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 0 0 20px 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-top: none;
}

.suggestion-item {
    padding: 0.875rem 1.25rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    border-bottom: 1px solid rgba(232, 244, 248, 0.5);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
}

    .suggestion-item:hover {
        background: linear-gradient(135deg, var(--winter-gray), rgba(248, 250, 251, 0.8));
        color: var(--snow-blue);
        padding-left: 1.75rem;
    }

    .suggestion-item:last-child {
        border-bottom: none;
        border-radius: 0 0 20px 20px;
    }

/* Enhanced Form Controls */
.form-control {
    border: 2px solid var(--winter-gray);
    border-radius: 16px;
    padding: 0.875rem 1.25rem;
    transition: var(--transition-smooth);
    background: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    backdrop-filter: blur(10px);
}

    .form-control:focus {
        border-color: var(--snow-blue);
        box-shadow: 0 0 0 0.2rem rgba(74, 144, 226, 0.15);
        background: white;
        transform: translateY(-1px);
    }

    .form-control.is-invalid {
        border-color: #dc3545;
        animation: shake 0.6s;
    }

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-8px);
    }

    75% {
        transform: translateX(8px);
    }
}

/* Fade In Animation */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Cart Badge Animation */
.cart-badge {
    background: #dc3545;
    color: white;
    border-radius: 50%;
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
    min-width: 22px;
    text-align: center;
    transition: var(--transition-smooth);
    font-weight: 600;
}

    .cart-badge.bounce {
        animation: bounce 0.6s;
    }

@keyframes bounce {
    0%, 20%, 60%, 100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-12px);
    }

    80% {
        transform: translateY(-6px);
    }
}

/* Enhanced Navbar Toggler */
.navbar-toggler {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 0.5rem 0.75rem;
    transition: all 0.2s ease; /* Giảm thời gian transition */
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1051; /* Đảm bảo luôn ở trên */
}

    .navbar-toggler:focus {
        box-shadow: none; /* Bỏ box-shadow phức tạp */
        border-color: rgba(255, 255, 255, 0.5);
        outline: none;
    }

    .navbar-toggler:hover {
        background: rgba(255, 255, 255, 0.15);
        border-color: rgba(255, 255, 255, 0.4);
    }

.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%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    transition: transform 0.15s ease; /* Giảm thời gian animation */
    width: 1.25em;
    height: 1.25em;
}

.navbar-toggler:hover .navbar-toggler-icon {
    transform: scale(1.05); /* Giảm scale để ít lag hơn */
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    *,
    ::before,
    ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .snow-navbar {
        background: #1a365d !important;
        border-bottom: 2px solid #fff;
    }

    .nav-link-custom {
        border: 1px solid rgba(255, 255, 255, 0.5) !important;
    }

    .btn-snow {
        border: 2px solid #fff;
    }
}

/* Focus styles for accessibility */
.nav-link-custom:focus,
.btn-snow:focus,
.search-input:focus,
.search-btn:focus {
    outline: 3px solid rgba(255, 255, 255, 0.6);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .snow-navbar,
    .back-to-top,
    .snowflakes,
    .snow-notification {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }
}

/* Additional spacing and layout improvements */
.container {
    max-width: 1200px;
}

@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* Smooth scrolling for the entire page */
html {
    scroll-behavior: smooth;
}

/* Enhanced hover states for better user feedback */
a, button {
    transition: var(--transition-smooth);
}

/* Ensure proper stacking context */
.main-container {
    position: relative;
    z-index: 1;
}

/* Product Card Enhancements */
.product-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    transition: var(--transition-smooth);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

    .product-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 20px 60px rgba(74, 144, 226, 0.12);
    }

.product-image {
    position: relative;
    overflow: hidden;
    border-radius: 24px 24px 0 0;
    height: 250px;
    background: var(--winter-gray);
}

    .product-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.6s ease;
    }

    .product-image:hover img {
        transform: scale(1.1);
    }

.product-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: linear-gradient(135deg, var(--accent-cyan), #0099cc);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 180, 216, 0.3);
}

.product-actions {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    opacity: 0;
    transform: translateX(20px);
    transition: var(--transition-smooth);
}

.product-card:hover .product-actions {
    opacity: 1;
    transform: translateX(0);
}

.action-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    color: var(--text-dark);
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

    .action-btn:hover {
        background: var(--snow-blue);
        color: white;
        transform: scale(1.1);
        box-shadow: 0 6px 20px rgba(74, 144, 226, 0.3);
    }

/* Image Zoom Effect */
.product-image.zoomed {
    transform: scale(1.05);
    cursor: zoom-in;
}

/* Glass morphism utilities */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
}

/* Enhanced breadcrumb styles */
.breadcrumb {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 0.75rem 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.breadcrumb-item a {
    color: var(--snow-blue);
    text-decoration: none;
    transition: var(--transition-smooth);
}

    .breadcrumb-item a:hover {
        color: var(--deep-blue);
        text-decoration: underline;
    }

/* Enhanced pagination */
.pagination .page-link {
    color: var(--snow-blue);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--winter-gray);
    border-radius: 12px;
    margin: 0 0.25rem;
    padding: 0.75rem 1rem;
    transition: var(--transition-smooth);
    backdrop-filter: blur(10px);
}

    .pagination .page-link:hover {
        color: white;
        background: var(--gradient-primary);
        border-color: var(--snow-blue);
        transform: translateY(-2px);
        box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
    }

.pagination .page-item.active .page-link {
    background: var(--gradient-primary);
    border-color: var(--snow-blue);
    color: white;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

/* Enhanced modal styles */
.modal-content {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 1px solid rgba(232, 244, 248, 0.5);
    border-radius: 24px 24px 0 0;
    padding: 1.5rem 2rem 1rem;
}

.modal-body {
    padding: 1.5rem 2rem;
}

.modal-footer {
    border-top: 1px solid rgba(232, 244, 248, 0.5);
    border-radius: 0 0 24px 24px;
    padding: 1rem 2rem 1.5rem;
}

/* Enhanced table styles */
.table {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}

    .table thead th {
        background: var(--gradient-primary);
        color: white;
        border: none;
        padding: 1rem 1.5rem;
        font-weight: 600;
    }

    .table tbody td {
        padding: 1rem 1.5rem;
        border-color: rgba(232, 244, 248, 0.5);
        vertical-align: middle;
    }

    .table tbody tr:hover {
        background: rgba(74, 144, 226, 0.05);
    }

/* Enhanced alert styles */
.alert {
    border: none;
    border-radius: 16px;
    padding: 1rem 1.5rem;
    backdrop-filter: blur(10px);
    border-left: 4px solid;
}

.alert-info {
    background: rgba(74, 144, 226, 0.1);
    border-left-color: var(--snow-blue);
    color: var(--deep-blue);
}

.alert-success {
    background: rgba(40, 167, 69, 0.1);
    border-left-color: #28a745;
    color: #155724;
}

.alert-warning {
    background: rgba(255, 193, 7, 0.1);
    border-left-color: #ffc107;
    color: #856404;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    border-left-color: #dc3545;
    color: #721c24;
}

/* Enhanced progress bars */
.progress {
    height: 12px;
    background: rgba(232, 244, 248, 0.8);
    border-radius: 10px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.progress-bar {
    background: var(--gradient-primary);
    border-radius: 10px;
    transition: width 0.6s ease;
}

/* Enhanced badge styles */
.badge {
    padding: 0.4rem 0.8rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.8rem;
}

.badge-primary {
    background: var(--gradient-primary);
    color: white;
}

.badge-secondary {
    background: rgba(108, 117, 125, 0.9);
    color: white;
}

/* Improved responsive design */
@media (max-width: 768px) {
    .snow-brand {
        font-size: 1.4rem;
    }

    .nav-link-custom {
        padding: 0.6rem 1rem !important;
        font-size: 0.9rem;
    }

    .search-form {
        margin: 0.75rem 0;
    }

    .btn-snow {
        padding: 0.75rem 2rem;
        font-size: 0.95rem;
    }

    .back-to-top {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 1.1rem;
    }

    .snow-notification {
        min-width: 280px;
        max-width: calc(100vw - 40px);
        right: 20px;
    }

    .main-container {
        padding-top: 1.5rem;
    }

    .snow-footer {
        padding: 3rem 0 1.5rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .search-input {
        font-size: 0.9rem;
    }

    .product-image {
        height: 200px;
    }

    .card-snow {
        border-radius: 20px;
        margin-bottom: 1.5rem;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    body.auto-theme {
        --frost-white: #1a1a1a;
        --winter-gray: #2d2d2d;
        --text-dark: #e0e0e0;
        background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    }

        body.auto-theme .card-snow {
            background: rgba(45, 45, 45, 0.9);
            color: #e0e0e0;
        }

        body.auto-theme .form-control {
            background: rgba(45, 45, 45, 0.9);
            color: #e0e0e0;
            border-color: #404040;
        }
}

/* Performance optimizations */
.card-snow,
.product-card,
.btn-snow,
.nav-link-custom {
    will-change: transform, box-shadow;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .snowflake {
        animation-duration: 0s !important;
    }

    .brand-icon {
        animation: none !important;
    }
}

/* High DPI display support */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .snow-navbar {
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
    }

    .card-snow {
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
    }
}
