body {
    font-family: Arial, sans-serif;
    background-color: #f9e8ec;
    margin: 0;
    padding: 0;
    padding-bottom: 60px;
}

.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #ffccd5;
    padding: 16px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.logo h1 {
    color: #ff4d6d;
    margin: 0;
    font-size: 32px;
    display: inline-block;
}

nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

nav:nth-child(3) {
    padding-right: 64px;
}

nav a {
    color: #ff4d6d;
    text-decoration: none;
    font-weight: bold;
    margin-left: 16px;
}

nav a:hover {
    color: #e6004c;
}

.cart-icon {
    font-size: 24px;
    color: #ff4d6d;
    cursor: pointer;
    position: relative;
    display: inline-flex;
    align-items: center;
}

.cart-count {
    background-color: #e6004c;
    color: white;
    border-radius: 50%;
    padding: 3px 8px;
    font-size: 14px;
    position: absolute;
    top: 0px;
    right: 0px;
    transform: translate(50%, -50%);
    vertical-align: top;
}

.hero {
    margin: 0 auto;
    position: relative; /* Để đặt vị trí cho nội dung bên trên ảnh */
    max-width: 1200px;
    margin-top: 80px;
}

.hero-image {
    width: 100%; /* Để ảnh co lại theo chiều ngang */
    height: auto; /* Giữ tỷ lệ khung hình */
}

.products {
    max-width: 1200px;
    margin: 32px auto;
    padding: 0 16px;
    display: grid;
    gap: 24px;
    margin-top: 40px;
}

/* Breakpoints để điều chỉnh số cột */
@media (max-width: 600px) {
    .products {
        grid-template-columns: repeat(2, minmax(0, 1fr)); /* Tối thiểu 2 cột */
    }
}

@media (min-width: 601px) and (max-width: 900px) {
    .products {
        grid-template-columns: repeat(3, minmax(0, 1fr)); /* 3 cột */
    }
}

@media (min-width: 901px) {
    .products {
        grid-template-columns: repeat(4, minmax(0, 1fr)); /* Tối đa 4 cột */
    }
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-top: 10px;
}

.product-card:hover {
    transform: translateY(-5px);
}

.discount-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #ff4d6d;
    color: white;
    border-radius: 50%;
    padding: 4px;
    font-size: 10px;
    font-weight: bold;
    text-align: center;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.product-card img {
    width: 100%;
    height: 250px;
    object-fit: contain;
    position: relative;
}

.product-card .details {
    padding: 16px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-top: 8px;
    padding-bottom: 16px;
}

.product-card h3 {
    color: #ff4d6d;
    margin: 0 0 8px;
    font-size: 19px;
    text-align: center;
}

.price-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
    justify-content: center;
}

.original-price {
    color: #555;
    text-decoration: line-through;
    font-size: 14px;
    opacity: 0.6;
}

.discounted-price {
    color: #e6004c;
    font-weight: bold;
    font-size: 16px;
}

.product-card button {
    background-color: #ff4d6d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: block;
    margin: 0 auto;
    width: 80%;
    white-space: nowrap;
}

.product-card button:hover {
    background-color: #e6004c;
}

.cart {
    max-width: 800px; /* Giới hạn chiều rộng để tránh tràn */
    margin: 32px auto;
    padding: 16px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-top: 80px;
}

.cart h2 {
    color: #ff4d6d;
    text-align: center;
}

.cart table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.cart th, .cart td {
    padding: 8px;
    border: 1px solid #eee;
    text-align: left;
}

.cart th {
    background-color: #ffccd5;
    color: #ff4d6d;
}

.cart .total {
    font-weight: bold;
    color: #e6004c;
    text-align: right;
    margin-top: 16px;
}

.cart .total::before {
    content: "Tổng: ";
}

.cart .total::after {
    content: "đ";
}

.cart .empty {
    text-align: center;
    color: #555;
}

.quantity-input {
    width: 50px;
    padding: 4px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Căn giữa nút "Tiến hành thanh toán" */
#proceed-to-checkout {
    display: block;
    margin: 20px auto;
    padding: 10px 20px;
    background-color: #ff4d6d;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 200px;
}

#proceed-to-checkout:hover {
    background-color: #e6004c;
}

/* Làm đẹp và giới hạn chiều rộng của form "Thông tin giao hàng" */
.cart .form-group {
    margin-bottom: 20px;
}

.cart .form-group label {
    display: block;
    color: #ff4d6d;
    font-weight: bold;
    margin-bottom: 5px;
}

.cart .form-group input {
    width: 100%; /* Đảm bảo không tràn, giới hạn bởi container */
    max-width: 100%; /* Giới hạn tối đa */
    padding: 10px;
    border: 2px solid #ffccd5;
    border-radius: 5px;
    font-size: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: border-color 0.3s;
    box-sizing: border-box; /* Đảm bảo padding không làm tràn */
}

.cart .form-group input:focus {
    border-color: #ff4d6d;
    outline: none;
}

.cart .form-group input[required] + label::after {
    content: " *";
    color: #e6004c;
}

.cart .form-group textarea {
    width: 100%;
    max-width: 100%;
    padding: 10px;
    border: 2px solid #ffccd5;
    border-radius: 5px;
    font-size: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: border-color 0.3s;
    box-sizing: border-box;
    resize: vertical;
}

.cart .form-group textarea:focus {
    border-color: #ff4d6d;
    outline: none;
}

#submit-order {
    display: block;
    margin: 20px auto;
    padding: 12px 25px;
    background-color: #ff4d6d;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 200px;
    font-size: 16px;
}

#submit-order:hover {
    background-color: #e6004c;
}

footer {
    text-align: center;
    padding: 16px;
    background-color: #ffccd5;
    color: #ff4d6d;
    margin-top: 32px;
}

.notification {
    position: fixed;
    top: 80px;
    right: 20px;
    background-color: #4caf50;
    color: white;
    padding: 16px;
    border-radius: 5px;
    display: none;
    z-index: 1000;
    animation: fadeInOut 3s ease-in-out;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(-20px); }
    20% { opacity: 1; transform: translateY(0); }
    80% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-20px); }
}

.admin {
    max-width: 1200px;
    margin: 32px auto;
    padding: 16px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-top: 80px;
}

.admin h2 {
    color: #ff4d6d;
    text-align: center;
}

.admin table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.admin th, .admin td {
    padding: 8px;
    border: 1px solid #eee;
    text-align: left;
}

.admin th {
    background-color: #ffccd5;
    color: #ff4d6d;
}

.admin .btn {
    display: inline-block;
    background-color: #ff4d6d;
    color: white;
    padding: 8px 16px;
    border-radius: 5px;
    text-decoration: none;
    margin: 8px 0;
}

.admin .btn:hover {
    background-color: #e6004c;
}

.admin .btn-small {
    padding: 5px 10px;
    font-size: 14px;
}

.admin .btn-danger {
    background-color: #e6004c;
}

.admin .btn-secondary {
    background-color: #555;
}

.admin .form-group {
    margin-bottom: 16px;
}

.admin .form-group label {
    display: block;
    color: #ff4d6d;
    margin-bottom: 5px;
}

.admin .form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.btn {
    background-color: #ff4d6d;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #e6004c;
}

.btn-danger {
    background-color: #e6004c;
}

/* Thanh menu cố định dưới cùng */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #ffccd5;
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #ff4d6d;
    text-decoration: none;
    font-size: 12px;
}

.nav-item i {
    font-size: 24px;
    margin-bottom: 5px;
}

.nav-item:hover {
    color: #e6004c;
}