/* ========================================
   CSS VARIABLES & GLOBAL STYLES
   ======================================== */

:root {
    --primary-color: #D60000;
    --white-color: #FFFFFF;
    --dark-color: #222222;
    --gray-light: #F5F5F5;
    --gray-medium: #CCCCCC;
    --gray-dark: #666666;
    --transition: all 0.3s ease;
    --max-width: 1440px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--dark-color);
    background-color: var(--white-color);
    line-height: 1.6;
}

.container,
.container-fluid {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 15px;
}

/* ========================================
   TOP HEADER
   ======================================== */

.top-header {
    background-color: var(--white-color);
    border-bottom: 2px solid var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--primary-color);
    font-size: 24px;
    font-weight: bold;
    transition: var(--transition);
}

.logo:hover {
    transform: scale(1.05);
    color: var(--dark-color);
}

.logo i {
    font-size: 32px;
}

.brand-name {
    font-size: 20px;
    letter-spacing: 1px;
}

/* Search Form */
.search-form {
    width: 100%;
}

.search-input {
    border: 2px solid var(--gray-medium);
    border-radius: 25px;
    padding: 10px 20px;
    font-size: 14px;
    transition: var(--transition);
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(214, 0, 0, 0.2);
}

.btn-search {
    background-color: var(--primary-color);
    color: var(--white-color);
    border: none;
    border-radius: 25px;
    padding: 10px 20px;
    margin-left: -50px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-search:hover {
    background-color: var(--dark-color);
}

/* Header Right */
.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 30px;
}

.hotline {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 14px;
}

.hotline i {
    font-size: 18px;
}

.header-icons {
    display: flex;
    gap: 20px;
    align-items: center;
}

.header-icon {
    color: var(--dark-color);
    font-size: 18px;
    text-decoration: none;
    transition: var(--transition);
    position: relative;
}

.header-icon:hover {
    color: var(--primary-color);
    transform: scale(1.2);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--primary-color);
    color: var(--white-color);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* ========================================
   MAIN MENU
   ======================================== */

.main-menu {
    background-color: var(--dark-color);
    padding: 0;
}

.navbar {
    padding: 0 !important;
}

.navbar-nav .nav-link {
    color: var(--white-color) !important;
    padding: 15px 20px !important;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
    background-color: rgba(214, 0, 0, 0.1);
}

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

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

/* Mega Menu */
.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--white-color);
    border-top: 3px solid var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 30px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 1001;
}

#productDropdown:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-title {
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 15px;
    font-size: 14px;
    text-transform: uppercase;
}

.menu-list {
    list-style: none;
}

.menu-list li {
    margin-bottom: 8px;
}

.menu-list a {
    color: var(--dark-color);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
    display: block;
    padding: 5px 0;
}

.menu-list a:hover {
    color: var(--primary-color);
    padding-left: 10px;
}

/* Mobile Menu */
.navbar-toggler {
    border-color: var(--primary-color) !important;
}

.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='%23D60000' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* ========================================
   HERO SLIDER
   ======================================== */

.hero-slider {
    width: 100%;
    height: 500px;
    overflow: hidden;
    position: relative;
    background-color: var(--gray-light);
}

.slider-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.slider-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.slider-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.slider-slide.active {
    opacity: 1;
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
}

.slide-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--white-color);
    z-index: 10;
    animation: slideInUp 0.8s ease;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translate(-50%, -30%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.slide-title {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.slide-description {
    font-size: 20px;
    margin-bottom: 25px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.btn-cta {
    background-color: var(--primary-color);
    color: var(--white-color);
    border: none;
    padding: 12px 40px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
}

.btn-cta:hover {
    background-color: var(--dark-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    color: var(--white-color);
}

/* Slider Controls */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(214, 0, 0, 0.7);
    color: var(--white-color);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition);
    z-index: 20;
}

.slider-prev {
    left: 20px;
}

.slider-next {
    right: 20px;
}

.slider-btn:hover {
    background-color: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
}

/* Pagination Dots */
.slider-pagination {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 20;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background-color: var(--primary-color);
    width: 30px;
    border-radius: 6px;
}

.dot:hover {
    background-color: var(--white-color);
}

/* ========================================
   PRODUCTS SECTION
   ======================================== */

.products-section {
    padding: 50px 0;
    background-color: var(--white-color);
}

.section-title {
    text-align: center;
    font-size: 32px;
    font-weight: bold;
    color: var(--dark-color);
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
}

/* Sidebar Categories */
.category-sidebar {
    background-color: var(--gray-light);
    padding: 20px;
    border-radius: 8px;
    height: fit-content;
}

.sidebar-title {
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 20px;
    font-size: 16px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-list {
    list-style: none;
}

.category-item {
    margin-bottom: 0;
    border-bottom: 1px solid var(--gray-medium);
}

.category-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    color: var(--dark-color);
    text-decoration: none;
    transition: var(--transition);
    font-size: 14px;
}

.category-link:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
    padding-left: 25px;
}

.category-link i:first-child {
    margin-right: 10px;
}

.subcategory-list {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: var(--transition);
    background-color: var(--white-color);
}

.category-item:hover .subcategory-list {
    max-height: 300px;
}

.subcategory-list li {
    padding: 8px 40px;
    border-bottom: 1px solid var(--gray-medium);
}

.subcategory-list a {
    color: var(--gray-dark);
    text-decoration: none;
    font-size: 13px;
    transition: var(--transition);
}

.subcategory-list a:hover {
    color: var(--primary-color);
    font-weight: bold;
}

/* Products Carousel */
.products-carousel {
    background-color: var(--white-color);
}

.carousel-container {
    position: relative;
    overflow: hidden;
}

.carousel-wrapper {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 20px 0;
    scroll-snap-type: x mandatory;
}

.carousel-wrapper::-webkit-scrollbar {
    height: 6px;
}

.carousel-wrapper::-webkit-scrollbar-track {
    background: var(--gray-light);
}

.carousel-wrapper::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

/* Product Card */
.product-card {
    flex: 0 0 calc(33.333% - 15px);
    background-color: var(--white-color);
    border: 1px solid var(--gray-medium);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
    scroll-snap-align: start;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.product-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: var(--gray-light);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.product-info {
    padding: 15px;
}

.product-name {
    font-size: 16px;
    font-weight: bold;
    color: var(--dark-color);
    margin-bottom: 5px;
    min-height: 40px;
}

.product-code {
    font-size: 12px;
    color: var(--gray-dark);
    margin-bottom: 10px;
}

.product-price {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 15px;
}

.price-original {
    font-size: 14px;
    color: var(--gray-dark);
    text-decoration: line-through;
}

.price-sale {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
}

.btn-add-cart {
    width: 100%;
    background-color: var(--primary-color);
    color: var(--white-color);
    border: none;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: bold;
    font-size: 14px;
}

.btn-add-cart:hover {
    background-color: var(--dark-color);
    transform: scale(1.02);
}

/* Carousel Controls */
.carousel-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.carousel-btn {
    background-color: var(--primary-color);
    color: var(--white-color);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    font-size: 16px;
}

.carousel-btn:hover {
    background-color: var(--dark-color);
    transform: scale(1.1);
}

/* ========================================
   BRANDS SECTION
   ======================================== */

.brands-section {
    padding: 50px 0;
    background-color: var(--gray-light);
}

.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px;
    align-items: center;
}

.brand-item {
    background-color: var(--white-color);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.brand-item:hover {
    transform: scale(1.05);
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.brand-item img {
    max-width: 100%;
    height: auto;
    max-height: 80px;
}

/* ========================================
   NEWS SECTION
   ======================================== */

.news-section {
    padding: 50px 0;
    background-color: var(--white-color);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.news-card {
    background-color: var(--white-color);
    border: 1px solid var(--gray-medium);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.news-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: var(--gray-light);
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.news-content {
    padding: 20px;
}

.news-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--dark-color);
    margin-bottom: 10px;
    min-height: 50px;
}

.news-date {
    font-size: 12px;
    color: var(--gray-dark);
    margin-bottom: 10px;
}

.news-description {
    font-size: 14px;
    color: var(--gray-dark);
    margin-bottom: 15px;
    line-height: 1.5;
}

.btn-read-more {
    background-color: var(--primary-color);
    color: var(--white-color);
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    font-weight: bold;
}

.btn-read-more:hover {
    background-color: var(--dark-color);
    transform: translateX(5px);
    color: var(--white-color);
}

/* ========================================
   COMMITMENT SECTION
   ======================================== */

.commitment-section {
    padding: 50px 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, rgba(214, 0, 0, 0.8) 100%);
}

.commitment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.commitment-item {
    text-align: center;
    color: var(--white-color);
    padding: 20px;
    transition: var(--transition);
}

.commitment-item:hover {
    transform: translateY(-10px);
}

.commitment-icon {
    font-size: 48px;
    margin-bottom: 15px;
    transition: var(--transition);
}

.commitment-item:hover .commitment-icon {
    transform: scale(1.2);
}

.commitment-item h5 {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

.commitment-item p {
    font-size: 14px;
    line-height: 1.6;
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
    background-color: var(--dark-color);
    color: var(--white-color);
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-column {
    padding: 20px;
}

.footer-title {
    font-size: 16px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 15px;
    text-transform: uppercase;
}

.footer-list {
    list-style: none;
    font-size: 14px;
    line-height: 2;
}

.footer-list a {
    color: var(--white-color);
    text-decoration: none;
    transition: var(--transition);
}

.footer-list a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: var(--white-color);
    border-radius: 50%;
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--white-color);
    color: var(--primary-color);
    transform: scale(1.1);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 14px;
    color: var(--gray-medium);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1024px) {
    .product-card {
        flex: 0 0 calc(50% - 10px);
    }

    .slide-title {
        font-size: 36px;
    }

    .slide-description {
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .header-right {
        gap: 15px;
    }

    .hotline {
        font-size: 12px;
    }

    .hotline span {
        display: none;
    }

    .search-form {
        margin: 15px 0;
    }

    .search-input {
        font-size: 12px;
        padding: 8px 15px;
    }

    .btn-search {
        padding: 8px 15px;
        margin-left: -40px;
    }

    .hero-slider {
        height: 350px;
    }

    .slide-title {
        font-size: 24px;
    }

    .slide-description {
        font-size: 14px;
    }

    .btn-cta {
        padding: 10px 25px;
        font-size: 14px;
    }

    .product-card {
        flex: 0 0 100%;
    }

    .products-section .row {
        flex-direction: column;
    }

    .section-title {
        font-size: 24px;
    }

    .brands-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }

    .brand-item {
        padding: 15px;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .commitment-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .logo {
        font-size: 18px;
    }

    .logo i {
        font-size: 24px;
    }

    .brand-name {
        font-size: 16px;
    }

    .header-icons {
        gap: 15px;
    }

    .header-icon {
        font-size: 16px;
    }

    .hero-slider {
        height: 250px;
    }

    .slide-title {
        font-size: 18px;
    }

    .slide-description {
        font-size: 12px;
    }

    .btn-cta {
        padding: 8px 20px;
        font-size: 12px;
    }

    .slider-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .slider-prev {
        left: 10px;
    }

    .slider-next {
        right: 10px;
    }

    .section-title {
        font-size: 20px;
        margin-bottom: 25px;
    }

    .products-section {
        padding: 30px 0;
    }

    .category-sidebar {
        margin-bottom: 30px;
    }

    .brands-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .commitment-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .news-title {
        font-size: 16px;
    }

    .commitment-item h5 {
        font-size: 16px;
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.btn {
    transition: var(--transition);
}

.btn:focus {
    outline: none;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    color: var(--dark-color);
}

/* Lazy Loading */
img[loading="lazy"] {
    background: var(--gray-light);
}

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

/* AOS Animation Customization */
[data-aos] {
    opacity: 0;
}

[data-aos].aos-animate {
    opacity: 1;
}
