﻿/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

    .header-content .left-bar {
        display: flex;
        align-items: center;
        gap: 40px;
    }

        .header-content .left-bar .nav-link {
            font-size: 15px;
            color: #000;
            text-transform: uppercase;
        }


.logo img {
    max-height: 50px;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2d3748;
}

/*.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #64748b;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

    .nav-link:hover,
    .nav-link.active {
        color: #1e293b;
        background-color: #f1f5f9;
    }*/

.nav {
    background: #fff;
    padding: 0;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
}

.nav-item {
    position: relative;
}

.nav-link {
    text-decoration: none;
    font-weight: bold;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

    .nav-link:hover,
    .nav-link.active {
        color: #1e293b;
        text-decoration: none;
    }

        .nav-link:hover:after {
            content: "";
            position: absolute;
            height: 2px;
            background: black;
            width: 100%;
            left: 0;
            bottom: 0;
        }

/* Submenu */
.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    list-style: none;
    padding: 0;
    min-width: 150px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

    .submenu .submenu {
        top: 0;
        left: 100%;
    }

/* Hiển thị submenu khi hover */
.has-submenu:hover > .submenu {
    display: block;
}

.submenu-item a {
    display: block;
    padding: 10px 14px;
    color: #333;
    text-decoration: none;
}

    .submenu-item a:hover {
        background-color: #f5f5f5;
    }

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.action-btn {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

    .action-btn:hover {
        color: #1e293b;
        background-color: #f1f5f9;
    }

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-btn {
    display: none;
}

/* Hero Section */
.hero {
    /*background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);*/
    color: white;
    padding: 6rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    height:450px;
}

    .hero::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: url('/Images/banner.jpg') center/cover;
        opacity: 1;
        z-index: -1;
    }

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-text h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-text p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.9;
}

.cta-btn {
    background: #fff;
    color: #667eea;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

    .cta-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    }

/* Section Styles */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: #1e293b;
}

/* Categories Section */
.categories {
    padding: 5rem 0;
    background: #f8fafc;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.category-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

    .category-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    }

.category-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.category-info {
    padding: 1.5rem;
    text-align: center;
}

    .category-info h3 {
        font-size: 1.3rem;
        font-weight: 600;
        color: #1e293b;
    }

/* Products Section */
.products {
    padding: 5rem 0;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.sort-select {
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    font-size: 1rem;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

    .sort-select:focus {
        outline: none;
        border-color: #667eea;
    }

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

    .product-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    }

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.product-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
}

.badge-sale {
    background: #ef4444;
}

.badge-new {
    background: #10b981;
}

.product-info {
    padding: 1.5rem;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.current-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ef4444;
}

.original-price {
    font-size: 1rem;
    color: #94a3b8;
    text-decoration: line-through;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.stars {
    color: #fbbf24;
}

.rating-text {
    font-size: 0.9rem;
    color: #64748b;
}

.add-to-cart-btn {
    width: 100%;
    background: #667eea;
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

    .add-to-cart-btn:hover {
        background: #5a67d8;
    }

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100dvh;
    background: white;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 2000;
    display: flex;
    flex-direction: column;
}

    .cart-sidebar.open {
        right: 0;
    }

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    height: 70px;
    text-transform: uppercase;
}

    .cart-header h3 {
        font-size: 15px;
        font-weight: bold;
    }

.close-cart {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: #64748b;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.cart-item-details {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.cart-item-price {
    font-weight: 600;
    color: #ef4444;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.quantity-btn {
    background: #f1f5f9;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .quantity-btn:hover {
        background: #e2e8f0;
    }

.quantity {
    padding: 0.25rem 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    width: 50px;
    text-align: center;
}

.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid #e2e8f0;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
}

.cart-total {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    text-align: center;
}

.checkout-btn {
    width: 100%;
    min-height: 50px;
    background: #000;
    border: none;
    font-size: 15px;
    text-transform: uppercase;
    color: #fff;
    outline: none;
    transition: all 0.3s ease-in-out 0s;
    -moz-transition: all 0.3s ease-in-out 0s;
    -o-transition: all 0.3s ease-in-out 0s;
    -webkit-transition: all 0.3s ease-in-out 0s;
    -ms-transition: all 0.3s ease-in-out 0s;
    /* background-size: 25px; */
    /* background-position: 45px 11px; */
    float: left;
    padding: 7px 0;
}

    .checkout-btn:hover {
        background: #059669;
    }

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 3000;
    align-items: center;
    justify-content: center;
}

    .modal.open {
        display: flex;
    }

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    margin: 2rem;
    width: 100%;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.modal-body {
    padding: 2rem;
}

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.product-detail-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 12px;
}

.product-detail-info h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.product-detail-price {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

    .product-detail-price .current-price {
        font-size: 1.5rem;
    }

.product-description {
    /*color: #64748b;*/
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.product-options {
    margin-bottom: 2rem;
}

.option-group {
    margin-bottom: 1rem;
}

.option-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.option-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.option-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .option-btn:hover,
    .option-btn.selected {
        border-color: #667eea;
        background: #667eea;
        color: white;
    }

.add-to-cart-modal-btn {
    width: 100%;
    background: #667eea;
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

    .add-to-cart-modal-btn:hover {
        background: #5a67d8;
    }

/* Footer */
.footer {
    background: #f1f1f1;
    padding: 3rem 0 1rem;
}

.footer-content {
    display:flex;
}

.footer h3 {
    padding: 20px 0;
    margin: 0;
    font-size: 14px;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
    list-style-type: none;
    display:flex;
    gap:10px;
    padding:0;
}

    .footer-section ul li {
        margin-bottom: 0.5rem;
    }

.footer-section a {
    color: #252a2b;
    text-decoration: none;
    outline: none;
}


.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    padding: 0.5rem 1rem;
    background: #334155;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

    .social-link:hover {
        background: #475569;
    }

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    color: #94a3b8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-text h2 {
        font-size: 2rem;
    }

    .hero-text p {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .products-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .cart-sidebar {
        width: 100%;
        right: -100%;
    }

    .modal-content {
        margin: 1rem;
    }

    .product-detail {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .header-content {
        padding: 0.75rem 0;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .hero {
        padding: 4rem 0;
    }

    .categories,
    .products {
        padding: 3rem 0;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Animation Classes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

.jus-center {
    justify-content: center;
}

.text-uppercase {
    text-transform: uppercase;
}
