/* Navbar Styles */
/* Desktop Styles (992px and up) */
@media (min-width: 992px) {
    .navbar {
        background: linear-gradient(135deg, #2c3e50, #34495e);
        padding: 0.8rem 0;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }

    .navbar-nav {
        display: flex;
        justify-content: center;
        background: transparent;
    }

    .nav-item {
        margin: 0 0.8rem;
        position: relative;
    }

    .nav-link {
        color: white !important;
        padding: 0.5rem 1rem !important;
        display: block;
        font-weight: 500;
        letter-spacing: 0.5px;
        transition: all 0.3s ease;
        border-radius: 4px;
    }
    
    /* Fix for product detail tabs - override global nav-link color */
    .product-tabs .nav-link {
        color: #666 !important;
    }
    
    .product-tabs .nav-link.active {
        color: #ff6700 !important;
    }

    .nav-link:hover {
        background: rgba(255,255,255,0.15);
        transform: translateY(-2px);
    }

    .nav-item.active .nav-link {
        background: rgba(255,255,255,0.2);
    }

    .nav-item:after {
        content: '';
        position: absolute;
        bottom: -5px;
        left: 50%;
        width: 0;
        height: 2px;
        background: #3498db;
        transition: all 0.3s ease;
    }

    .nav-item:hover:after {
        width: 60%;
        left: 20%;
    }
}

/* Mobile Styles (below 992px) */
@media (max-width: 991.98px) {
    .navbar {
        background: linear-gradient(135deg, #1a2a3a, #2980b9);
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
        padding: 0.8rem 1rem;
        transition: all 0.3s ease;
    }

    .navbar-brand {
        font-weight: 700;
        font-size: 1.5rem;
        color: white !important;
        text-shadow: 0 2px 4px rgba(0,0,0,0.2);
        display: flex;
        align-items: center;
    }

    .navbar-toggler {
        border: none;
        padding: 0.5rem;
        transition: all 0.3s ease;
        background: rgba(255,255,255,0.1);
        border-radius: 4px;
    }

    .navbar-toggler:hover {
        transform: scale(1.1);
        background: rgba(255,255,255,0.2);
    }

    .navbar-collapse {
        background: linear-gradient(135deg, rgba(26, 42, 58, 0.98), rgba(41, 128, 185, 0.95));
        padding: 0.5rem 1rem;
        border-radius: 0.5rem;
        margin-top: 0.8rem;
        box-shadow: 0 8px 20px rgba(0,0,0,0.25);
        backdrop-filter: blur(12px);
        border: 1px solid rgba(255,255,255,0.15);
        position: relative;
        width: 100%;
        left: 0;
        z-index: 1000;
    }
    .navbar-collapse.show + .hero-section,
    .navbar-collapse.show ~ .container {
        transition: margin-top 0.3s ease;
    }

    .nav-item {
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .nav-item:last-child {
        border-bottom: none;
    }

    .nav-link {
        padding: 1rem 1.25rem !important;
        margin: 0;
        border-radius: 4px;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        font-weight: 500;
        color: rgba(255,255,255,0.9) !important;
    }

    .nav-link:hover {
        background: linear-gradient(90deg, rgba(255,255,255,0.15), transparent);
        padding-left: 1.5rem !important;
        color: white !important;
    }

    .nav-link.active {
        background: linear-gradient(90deg, rgba(255,255,255,0.2), transparent);
        color: #f1c40f !important;
        font-weight: 600;
    }

    .nav-link i {
        margin-right: 0.75rem;
        font-size: 1.2rem;
    }
}

/* Common Styles */
.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, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.sticky-top {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1020;
}

html {
    scroll-behavior: smooth;
}

/* Sticky Navbar */
.sticky-top {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1020;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

main {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.banner {
    background: #3498db;
    color: white;
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    border-radius: 5px;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.feature {
    background: #f9f9f9;
    padding: 1rem;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

footer {
    text-align: center;
    padding: 2rem 1rem;
    background: #2c3e50;
    color: white;
    margin-top: 2rem;
}

footer a {
    color: #ecf0f1;
    text-decoration: none;
    margin: 0 15px;
    padding: 5px 10px;
    transition: all 0.3s ease;
    border-radius: 3px;
}

footer a:hover {
    color: #3498db;
    background: rgba(255,255,255,0.1);
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.copyright {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 1rem;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    padding: 4rem 0;
    margin-bottom: 3rem;
    border-radius: 0 0 20px 20px;
    text-align: center;
}

/* Sidebar Styles */
.sidebar {
    height: 100vh;
    position: fixed;
    width: 250px;
    background: #2c3e50;
    color: white;
    padding: 1rem 0;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    z-index: 1000;
}

/* Manager Content Styles */
.main-content {
    margin-left: 250px;
    padding: 20px;
    width: calc(100% - 250px);
    min-height: 100vh;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }
}

.sidebar h4 {
    padding: 0 1rem;
    margin-bottom: 2rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 1rem;
}

.sidebar .nav {
    padding: 0 1rem;
}

.sidebar .nav-item {
    margin-bottom: 0.5rem;
}

.sidebar .nav-link {
    color: rgba(255,255,255,0.8);
    padding: 0.75rem 1rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
}

.sidebar .nav-link:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    transform: translateX(5px);
}

.sidebar .nav-link.active {
    background: #3498db;
    color: white;
    font-weight: 500;
}

.sidebar .nav-link i {
    font-size: 1.1rem;
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}

.sidebar .nav-link.text-danger:hover {
    background: rgba(220,53,69,0.2);
}

/* Video Preview Styles */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.video-overlay:hover {
    background-color: rgba(0,0,0,0.5);
}

.play-button {
    width: 60px;
    height: 60px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255,255,255,0.2);
    border: none;
    transition: all 0.3s ease;
}

.play-button:hover {
    background-color: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.play-button i {
    font-size: 24px;
    color: white;
}

.video-preview {
    background-color: #000;
}

/* Product Detail Page - Xiaomi Style */
.product-gallery {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.main-image-container {
    background: #f8f8f8;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
    padding: 20px;
}

.main-image-container img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.thumbnail-container {
    overflow-x: auto;
    padding: 10px 0;
}

.thumbnail-container img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 1px solid #eee;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.thumbnail-container img:hover {
    border-color: #ff6700;
}

.product-info {
    padding: 20px;
}

.product-info h1 {
    font-size: 24px;
    font-weight: 500;
    color: #333;
    margin-bottom: 10px;
}

.price-section {
    padding: 15px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    margin: 20px 0;
}

.current-price {
    color: #ff6700;
    font-weight: 700;
}

.action-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.btn-primary {
    background-color: #ff6700;
    border-color: #ff6700;
    padding: 12px 24px;
}

.btn-primary:hover {
    background-color: #f56600;
    border-color: #f56600;
}

.product-tabs .nav-tabs {
    border-bottom: 1px solid #eee;
}

.product-tabs .nav-link {
    color: #666;
    font-weight: 500;
    padding: 12px 20px;
    border: none;
    position: relative;
}

.product-tabs .nav-link.active {
    color: #ff6700;
    background: none;
}

.product-tabs .nav-link.active:after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: #ff6700;
}

.tab-content {
    padding: 20px 0;
}

#productSpecs table {
    width: 100%;
    border-collapse: collapse;
}

#productSpecs th, #productSpecs td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

#productSpecs th {
    width: 30%;
    color: #666;
    font-weight: normal;
}

#productDescription {
    line-height: 1.8;
    color: #666;
}

@media (max-width: 992px) {
    .main-image-container {
        height: 300px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn-primary, .btn-outline-secondary {
        width: 100%;
    }
}
.card-header {
    font-weight: 600;
    letter-spacing: 0.5px;
}

.card-header i {
    font-size: 1.2rem;
}

#productName {
    font-weight: 700;
    color: #2c3e50;
}

#productSpecs table {
    width: 100%;
    border-collapse: collapse;
}

#productSpecs th {
    background-color: #f8f9fa;
    text-align: left;
    padding: 12px 15px;
    border: 1px solid #dee2e6;
}

#productSpecs td {
    padding: 12px 15px;
    border: 1px solid #dee2e6;
}

#documentPreview {
    transition: all 0.3s ease;
}

.btn-primary {
    padding: 8px 16px;
    font-weight: 500;
}

.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Make all partner logos colored by default */
#partnersTable img,
.partner-logo {
    filter: none !important;
    -webkit-filter: none !important;
    -moz-filter: none !important;
    -o-filter: none !important;
    -ms-filter: none !important;
}

.border-bottom {
    border-color: rgba(0,0,0,0.1) !important;
}

@media (max-width: 992px) {
    .card {
        margin-bottom: 20px;
    }
}

/* 分组菜单样式 */
.nav-divider {
    margin: 1rem 0;
}

.nav-divider hr {
    border-color: rgba(255,255,255,0.2);
    margin: 0.5rem 0;
}

.nav-divider small {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.6) !important;
}

/* 子菜单项缩进 */
.nav-item .nav-item {
    margin-left: 1.5rem;
}

.nav-item .nav-link {
    padding-left: 2rem !important;
    font-size: 0.9rem;
}

/* 分组标题悬停效果 */
.nav-divider:hover small {
    color: rgba(255,255,255,0.8) !important;
}

/* 移动端适配 */
@media (max-width: 992px) {
    .nav-divider {
        margin: 0.5rem 0;
    }
    
    .nav-divider small {
        padding: 0.5rem 1rem;
        display: block;
    }
    
    .nav-item .nav-item {
        margin-left: 1rem;
    }
    
    .nav-item .nav-link {
        padding-left: 1.5rem !important;
    }
}

/* 折叠菜单样式 */
.collapse-icon {
    transition: transform 0.3s ease;
    font-size: 0.8rem;
}

[data-bs-toggle="collapse"] {
    transition: all 0.3s ease;
}

[data-bs-toggle="collapse"]:hover {
    color: rgba(255,255,255,0.8) !important;
}

/* 滚动条样式 */
.sidebar-menu::-webkit-scrollbar {
    width: 6px;
}

.sidebar-menu::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
}

.sidebar-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}

/* 折叠菜单动画 */
.collapse {
    transition: height 0.3s ease;
}

/* 子菜单项样式 */
.collapse .nav-item {
    margin-left: 1rem;
}

.collapse .nav-link {
    padding-left: 2rem !important;
    font-size: 0.9rem;
    opacity: 0.9;
}

.collapse .nav-link:hover {
    opacity: 1;
}

/* 分组标题激活状态 */
.nav-divider.active small {
    color: rgba(255,255,255,0.9) !important;
}
