* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background: #f5f5f5;
    min-height: 100vh;
}

/* Header */
.header-top {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    background: #d82a2e;
    color: #fff;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.logo img {
    height: 40px;
}

.search-bar {
    flex-grow: 1;
    margin: 0 20px;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 5px;
    outline: none;
}

.search-bar button {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    padding: 0 15px;
    background: #fff;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.header-actions button {
    background: none;
    border: none;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

/* Main Layout */
main {
    display: flex;
    margin-top: 60px;
}

/* Sidebar */
.sidebar {
    width: 200px;
    background: #fff;
    padding: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 60px;
    bottom: 0;
    overflow-y: auto;
}

.sidebar ul {
    list-style: none;
}

.sidebar ul li {
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
}

.sidebar ul li:hover {
    background: #f5f5f5;
}

/* Main Content */
.main-content {
    flex-grow: 1;
    padding: 20px;
    margin-left: 200px;
}

/* Banner */
.banner {
    position: relative;
    margin-bottom: 20px;
    width: 100%;
    padding-top: 33.33%;
    height: 0;
    overflow: hidden;
}

.banner img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
    transition: opacity 0.5s ease-in-out;
    background-color: #f5f5f5;
}

.banner .prev, .banner .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 18px;
}

.banner .prev {
    left: 10px;
}

.banner .next {
    right: 10px;
}

/* Filters */
.filters {
    background: #fff;
    padding: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.filters h2 {
    font-size: 18px;
    color: #d82a2e;
    margin-right: 20px;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-buttons button {
    background: #f5f5f5;
    border: 1px solid #ddd;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
}

.filter-buttons button:hover {
    background: #d82a2e;
    color: #fff;
    border-color: #d82a2e;
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 5px;
}

.sort-options select {
    padding: 5px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

/* Product List */
#productList {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.product {
    background: #fff;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: left;
    position: relative;
    cursor: pointer;
}

.product img {
    max-width: 100%;
    height: 150px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.product h3 {
    font-size: 16px;
    color: #333;
    margin: 10px 0;
    font-weight: bold;
}

.product .price {
    font-size: 16px;
    color: #d82a2e;
    font-weight: bold;
}

.product .original-price {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
    margin-left: 5px;
}

.product .discount {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #d82a2e;
    color: #fff;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.product .promo {
    font-size: 12px;
    color: #333;
    margin: 5px 0;
}

.product .rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}

.product .rating .stars {
    color: #f1c40f;
}

.product .rating .likes {
    display: flex;
    align-items: center;
    gap: 3px;
}

.product .rating .likes .heart {
    color: #d82a2e;
}

/* Product Detail */
#productDetail {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.back-button {
    background: #ddd;
    color: #333;
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 20px;
}

.back-button:hover {
    background: #ccc;
}

.product-detail-container {
    display: flex;
    gap: 20px;
}

.product-detail-image {
    flex: 1;
}

.product-detail-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    transition: opacity 0.3s ease-in-out;
}

.thumbnail-gallery {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.thumbnail-gallery img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    border: 1px solid #ddd;
}

.thumbnail-gallery img:hover {
    border-color: #d82a2e;
}

.thumbnail-gallery img.active {
    border-color: #d82a2e;
    opacity: 0.8;
}

.product-detail-info {
    flex: 1;
}

.product-detail-info h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
}

.product-detail-info .rating {
    margin-bottom: 10px;
}

.product-detail-info .price-section {
    margin-bottom: 20px;
}

.product-detail-info .price {
    font-size: 24px;
    color: #d82a2e;
    font-weight: bold;
}

.product-detail-info .original-price {
    font-size: 16px;
    color: #999;
    text-decoration: line-through;
    margin-left: 10px;
}

.product-detail-info .discount {
    background: #d82a2e;
    color: #fff;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 14px;
    margin-left: 10px;
}

#variantOptions h4 {
    font-size: 16px;
    margin: 10px 0;
}

#variantOptions button {
    background: #f5f5f5;
    border: 1px solid #ddd;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    margin: 0 10px 10px 0;
}

#variantOptions button.active {
    background: #d82a2e;
    color: #fff;
    border-color: #d82a2e;
}

.description {
    margin-bottom: 20px;
}

.description h4 {
    font-size: 16px;
    margin-bottom: 10px;
}

.description ul {
    list-style: disc;
    padding-left: 20px;
}

.description li {
    font-size: 14px;
    color: #333;
    margin-bottom: 5px;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.add-to-cart {
    background: #fff;
    color: #d82a2e;
    border: 1px solid #d82a2e;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.add-to-cart:hover {
    background: #f5f5f5;
}

.buy-now {
    background: #d82a2e;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.buy-now:hover {
    background: #b52327;
}

/* Cart Section */
#cart {
    padding: 20px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.cart-item img {
    width: 50px;
    height: auto;
}

.cart-item h4 {
    flex-grow: 1;
    font-size: 14px;
}

.cart-item .quantity {
    display: flex;
    align-items: center;
    gap: 5px;
}

.cart-item .quantity button {
    background: #ddd;
    padding: 5px;
    width: 25px;
    height: 25px;
}

.cart-summary {
    margin-top: 20px;
    text-align: right;
}

.cart-summary p {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

/* Profile Section */
#profile {
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin: 20px;
}

.profile-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.profile-info p {
    margin: 10px 0;
    font-size: 16px;
}

.profile-info strong {
    color: #d82a2e;
}

.profile-actions {
    display: flex;
    gap: 10px;
}

.profile-actions button {
    background: #d82a2e;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.profile-actions button:hover {
    background: #b52327;
}

/* Contact Section */
#contact {
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin: 20px;
}

.contact-content {
    display: flex;
    gap: 20px;
}

#contactForm {
    flex: 1;
}

#contactForm input,
#contactForm textarea {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
}

#contactForm textarea {
    height: 150px;
    resize: vertical;
}

#contactForm button {
    background: #d82a2e;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
}

.contact-info {
    flex: 1;
}

.contact-info p {
    margin: 10px 0;
    font-size: 16px;
}

.contact-info strong {
    color: #d82a2e;
}

/* Button Styles */
button {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover {
    opacity: 0.9;
}

#cart button {
    background: #d82a2e; /* Đã sửa từ #d82a2eA */
    color: #fff;
}

.cart-item button {
    background: #ddd;
    color: #333;
}

/* Floating Buttons */
.floating-buttons {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.floating-buttons button {
    background: #d82a2e;
    color: #fff;
    padding: 10px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.pagination button {
    background: #f5f5f5;
    border: 1px solid #ddd;
    padding: 5px 15px;
    border-radius: 5px;
    cursor: pointer;
}

.pagination button.active {
    background: #d82a2e;
    color: #fff;
    border-color: #d82a2e;
}

/* Auth Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
}

.modal-content {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    width: 300px;
    text-align: center;
    position: relative;
}

.modal-content .close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
    cursor: pointer;
}

.modal-content h2 {
    margin-bottom: 20px;
}

.modal-content input {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.modal-content button {
    background: #d82a2e;
    color: #fff;
    padding: 10px;
    border: none;
    border-radius: 5px;
    width: 100%;
    cursor: pointer;
}

#authSwitch {
    margin-top: 10px;
    color: #d82a2e;
    cursor: pointer;
}

/* Edit Profile Modal */
#editProfileModal .modal-content {
    width: 350px;
}

#editProfileForm input {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
}

#editProfileForm button {
    background: #d82a2e;
    color: #fff;
    padding: 10px;
    border: none;
    border-radius: 5px;
    width: 100%;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
    main {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        position: static;
        margin-bottom: 20px;
    }

    .main-content {
        margin-left: 0;
    }

    .banner {
        padding-top: 33.33%;
    }

    .banner img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    #productList {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .product img {
        height: 120px;
    }

    .product-detail-container {
        flex-direction: column;
    }

    .product-detail-image img {
        width: 100%;
        height: auto;
    }

    .thumbnail-gallery {
        justify-content: center;
    }

    .action-buttons {
        flex-direction: column;
    }

    .add-to-cart, .buy-now {
        width: 100%;
    }

    .contact-content {
        flex-direction: column;
    }
}
.floating-buttons {
    display: flex; /* hoặc block tùy vào thiết kế của bạn */
    /* các style khác của floating buttons */
}