/* General styles */
body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; /* Font phổ biến của Shopee */
    margin: 0;
    padding: 0;
    background-color: #f5f5f5; /* Nền Grey nhạt */
    color: #333;
    line-height: 1.5;
    scroll-behavior: smooth;
}

.container {
    max-width: 1200px; /* Giới hạn chiều rộng nội dung chính */
    margin: 0 auto; /* Căn giữa container */
    padding: 0 15px; /* Padding hai bên */
}

/* Header - Phong cách Shopee */
.shopee-header {
    background-color: #ee4d2d; /* Màu cam đặc trưng của Shopee */
    color: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.shopee-header .header-top {
    padding: 10px 0;
}

.shopee-header .header-top .container {
    display: flex;
    align-items: center; /* Căn giữa theo chiều dọc */
    justify-content: space-between; /* Đẩy logo và nhóm actions ra hai phía */
    gap: 20px; /* Khoảng cách giữa logo và nhóm actions */
}

.shopee-header .shopee-logo a {
    font-size: 2rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
    white-space: nowrap; /* Ngăn không cho chữ xuống dòng */
}

/* Wrapper cho Search Bar và Cart Icon để chúng luôn ở bên phải */
.header-actions {
    display: flex;
    align-items: center;
    flex-grow: 1; /* Cho phép nó mở rộng để đẩy logo sang trái */
    justify-content: flex-end; /* Đẩy nội dung bên trong (search & cart) sang phải */
    gap: 20px; /* Khoảng cách giữa search bar và giỏ hàng */
}

/* Thanh tìm kiếm */
.shopee-header .search-bar {
    position: relative; /* Quan trọng để định vị icon bên trong */
    display: flex;
    align-items: center; /* Căn giữa icon và input */
    flex-grow: 1; /* Cho phép nó mở rộng */
    max-width: 600px; /* Giới hạn chiều rộng tối đa */
    background-color: white;
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1); /* Thêm bóng nhẹ cho thanh tìm kiếm */
}

/* Biểu tượng tìm kiếm bên trong input */
.shopee-header .search-bar .search-icon-inside {
    position: absolute; /* Định vị tuyệt đối */
    left: 15px; /* Cách lề trái */
    color: #999; /* Màu Grey cho icon */
    font-size: 1rem; /* Kích thước icon */
    z-index: 1; /* Đảm bảo icon nằm trên input */
}

.shopee-header .search-bar input {
    flex-grow: 1;
    border: none;
    padding: 8px 15px 8px 40px; /* Tăng padding-left để chừa chỗ cho icon */
    font-size: 1rem;
    outline: none;
    /* Đảm bảo input có border hoặc style riêng nếu cần */
}

/* Nút tìm kiếm bằng chữ (giao diện cũ) */
.shopee-header .search-bar .search-button-text {
    background-color: white; /* Giữ màu White như giao diện cũ */
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    color: #ee4d2d; /* Màu cam cho chữ "Tìm kiếm" */
    font-size: 1.1rem;
    transition: background-color 0.2s ease;
    white-space: nowrap; /* Ngăn không cho chữ xuống dòng */
}

.shopee-header .search-bar .search-button-text:hover {
    background-color: #f0f0f0;
}

/* Giỏ hàng */
.shopee-header .header-nav {
    display: flex;
    align-items: center;
    gap: 15px;
}

.shopee-header .cart-icon {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    position: relative; /* Quan trọng cho số lượng giỏ hàng */
}

.shopee-header .cart-icon i {
    font-size: 1.5rem;
}

/* Số lượng sản phẩm trong giỏ hàng */
#cartItemCount {
    background-color: #ff0000; /* Màu Red nổi bật */
    color: white;
    border-radius: 50%; /* Hình tròn */
    padding: 2px 6px; /* Điều chỉnh padding */
    font-size: 0.75rem; /* Kích thước chữ nhỏ hơn */
    line-height: 1; /* Đảm bảo căn giữa */
    position: absolute;
    top: -5px; /* Điều chỉnh vị trí trên icon */
    right: -10px; /* Điều chỉnh vị trí bên phải icon */
    min-width: 18px; /* Đảm bảo hình tròn không bị méo khi số nhỏ */
    text-align: center;
    border: 1px solid white; /* Viền White nhỏ */
}

.shopee-header .cart-icon:hover {
    color: #ffd2c5;
}

.shopee-header .header-bottom {
    background-color: #e84c2d;
    padding: 8px 0;
}

.shopee-header .categories-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 15px;
}

.shopee-header .categories-list li a {
    color: white;
    text-decoration: none;
    font-size: 0.95rem;
    padding: 5px 0;
    transition: color 0.2s ease;
}

.shopee-header .categories-list li a:hover {
    color: #ffd2c5;
}

/* Banner Section */
.banner-section {
    margin-top: 20px;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.banner-section .main-banner {
    width: 100%;
    height: auto;
    display: block;
}

/* Common Section Styling */
section {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-top: 20px;
}

h2 {
    color: #ee4d2d;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

/* Product List (Homepage) */
.product-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.product-item {
    background-color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: left;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    overflow: hidden;
    cursor: pointer;
}

.product-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

.product-item .product-image-wrapper {
    width: 100%;
    padding-top: 100%; /* Tạo tỷ lệ khung hình 1:1 cho ảnh */
    position: relative;
    overflow: hidden;
    margin-bottom: 5px;
}

.product-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px 4px 0 0;
    display: block;
}

.product-item .product-info {
    padding: 8px;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}

.product-item h3 {
    font-size: 0.9rem;
    color: #333;
    margin: 0;
    line-height: 1.3;
    height: 38px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 5px;
}

.product-item .price {
    font-size: 1rem;
    font-weight: bold;
    color: #ee4d2d;
    margin: auto 0 8px 0;
    white-space: nowrap;
}

.product-item button {
    background-color: #ee4d2d;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 0.85rem;
    width: 100%;
    align-self: center;
}

.product-item button:hover {
    background-color: #d84315;
}

/* Product Detail Page */
.product-detail-section {
    margin-top: 20px; /* Thêm margin top cho section cha */
}
.product-detail-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    /* margin-top: 20px; Đã di chuyển lên product-detail-section */
}

.product-detail-images {
    flex: 1;
    min-width: 300px;
    max-width: 450px;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.product-detail-images img.main-image {
    width: 100%;
    height: 400px;
    object-fit: contain; /* Giữ nguyên tỷ lệ, không cắt ảnh */
    border-radius: 5px;
    margin-bottom: 15px;
    border: 1px solid #f0f0f0;
}

.thumbnail-gallery {
    display: flex;
    gap: 10px;
    overflow-x: auto; /* Cho phép cuộn ngang nếu nhiều ảnh */
    padding-bottom: 5px; /* Để scrollbar không che ảnh */
}

.thumbnail-gallery img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 2px solid #f0f0f0;
    border-radius: 5px;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.thumbnail-gallery img.active,
.thumbnail-gallery img:hover {
    border-color: #ee4d2d;
}

.product-detail-info {
    flex: 2;
    min-width: 350px;
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.product-detail-info h1 {
    font-size: 1.8rem;
    color: #333;
    margin-top: 0;
    margin-bottom: 15px;
}

.product-detail-info .price-section {
    background-color: #fff0ed; /* Nền nhạt cho giá */
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.product-detail-info .current-price {
    font-size: 2.2rem;
    font-weight: bold;
    color: #ee4d2d;
}

.product-detail-info .original-price {
    font-size: 1.2rem;
    color: #999;
    text-decoration: line-through;
}

.product-detail-info .description-section {
    margin-bottom: 20px;
}

.product-detail-info .description-section h3 {
    font-size: 1.2rem;
    color: #555;
    margin-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 5px;
}

.product-detail-info .description-section p {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
}

.product-options {
    margin-bottom: 25px;
}

.product-options h3 {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 10px;
}

.option-group {
    margin-bottom: 15px;
}

.option-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: #444;
}

.option-group .option-buttons button {
    background-color: white;
    border: 1px solid #ddd;
    padding: 8px 15px;
    border-radius: 4px;
    margin-right: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.option-group .option-buttons button:hover {
    border-color: #ee4d2d;
    color: #ee4d2d;
}

.option-group .option-buttons button.selected {
    background-color: #fff0ed;
    border-color: #ee4d2d;
    color: #ee4d2d;
    font-weight: bold;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
}

.quantity-selector label {
    font-weight: bold;
    color: #444;
}

.quantity-selector input {
    width: 60px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-size: 1rem;
    -moz-appearance: textfield; /* Hide arrows on Firefox */
}

.quantity-selector input::-webkit-outer-spin-button,
.quantity-selector input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity-selector button {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background-color 0.2s ease;
}

.quantity-selector button:hover {
    background-color: #e0e0e0;
}

.add-to-cart-btn {
    background-color: #ee4d2d;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    transition: background-color 0.2s ease;
    width: 100%;
}

.add-to-cart-btn:hover {
    background-color: #d84315;
}

/* Cart Page */
.cart-content {
    max-width: 45%;
    margin: 20px auto;
}

.cart-items {
    padding: 0;
    margin: 0;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px dashed #eee;
}
.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
    margin-right: 15px;
    border: 1px solid #f0f0f0;
}

.cart-item-details {
    flex-grow: 1;
}
.cart-item-details .item-name {
    font-weight: bold;
    font-size: 1rem;
    color: #333;
    margin-bottom: 5px;
}
.cart-item-details .item-options {
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 5px;
}

.cart-item-quantity-control {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-right: 20px;
}
.cart-item-quantity-control button {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    width: 28px;
    height: 28px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background-color 0.2s ease;
}
.cart-item-quantity-control button:hover {
    background-color: #e0e0e0;
}
.cart-item-quantity-control input {
    width: 40px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 3px;
    text-align: center;
    font-size: 0.9rem;
    -moz-appearance: textfield;
}

.cart-item-price {
    font-weight: bold;
    color: #ee4d2d;
    font-size: 1rem;
    margin-right: 15px;
    white-space: nowrap;
}

.cart-item-remove button {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 1.1rem;
    transition: color 0.2s ease;
}
.cart-item-remove button:hover {
    color: #ee4d2d;
}

.cart-summary {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px solid #f0f0f0;
}

.cart-summary .subtotal,
.cart-summary .shipping-fee,
.cart-summary .discount-amount {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    color: #555;
}

.cart-summary .total {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    font-size: 1.2rem;
    color: #ee4d2d;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #eee;
}

.voucher-section {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

#voucherInput {
    flex-grow: 1;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 1rem;
    min-width: 150px;
}

#applyVoucherBtn {
    background-color: #5cb85c;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-size: 1rem;
}

#applyVoucherBtn:hover {
    background-color: #4cae4c;
    transform: translateY(-2px);
}

.checkout-action-buttons {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 20px;
}

.checkout-action-buttons .btn-continue-shopping,
.checkout-action-buttons .btn-checkout {
    flex: 1;
    text-align: center;
    padding: 12px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: background-color 0.2s ease, transform 0.2s ease;
    text-decoration: none;
}

.checkout-action-buttons .btn-continue-shopping {
    background-color: #6c757d;
    color: white;
}
.checkout-action-buttons .btn-continue-shopping:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
}

.checkout-action-buttons .btn-checkout {
    background-color: #ee4d2d;
    color: white;
}
.checkout-action-buttons .btn-checkout:hover {
    background-color: #d84315;
    transform: translateY(-2px);
}

/* Checkout Page */
.checkout-form-container {
    max-width: 700px;
    margin: 20px auto;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #444;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box; /* Bao gồm padding và border vào kích thước */
}

.form-group textarea {
    resize: vertical; /* Cho phép thay đổi kích thước theo chiều dọc */
    min-height: 80px;
}

.payment-method-section {
    margin-bottom: 20px;
}

.payment-method-section label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: #444;
}

.payment-method-section .radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.payment-method-section .radio-group input[type="radio"] {
    margin-right: 8px;
}

.checkout-summary-section {
    margin-top: 30px;
    border-top: 2px solid #f0f0f0;
    padding-top: 20px;
}

.checkout-summary-section .summary-line {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 0.95rem;
    color: #555;
}

.checkout-summary-section .summary-total {
    font-weight: bold;
    font-size: 1.25rem;
    color: #ee4d2d;
    padding: 10px 0;
    border-top: 1px dashed #eee;
    margin-top: 10px;
}

.place-order-btn {
    background-color: #ee4d2d;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    transition: background-color 0.2s ease;
    width: 100%;
    margin-top: 20px;
}

.place-order-btn:hover {
    background-color: #d84315;
}

/* Footer */
footer {
    text-align: center;
    padding: 1.5rem 0;
    background-color: #333;
    color: #bbb;
    margin-top: 30px;
    font-size: 0.85rem;
}

/* Toast Notification */
#toastContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none; /* Cho phép click xuyên qua nếu không phải toast */
}

.toast-message {
    background-color: #5cb85c;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateX(100%);
    animation: slideIn 0.5s forwards, fadeOut 0.5s 2.5s forwards;
    min-width: 250px;
    text-align: center;
    font-size: 1rem;
    pointer-events: auto; /* Cho phép tương tác với toast */
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; transform: translateX(100%); }
}

---

/* Responsive */
@media (max-width: 992px) {
    .shopee-header .search-bar { max-width: 400px; }
    .product-list { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }

    .product-detail-container { flex-direction: column; gap: 20px; }
    .product-detail-images, .product-detail-info { min-width: unset; max-width: unset; width: 100%; }

    .product-detail-images {
        padding: 15px; /* Giảm padding */
    }
    .product-detail-images img.main-image {
        height: 300px; /* Giảm chiều cao ảnh chính */
        margin-bottom: 10px;
    }
    .thumbnail-gallery img {
        width: 60px; /* Ảnh thumbnail nhỏ hơn */
        height: 60px;
    }

    .product-detail-info {
        padding: 20px; /* Giảm padding */
    }
    .product-detail-info h1 {
        font-size: 1.6rem; /* Giảm kích thước tiêu đề sản phẩm */
        margin-bottom: 10px;
    }
    .product-detail-info .price-section {
        padding: 12px 15px; /* Giảm padding cho phần giá */
        margin-bottom: 15px;
    }
    .product-detail-info .current-price {
        font-size: 1.8rem; /* Giảm kích thước giá hiện tại */
    }
    .product-detail-info .original-price {
        font-size: 1rem; /* Giảm kích thước giá gốc */
    }
    .product-detail-info .description-section h3 {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }
    .product-detail-info .description-section p {
        font-size: 0.9rem;
    }
    .option-group label {
        font-size: 0.95rem;
        margin-bottom: 6px;
    }
    .option-group .option-buttons button {
        padding: 7px 12px;
        font-size: 0.9rem;
        margin-right: 6px;
        margin-bottom: 6px;
    }
    .quantity-selector label {
        font-size: 0.95rem;
    }
    .quantity-selector input {
        width: 50px; /* Giảm chiều rộng ô số lượng */
        padding: 6px;
        font-size: 0.9rem;
    }
    .quantity-selector button {
        width: 26px; /* Nút tăng giảm nhỏ hơn */
        height: 26px;
        font-size: 1.1rem;
    }
    .add-to-cart-btn {
        padding: 12px 20px; /* Giảm padding nút thêm giỏ hàng */
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .shopee-header .header-top .container {
        flex-direction: column; /* Xếp cPink logo, header-actions */
        align-items: stretch; /* Mở rộng theo chiều ngang */
        gap: 8px; /* Giảm khoảng cách tổng thể */
        padding: 8px 15px;
    }
    .shopee-header .shopee-logo {
        text-align: center;
        margin-bottom: 5px;
    }
    .shopee-header .shopee-logo a {
        font-size: 1.8rem; /* Giảm kích thước logo */
    }
    .header-actions { /* Wrapper của search và cart */
        flex-direction: column; /* Xếp cPink search-bar và giỏ hàng */
        align-items: stretch; /* Mở rộng theo chiều ngang */
        justify-content: center; /* Căn giữa khi xếp cPink */
        width: 100%;
        gap: 10px;
    }
    .shopee-header .search-bar {
        width: 100%; /* Chiếm toàn bộ chiều rộng khả dụng */
        max-width: unset; /* Bỏ giới hạn max-width */
    }
    .shopee-header .search-bar input {
        padding: 7px 10px 7px 38px; /* Điều chỉnh padding cho input */
        font-size: 0.95rem; /* Kích thước font hợp lý hơn */
    }
    .shopee-header .search-bar .search-icon-inside {
        left: 12px; /* Dịch icon tìm kiếm vào trong hơn */
        font-size: 1rem;
    }
    .shopee-header .search-bar .search-button-text {
        padding: 7px 12px;
    }
    .shopee-header .header-nav {
        justify-content: center; /* Căn giữa giỏ hàng khi ở mobile */
        width: 100%;
    }
    .shopee-header .cart-icon {
        font-size: 1rem;
    }
    .shopee-header .cart-icon i {
        font-size: 1.3rem; /* Icon giỏ hàng nhỏ hơn một chút */
    }
    #cartItemCount {
        top: -3px; /* Dịch lên trên một chút */
        right: -8px; /* Dịch sang trái một chút */
        padding: 1px 5px; /* Giảm padding */
        font-size: 0.7rem; /* Nhỏ hơn nữa */
        min-width: 16px;
    }

    h2 { font-size: 1.3rem; }
    .banner-section { margin-top: 15px; }

    .cart-item {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 10px;
        padding: 10px 0; /* Giảm padding item giỏ hàng */
        align-items: flex-start; /* Căn trên cùng */
    }
    .cart-item-image {
        margin-right: 0;
        width: 70px; /* Ảnh sản phẩm trong giỏ hàng nhỏ hơn */
        height: 70px;
    }
    .cart-item-details { width: 100%; text-align: left; }
    .cart-item-details .item-name {
        font-size: 0.95rem;
    }
    .cart-item-details .item-options {
        font-size: 0.8rem;
    }
    .cart-item-quantity-control {
        width: 100%;
        text-align: left;
        justify-content: flex-start;
    }
    .cart-item-quantity-control button {
        width: 25px; /* Nút +/- nhỏ hơn */
        height: 25px;
        font-size: 1rem;
    }
    .cart-item-quantity-control input {
        width: 35px; /* Ô số lượng nhỏ hơn */
        padding: 4px;
        font-size: 0.85rem;
    }
    .cart-item-price {
        width: 100%;
        text-align: right;
        font-size: 0.95rem;
        margin-right: 0; /* Loại bỏ margin-right */
    }
    .cart-item-remove { width: 100%; text-align: right; } /* Để nút xóa nằm riêng một dòng */
    .cart-item-remove button {
        font-size: 1rem;
    }

    .cart-summary .subtotal,
    .cart-summary .shipping-fee,
    .cart-summary .discount-amount {
        font-size: 0.9rem;
    }
    .cart-summary .total {
        font-size: 1.1rem;
    }

    .voucher-section {
        flex-direction: column;
        align-items: stretch;
        margin-top: 15px; /* Giảm margin top */
        gap: 8px; /* Giảm khoảng cách giữa input và button */
    }
    #voucherInput, #applyVoucherBtn {
        width: 100%;
        box-sizing: border-box;
        padding: 8px 10px; /* Giảm padding */
        font-size: 0.95rem;
    }

    .checkout-action-buttons {
        flex-direction: column;
        gap: 10px;
        margin-top: 15px; /* Giảm margin top */
    }
    .checkout-action-buttons .btn-continue-shopping,
    .checkout-action-buttons .btn-checkout {
        padding: 10px 15px; /* Giảm padding nút */
        font-size: 0.95rem;
    }

    .checkout-form-container { padding: 15px; }
    .form-group label {
        font-size: 0.95rem;
        margin-bottom: 4px;
    }
    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="tel"],
    .form-group textarea {
        padding: 9px 10px; /* Giảm padding input */
        font-size: 0.95rem;
    }
    .form-group textarea {
        min-height: 70px;
    }
    .payment-method-section .radio-group { gap: 8px; }
    .checkout-summary-section .summary-line {
        font-size: 0.9rem;
    }
    .checkout-summary-section .summary-total {
        font-size: 1.15rem;
        padding-top: 8px;
        margin-top: 8px;
    }
    .place-order-btn { padding: 12px; font-size: 1rem; margin-top: 15px; }
}

@media (max-width: 480px) {
    .shopee-header .shopee-logo a { font-size: 1.6rem; }
    .shopee-header .search-bar input { padding: 6px 8px 6px 32px; /* Điều chỉnh padding cho màn hình nhỏ hơn */ font-size: 0.85rem; }
    .shopee-header .search-bar .search-icon-inside { left: 8px; font-size: 0.9rem; }
    .shopee-header .search-bar .search-button-text { padding: 6px 10px; font-size: 1rem; }
    .shopee-header .cart-icon { font-size: 1rem; }
    .shopee-header .cart-icon i { font-size: 1.1rem; }
    #cartItemCount {
        top: -2px;
        right: -6px;
        padding: 0 4px;
        font-size: 0.65rem;
        min-width: 14px;
    }
    .shopee-header .categories-list {
        gap: 10px; /* Giảm khoảng cách giữa các danh mục */
        justify-content: center; /* Căn giữa các danh mục */
    }
    .shopee-header .categories-list li a { font-size: 0.8rem; padding: 3px 0; }


    .products { padding: 15px; }
    h2 { font-size: 1.2rem; }

    .product-list { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .product-item .product-info { padding: 5px; }
    .product-item h3 { font-size: 0.8rem; height: 32px; line-height: 1.2; margin-bottom: 3px; }
    .product-item .price { font-size: 0.9rem; margin-bottom: 5px; }
    .product-item button { font-size: 0.75rem; padding: 4px 6px; }

    .product-detail-images img.main-image {
        height: 250px;
    }
    .thumbnail-gallery img {
        width: 50px;
        height: 50px;
    }
    .product-detail-info h1 {
        font-size: 1.4rem;
    }
    .product-detail-info .current-price {
        font-size: 1.6rem;
    }
    .product-detail-info .original-price {
        font-size: 0.9rem;
    }
    .product-detail-info .description-section p {
        font-size: 0.85rem;
    }
    .add-to-cart-btn {
        padding: 10px 15px;
        font-size: 0.95rem;
    }


    #toastContainer { top: 10px; right: 10px; left: 10px; align-items: center; }
    .toast-message { width: calc(100% - 20px); min-width: unset; font-size: 0.85rem; padding: 8px 12px; }

    .cart-item { font-size: 0.9rem; padding: 8px 0; }
    .cart-item-image { width: 60px; height: 60px; }
    .cart-item-details .item-name { font-size: 0.9rem; }
    .cart-item-details .item-options { font-size: 0.75rem; }
    .cart-item-price { font-size: 0.9rem; }
    .cart-item-remove button { font-size: 0.9rem; }
    .voucher-section #voucherInput, #applyVoucherBtn { padding: 8px; font-size: 0.9rem; }
    .cart-summary .total { font-size: 1.1rem; }
    .checkout-action-buttons .btn-checkout, .checkout-action-buttons .btn-continue-shopping { padding: 10px; font-size: 0.95rem; }

    .form-group input, .form-group textarea { padding: 8px 10px; font-size: 0.9rem; }
    .payment-method-section label { font-size: 0.95rem; }
    .checkout-summary-section .summary-total { font-size: 1.1rem; }
    .place-order-btn { padding: 12px; font-size: 1rem; }
}
/* Existing styles */
/* ... your current style.css content ... */

/* New styles for random products section */
.random-products-section {
    margin-top: 40px; /* Space above the section */
    padding: 20px 0;
    border-top: 1px solid #eee; /* Separator line */
    text-align: center;
}

.random-products-section h2 {
    font-size: 1.8em;
    color: #ee4d2d; /* Shopee's orange color */
    margin-bottom: 25px;
}

/* Reuse the product-grid style from your index.html if you have it */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); /* Adjust minmax for desired item width */
    gap: 20px; /* Space between products */
    max-width: 1200px; /* Max width for the grid */
    margin: 0 auto; /* Center the grid */
}

/* Reuse styling for individual product items. Ensure these styles are generic enough */
.product-item {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.product-item .product-image-wrapper {
    width: 100%;
    padding-bottom: 100%; /* Creates a square container */
    position: relative;
    overflow: hidden;
    margin-bottom: 10px;
}

.product-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; /* Ensure the whole image is visible */
    border-radius: 3px;
}

.product-item .product-info h3 {
    font-size: 1.1em;
    margin-bottom: 5px;
    color: #333;
    height: 2.8em; /* Limit height for two lines */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-item .product-info .price {
    font-size: 1.2em;
    color: #ee4d2d;
    font-weight: bold;
    margin-bottom: 10px;
}

.add-to-cart-btn-random {
    background-color: #ee4d2d; /* Shopee orange */
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.2s ease;
    width: 90%; /* Make button fill most of the width */
}

.add-to-cart-btn-random:hover {
    background-color: #d13c24;
}

/* Existing header CSS if you want to make Shopee logo smaller */
.shopee-logo-img { /* Apply this class to your <a> tag around the img */
    width: 100px; /* Or whatever size you prefer */
    height: auto;
    display: block; /* Important for block-level sizing */
}
.shopee-logo-img img { /* Target the image directly if it's there */
    width: 100%;
    height: auto;
    display: block;
}

/* General button styling for .shopee-header .search-bar button */
.shopee-header .search-bar button {
    background-color: #ee4d2d; /* Shopee orange */
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 0 2px 2px 0;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.2s;
}

.shopee-header .search-bar button:hover {
    background-color: #d13c24;
}
/* Existing CSS */
/* ... your existing style.css content ... */

/* New CSS for Product Detail Page */
.product-detail-section {
    padding: 40px 0;
}

.product-detail-container {
    display: flex;
    flex-wrap: wrap; /* Allows wrapping on smaller screens */
    gap: 30px;
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.product-image-gallery {
    flex: 1; /* Takes available space */
    min-width: 300px; /* Minimum width before wrapping */
    max-width: 450px; /* Max width for consistency */
    display: flex;
    flex-direction: column;
    align-items: center;
}

#mainProductImage {
    width: 100%;
    height: 350px; /* Fixed height for main image */
    object-fit: contain; /* Contain the image within the element */
    border: 1px solid #eee;
    border-radius: 5px;
    margin-bottom: 15px;
}

.thumbnail-gallery {
    display: flex;
    gap: 10px;
    overflow-x: auto; /* Allow scrolling if many thumbnails */
    padding-bottom: 5px; /* Space for scrollbar */
}

.thumbnail-item {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.thumbnail-item:hover,
.thumbnail-item.active { /* Add .active class with JS if you want to highlight active thumbnail */
    border-color: #ee4d2d;
    box-shadow: 0 0 5px rgba(238, 77, 45, 0.5);
}

.product-info-detail {
    flex: 2; /* Takes more space */
    min-width: 300px; /* Minimum width before wrapping */
    padding-left: 20px;
}

#productTitle {
    font-size: 2.2em;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.3;
}

.product-price-section {
    margin-bottom: 20px;
    display: flex;
    align-items: baseline;
    gap: 15px;
}

.current-price {
    font-size: 2.5em;
    color: #ee4d2d; /* Shopee orange */
    font-weight: bold;
}

.original-price {
    font-size: 1.2em;
    color: #999;
    text-decoration: line-through;
}

/* NEW STYLE FOR SOLD QUANTITY */
.product-sold-quantity {
    font-size: 1.1em;
    color: #555;
    margin-bottom: 20px;
    padding-top: 10px;
    border-top: 1px dashed #eee; /* A subtle separator */
}

.product-sold-quantity strong {
    color: #ee4d2d;
    font-weight: bold;
}
/* END NEW STYLE */

.product-description {
    font-size: 1.1em;
    color: #666;
    line-height: 1.6;
    margin-bottom: 25px;
}

.product-options .option-group {
    margin-bottom: 15px;
}

.product-options label {
    font-weight: bold;
    margin-right: 10px;
    color: #444;
}

.product-options select {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    min-width: 150px;
    cursor: pointer;
}

.quantity-selector {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.quantity-selector label {
    font-weight: bold;
    margin-right: 10px;
    color: #444;
}

.quantity-selector button {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    width: 35px;
    height: 35px;
    font-size: 1.2em;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.quantity-selector button:hover {
    background-color: #e0e0e0;
}

#quantityInput {
    width: 60px;
    text-align: center;
    border: 1px solid #ddd;
    border-left: none;
    border-right: none;
    height: 35px;
    font-size: 1em;
    -moz-appearance: textfield; /* Hide arrows for Firefox */
}
/* Hide arrows for Chrome, Safari, Edge */
#quantityInput::-webkit-outer-spin-button,
#quantityInput::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}


.add-to-cart-btn-detail {
    background-color: #ee4d2d; /* Shopee orange */
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2em;
    font-weight: bold;
    transition: background-color 0.3s ease;
    width: 100%;
    max-width: 300px;
}

.add-to-cart-btn-detail:hover {
    background-color: #d13c24;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .product-detail-container {
        flex-direction: column;
        padding: 15px;
    }

    .product-image-gallery, .product-info-detail {
        min-width: unset;
        width: 100%;
        padding-left: 0;
    }

    #mainProductImage {
        height: 280px;
    }

    .thumbnail-gallery {
        justify-content: center;
    }

    #productTitle {
        font-size: 1.8em;
    }

    .current-price {
        font-size: 2em;
    }

    .add-to-cart-btn-detail {
        max-width: 100%;
        font-size: 1em;
        padding: 12px 20px;
    }
}
/* Áp dụng cho tất cả các phần tử có thể chứa số (ví dụ: span, div, p) */
span, div, p, strong, b {
    font-weight: normal; /* Đặt lại độ đậm về bình thường */
}

/* Hoặc cụ thể hơn cho các phần tử hiển thị giá, số lượng, v.v. */
.price,
.item-quantity-input,
.cart-item-price,
#subtotalAmount,
#shippingFeeAmount,
#discountAmount,
#totalAmount,
#soldQuantity {
    font-weight: normal !important; /* Dùng !important nếu cần ghi đè các quy tắc khác */
}
.product-detail-container .product-price-section { /* Nên dùng selector chính xác hơn cho phần giá tiền của bạn */
    background-color: #fff0ed; /* Nền nhạt cho giá */
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: flex;
    align-items: baseline;
    gap: 10px;

    /* Đặt lại các thuộc tính font cho toàn bộ khối giá */
    font-family: inherit;   /* Kế thừa font từ cha */
    font-weight: normal;    /* Bỏ in đậm nếu có */
    font-style: normal;     /* Bỏ in nghiêng nếu có */
    font-size: 1em;         /* Kích thước font mặc định */
    line-height: 1.5;       /* Chiều cao dòng bình thường */
    color: inherit;         /* Kế thừa màu chữ */
}

/* Quan trọng: Cần chỉnh riêng cho span.current-price nếu nó đang bị to hoặc đậm */
.product-detail-container .current-price { /* Thêm selector cha để ưu tiên hơn */
    font-family: inherit; /* Kế thừa font chính của trang */
    font-weight: normal;  /* Đặt về bình thường, không in đậm */
    font-size: 1.6em;     /* Ví dụ: 1.2em hoặc 18px, tùy bạn muốn kích thước bao nhiêu */
    font-style: normal;   /* Đảm bảo không in nghiêng */
    color: #ee4d2d;          /* Ví dụ: màu xám đậm bình thường, thay vì màu cam Shopee */
}

/* Nếu bạn có cả original-price, cũng nên điều chỉnh tương tự */
.product-detail-container .original-price {
    font-family: inherit;
    font-weight: normal;
    font-size: 1em; /* Nhỏ hơn current-price */
    font-style: normal;
    color: #999;
}

