/* Common Styles */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Top Header Bar */
.top-header-bar {
    background-color: #ffffff;
    color: #000000;
    font-size: 0.875rem;
}

.navbar-sticky {
    position: sticky;
    top: 0;
    z-index: 1030;
    background-color: #515151 !important;
}

.navbar-sticky .nav-link {
    color: #ffffff !important;
}

.navbar-sticky .nav-link:hover,
.navbar-sticky .nav-link:focus {
    color: #f8f9fa !important;
}

.navbar-sticky .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.5);
}

.navbar-sticky .navbar-toggler-icon {
    filter: invert(1);
}

.top-header-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #000000;
}

.top-header-item i {
    font-size: 1rem;
    color: #dc3545;
}

.top-header-item span {
    color: #000000;
}

.social-icons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
}

.social-icon {
    color: #000000;
    font-size: 1.1rem;
    text-decoration: none;
    transition: color 0.3s;
}

.social-icon:hover {
    color: #ff5c00;
}

/* Main Header Styles */
.main-header {
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 1000;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background-color: #dc3545;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.logo-icon i {
    color: white;
}

/* Main Menu */
.main-menu {
    display: flex;
    justify-content: center;
}

.main-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0;
}

.main-menu-item {
    position: relative;
}

.main-menu-item a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
    white-space: nowrap;
}

.main-menu-item:hover a {
    color: #666;
}

.main-menu-item.active a {
    color: #dc3545;
}

.main-menu-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #dc3545;
}

/* Hotline Section */
.hotline-section {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.hotline-icon {
    width: 50px;
    height: 50px;
    background-color: #dc3545;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.hotline-content {
    text-align: left;
}

.hotline-label {
    font-size: 0.85rem;
    color: #ffffff !important;
    font-weight: 500;
    margin-bottom: 2px;
}

.hotline-number {
    font-size: 1.2rem;
    color: #ffffff !important;
    font-weight: 700;
}

/* Mobile Menu */
.mobile-menu-toggle {
    position: fixed;
    top: 120px;
    right: 15px;
    z-index: 1001;
}

.mobile-menu-toggle .btn {
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-item {
    border-bottom: 1px solid #eee;
}

.mobile-nav-link {
    display: block;
    padding: 1rem;
    color: #333;
    text-decoration: none;
    font-weight: 500;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: #dc3545;
    background-color: #f8f9fa;
}

/* Responsive */
@media (max-width: 991px) {
    .top-header-item {
        font-size: 0.8rem;
    }
    
    .main-menu {
        display: none;
    }
    
    .hotline-section {
        justify-content: center;
        margin-top: 1rem;
    }
}

@media (max-width: 767px) {
    .top-header-bar .row {
        flex-direction: column;
        gap: 10px;
    }
    
    .top-header-bar .col-md-6 {
        text-align: center !important;
    }
    
    .social-icons {
        justify-content: center;
    }
    
    .main-header .row {
        flex-direction: column;
        gap: 15px;
    }
    
    .main-header .col-md-3 {
        text-align: center;
    }
}

/* Header Styles */
header {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
    background-color: #fff !important;
}

.header-logo-desktop {
    /*max-height: 60px;*/
    max-width: 300px;
    object-fit: contain;
}

.header-logo-mobile {
    max-height: 40px;
    max-width: 150px;
    object-fit: contain;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.navbar-brand small {
    display: block;
    font-size: 0.75rem;
    font-weight: normal;
    color: #666;
}

/* Card Styles */
.card {
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    border-color: #ff5c00;
}

.card-img-top {
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

/* Product Card */
.product-card {
    height: 100%;
}

.product-card .card-body {
    display: flex;
    flex-direction: column;
}

.product-card .card-body .mt-auto {
    margin-top: auto;
}

/* Price Styles */
.price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ff5c00;
}

.price-old {
    text-decoration: line-through;
    color: #999;
    font-size: 1rem;
    font-weight: 400;
    margin-right: 8px;
}

.price-sale {
    color: #dc3545;
    font-weight: 700;
}

/* Badge Styles */
.badge-sale {
    background-color: var(--danger-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

/* Breadcrumb */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 1rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    padding: 0 0.5rem;
}

/* Footer */
.footer {
    background-color: var(--dark-color);
    color: white;
    margin-top: auto;
    padding: 3rem 0 1rem;
}

.footer a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: color 0.2s;
}

.footer a:hover {
    color: white;
}

/* Footer Responsive */
@media (max-width: 768px) {
    .footer {
        padding: 2rem 0 1rem;
    }

    .footer .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .footer h5 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    .footer p,
    .footer li {
        font-size: 0.875rem;
    }
}

/* Utilities */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* User Dropdown - Ensure it appears above menu */
header .dropdown {
    position: relative;
    z-index: 1002;
}

header .dropdown-menu {
    z-index: 1002 !important;
    position: absolute !important;
}

/* Ensure dropdown stays above sticky menu */
.main-nav-menu.sticky ~ * .dropdown-menu,
header .dropdown-menu {
    z-index: 1002 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .card-img-top {
        height: 200px;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }

    /* Header Mobile Optimization */
    header .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    header .btn {
        font-size: 0.875rem;
        padding: 0.4rem 0.75rem;
    }

    header .form-control {
        font-size: 0.875rem;
    }

    /* Ensure buttons don't wrap */
    header .d-inline-flex {
        flex-wrap: nowrap;
    }

    header .gap-2 {
        gap: 0.5rem !important;
    }
}

@media (max-width: 576px) {
    /* Extra small devices */
    .header-logo-mobile {
        max-height: 35px;
        max-width: 120px;
    }

    header .btn {
        font-size: 0.8rem;
        padding: 0.35rem 0.6rem;
        min-width: 40px !important;
    }

    header .btn i {
        font-size: 1rem;
    }

    header .cart-badge {
        font-size: 0.6rem !important;
        min-width: 16px !important;
        height: 16px !important;
        padding: 0;
    }

    header .form-control {
        font-size: 0.8rem;
        padding: 0.4rem 0.75rem;
    }
}

