/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ed0c0c;
    --secondary-color: #de8d1e;
    --accent-color: #d4af37;
    --text-color: #333;
    --text-light: #666;
    --border-color: #e0e0e0;
    --bg-light: #fff5f5;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Global Link Styles */
a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    padding: 15px 0;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.logo h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.main-nav > ul {
    display: flex;
    list-style: none;
    gap: 35px;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 15px;
    transition: color 0.3s;
    position: relative;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-color);
}

.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
}

/* Dropdown Menu */
.main-nav .has-dropdown {
    position: relative;
}

.main-nav .has-dropdown > a {
    display: flex;
    align-items: center;
    gap: 5px;
}

.dropdown-icon {
    transition: transform 0.3s;
}

.has-dropdown:hover .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 260px;
    width: max-content;
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
    border-radius: 12px;
    padding: 15px 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.4s ease;
    z-index: 1000;
    margin-top: 20px;
    border: 1px solid rgba(0,0,0,0.05);
    display: block;
}

.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
    display: block;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s;
    font-size: 15px;
    font-weight: 500;
    position: relative;
    white-space: nowrap;
}

.dropdown-menu .menu-icon {
    flex-shrink: 0;
    color: var(--text-light);
    transition: all 0.3s;
}

.dropdown-menu a:hover {
    background: linear-gradient(90deg, var(--bg-light) 0%, transparent 100%);
    color: var(--primary-color);
    padding-left: 25px;
}

.dropdown-menu a:hover .menu-icon {
    color: var(--primary-color);
    transform: scale(1.1);
}

.dropdown-menu a::after {
    display: none;
}

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

.search-box {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    overflow: hidden;
    padding: 8px 15px;
}

.search-box input {
    border: none;
    outline: none;
    padding: 0;
    font-size: 14px;
    width: 200px;
}

.search-box button {
    border: none;
    background: none;
    cursor: pointer;
    color: var(--text-light);
    padding: 0;
    display: flex;
    align-items: center;
}

.cart {
    position: relative;
    cursor: pointer;
    color: var(--text-color);
}

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

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    border-radius: 2px;
}

/* Hero Slider */
.hero-slider {
    position: relative;
    height: 500px;
    overflow: hidden;
}

.slider-wrapper {
    height: 100%;
}

.slide {
    height: 100%;
    display: none;
    align-items: center;
    position: relative;
}

.slide.active {
    display: flex;
}

.slide-content {
    color: white;
    max-width: 600px;
}

.slide-title {
    font-size: 52px;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.2;
}

.slide-subtitle {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.95;
}

.btn {
    display: inline-block;
    padding: 14px 35px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    font-size: 15px;
}

.btn-primary {
    background: white;
    color: var(--primary-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Slider Controls */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10;
    color: var(--text-color);
}

.slider-btn:hover {
    background: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.prev-btn {
    left: 30px;
}

.next-btn {
    right: 30px;
}

/* Slider Dots */
.slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

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

.dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.dot.active {
    background: white;
    width: 30px;
    border-radius: 6px;
}

/* Categories */
.categories {
    padding: 60px 0;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.category-item {
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s;
}

.category-item:hover {
    transform: translateY(-5px);
}

.category-image {
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 15px;
}

.placeholder-image {
    width: 100%;
    padding-top: 100%;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
}

.placeholder-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
}

.category-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
}

/* Products Section */
.products-section {
    padding: 60px 0;
}

.products-section.bg-light {
    background: var(--bg-light);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-color);
}

.view-all {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: color 0.3s;
}

.view-all:hover {
    color: var(--secondary-color);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s;
    position: relative;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

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

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent-color);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 1;
}

.product-badge.new {
    background: var(--secondary-color);
}

.product-badge.hot {
    background: var(--primary-color);
}

.product-image {
    position: relative;
    overflow: hidden;
}

.product-image .placeholder-image {
    padding-top: 100%;
}

.product-info {
    padding: 20px;
}

.product-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-color);
    min-height: 48px;
}

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

.price-sale {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-color);
}

.price-regular {
    font-size: 15px;
    color: var(--text-light);
    text-decoration: line-through;
}

.btn-add-cart {
    width: calc(100% - 40px);
    margin: 0 20px 20px;
    padding: 12px;
    background:
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.15) 0.5px, transparent 0.5px),
        radial-gradient(circle at 60% 70%, rgba(0,0,0,0.1) 0.5px, transparent 0.5px),
        radial-gradient(circle at 45% 20%, rgba(255,255,255,0.1) 0.5px, transparent 0.5px),
        radial-gradient(circle at 80% 50%, rgba(0,0,0,0.08) 0.5px, transparent 0.5px),
        radial-gradient(circle at 15% 80%, rgba(255,255,255,0.12) 0.5px, transparent 0.5px),
        linear-gradient(135deg, var(--primary-color) 0%, #c41e1e 100%);
    background-size: 3px 3px, 4px 4px, 2px 2px, 3px 3px, 2.5px 2.5px, 100%;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow:
        0 2px 4px rgba(0,0,0,0.1),
        inset 0 1px 0 rgba(255,255,255,0.2),
        inset 0 -1px 0 rgba(0,0,0,0.2);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    position: relative;
}

.btn-add-cart svg {
    flex-shrink: 0;
}

.btn-add-cart:hover {
    background:
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.2) 0.5px, transparent 0.5px),
        radial-gradient(circle at 60% 70%, rgba(0,0,0,0.12) 0.5px, transparent 0.5px),
        radial-gradient(circle at 45% 20%, rgba(255,255,255,0.15) 0.5px, transparent 0.5px),
        radial-gradient(circle at 80% 50%, rgba(0,0,0,0.1) 0.5px, transparent 0.5px),
        radial-gradient(circle at 15% 80%, rgba(255,255,255,0.18) 0.5px, transparent 0.5px),
        linear-gradient(135deg, var(--secondary-color) 0%, #f59e0b 100%);
    background-size: 3px 3px, 4px 4px, 2px 2px, 3px 3px, 2.5px 2.5px, 100%;
    transform: translateY(-1px);
    box-shadow:
        0 4px 8px rgba(0,0,0,0.15),
        inset 0 1px 0 rgba(255,255,255,0.3),
        inset 0 -1px 0 rgba(0,0,0,0.25);
}

/* Blog Section */
.blog-section {
    padding: 60px 0;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.blog-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

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

.blog-image .placeholder-image {
    padding-top: 60%;
}

.blog-content {
    padding: 25px;
}

.blog-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--text-light);
}

.blog-category {
    color: var(--primary-color);
    font-weight: 600;
}

.blog-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-color);
    line-height: 1.4;
}

.blog-excerpt {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 15px;
}

.blog-readmore {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.3s;
}

.blog-readmore:hover {
    color: var(--secondary-color);
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #8b1a1a 0%, #c41e1e 50%, #de8d1e 100%);
    color: white;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-col p {
    color: rgba(255,255,255,0.8);
    line-height: 1.8;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: var(--secondary-color);
}

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

/* Responsive */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }

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

@media (max-width: 768px) {
    .main-nav {
        display: none;
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 0;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        z-index: 999;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        width: 100%;
    }

    .main-nav.active {
        display: flex;
    }

    .main-nav > ul {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

    .main-nav > ul > li {
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
    }

    .main-nav > ul > li > a {
        display: block;
        padding: 15px 20px;
        width: 100%;
    }

    /* Dropdown menu trên mobile */
    .has-dropdown .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        box-shadow: none;
        border: none;
        border-radius: 0;
        margin: 0;
        padding: 0;
        background: #f8f8f8;
        display: none;
        width: 100%;
        min-width: 100%;
    }

    .has-dropdown:hover .dropdown-menu {
        display: none;
    }

    .has-dropdown.active .dropdown-menu {
        display: block;
    }

    .has-dropdown.active .dropdown-icon {
        transform: rotate(180deg);
    }

    .dropdown-menu li {
        border-bottom: 1px solid #e0e0e0;
        width: 100%;
    }

    .dropdown-menu li:last-child {
        border-bottom: none;
    }

    .dropdown-menu a {
        padding: 14px 20px 14px 40px;
        width: 100%;
        font-size: 14px;
    }

    .dropdown-menu .menu-icon {
        width: 16px;
        height: 16px;
    }

    .mobile-menu-toggle {
        display: flex;
        z-index: 1000;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    .mobile-menu-toggle span {
        transition: all 0.3s ease;
    }

    .search-box input {
        width: 120px;
    }

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

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

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

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

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

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

@media (max-width: 480px) {
    .header-actions {
        gap: 10px;
    }

    .search-box {
        display: none;
    }

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

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

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