* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial;
    background: #f5f5f5;
    font-size: 23px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 40px 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo img {
    height: 50px;
}
/* Đảm bảo right-box là gốc định vị */
.right-box {
    position: relative; 
}
.search-suggestions {
    position: absolute;
    top: 100%; 
    left: 0;
    width: 250px; /* Hoặc chiều rộng của input */
    max-height: 250px;
    overflow-y: auto;
    background: white;
    border: 1px solid #ddd;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 999; 
    display: none;
}
.suggestion-item {
    display: flex;
    align-items: center;
    gap: 10px; 
    padding: 8px 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    color: #333; 
    text-decoration: none; 
}
.suggestion-image {
    width: 40px; 
    height: 40px;
    object-fit: cover; 
    border-radius: 3px;
}
.suggestion-info {
    flex-grow: 1;
}
.suggestion-name {
    font-weight: bold;
    color: #007bff; 
    white-space: nowrap; 
    overflow: hidden;
    text-overflow: ellipsis; 
}
.suggestion-price {
    color: red;
    font-size: 13px;
}

/* menu chính */
.menu {
    list-style: none;
    display: flex;
    gap: 40px;
    margin-left: 0;
    align-items: center;
}

.menu>li {
    position: relative;
}

.menu a {
    white-space: nowrap;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    padding: 8px;
    font-size: 15px;
}

.menu a:hover {
    color: #ff9900;
}

/* submenu */
.submenu {
    list-style: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    padding: 10px 0;
    min-width: 150px;
    display: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);

}

.submenu li a {
    display: block;
    padding: 8px 15px;
    color: #333;
}

.submenu li a:hover {
    background: #f1f1f1;
    color: #ff9900;
}

.menu li:hover .submenu {
    display: block;
}

/* khối bên phải */
.right-box {
    display: flex;
    align-items: center;
}

.right-box input {
    border: none;
    border-bottom: 1px solid #ccc;
    padding: 5px 10px;
    outline: none;
}

.right-box i {
    font-size: 18px;
    color: #333;
    margin-left: 10px;
}

.right-box i:hover {
    color: #ff9900;
}

/* top right */
.top-right a {
    color: #000;
    text-decoration: none;
    margin: 0 5px;
    font-size: 16px;
    font-weight: 500;
}

.top-right a:hover {
    color: #74C0FC;
}

/* <!--==================== Thêm sản phẩm ====================--> */


/* --- Vùng chứa toàn bộ giỏ hàng --- */
.muasp {
    width: 70%;
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);

}

/* --- Bảng sản phẩm --- */
.muasp table {
    width: 100%;
    border-collapse: collapse;

}

.muasp th {
    text-align: left;
    padding: 12px;
    border-bottom: 2px solid #eee;
    font-size: 20px;
}

.muasp td {
    padding: 12px;
    vertical-align: middle;

}

.muasp img {
    width: 80px;
    border-radius: 8px;
}

/* --- Nút tăng giảm số lượng --- */
/* .muasp .sl {
    display: flex;
    align-items: center;
    gap: 5px;
}

.muasp .sl button {
    width: 30px;
    height: 30px;
    border: 1px solid #ccc;
    background: #fff;
    margin: 33px 0 0 0;
}

.muasp .sl input {
    width: 50px;
    text-align: center;
    border: 1px solid #ccc;
    height: 30px;
    margin: 33px 0 0 0;
} */
/* ----------------------------------------------------------------sửa nút */
.cart-img {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    border: 2px solid transparent;
    cursor: pointer;
    object-fit: cover;
    transition: 0.3s;
}

.cart-img:hover {
    border-color: #ff6600;
  transform: scale(1.1);
}

/* Styling cho ô điều khiển số lượng */
.quantity-controls {
    display: flex;
    /* Sắp xếp các phần tử theo hàng ngang */
    align-items: center;
    width: 120px;
    /* Điều chỉnh chiều rộng tổng thể */
    border: 1px solid #ccc;
    border-radius: 5px;
    /* Bo góc nhẹ cho toàn bộ control */
    overflow: hidden;
    /* Đảm bảo các border không bị lộ ra */
}

/* Styling chung cho các nút tăng/giảm */
.quantity-btn {
    background-color: #f8f8f8;
    color: #333;
    border: none;
    padding: 12px 17px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.2s;
    line-height: 1;
    /* Căn chỉnh ký tự - và + */
}

/* Hiệu ứng di chuột (hover) */
.quantity-btn:hover {
    background-color: #e0e0e0;
}

/* Styling cho input số lượng */
.quantity-input {
    width: 40px;
    /* Điều chỉnh chiều rộng input */
    text-align: center;
    border: none;
    /* Xóa border của input */
    outline: none;
    /* Xóa outline khi focus */
    padding: 8px 0;
    font-size: 14px;
    background-color: #fff;
    /* Đảm bảo nền trắng */
}

/* Dấu phân cách giữa các phần tử */
.minus-btn {
    border-right: 1px solid #ccc;
}

.plus-btn {
    border-left: 1px solid #ccc;
}


/* Styling cho nút xóa (x) */
.remove-item-btn {
    background-color: #dc3545;
    /* Màu đỏ nổi bật */
    color: white;
    border: none;
    border-radius: 5px;
    /* Bo góc */
    padding: 5px 10px;
    /* Điều chỉnh kích thước */
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: background-color 0.2s;
}

.remove-item-btn:hover {
    background-color: #c82333;
    /* Đỏ đậm hơn khi hover */
}

/* --- Giá và nút xoá --- */

/* .muasp .gia {
    color: #333;
    font-weight: bold;
}

.muasp button.xoa {
    width: 30px;
    height: 30px;
    border: 1px solid #ccc;
    background: #fff;
} */

/* --- Cột tổng giỏ hàng bên phải --- */
.cart-summary {
    width: 25%;
    margin-left: 20px;
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    height: fit-content;
}

.cart-summary h3 {
    font-size: 18px;
    margin-bottom: 15px;
    border-bottom: 2px solid #eee;
    padding-bottom: 8px;
}

.cart-summary p {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
}

.cart-summary .total {
    font-weight: bold;
    color: red;
    font-size: 18px;
}

.cart-summary button {
    width: 100%;
    background: #ff6600;
    color: #fff;
    border: none;
    padding: 12px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}

/* --- Bố cục chính giỏ hàng: chia làm 2 phần --- */
.cart-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 30px;
    padding: 40px;
    flex-wrap: wrap;
    background: #f5f5f5;
}

.cart-summary button:hover {
    background: #e65c00;
}


/* ================= FOOTER ================= */
.site-footer {
    clear: both;
    background: #222;
    /* nền xám đậm */
    color: #ddd;
    /* chữ xám nhạt */
    padding: 40px 20px 20px;
    font-size: 14px;
    margin-top: 40px;
    width: 100%;
}

.site-footer .footer-container {
    max-width: 1200px;
    /* căn giữa nội dung */
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
}

.footer-column h3 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 16px;
    border-bottom: 2px solid #e63946;
    /* gạch đỏ dưới tiêu đề */
    display: inline-block;
    padding-bottom: 5px;
}

.footer-column p,
.footer-column li,
.footer-column a {
    color: #ddd;
    line-height: 1.6;
    text-decoration: none;
}

.footer-column a:hover {
    color: #e63946;
    /* đỏ khi hover */
}

.footer-logo {
    max-width: 120px;
    margin-bottom: 10px;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    margin: 6px 0;
}

.social-icons a {
    display: inline-block;
    margin-right: 10px;
}

.social-icons img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff;
    padding: 5px;
    transition: 0.3s;
}

.social-icons img:hover {
    background: #e63946;
    transform: scale(1.1);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    margin-top: 30px;
    border-top: 1px solid #444;
    font-size: 13px;
    color: #aaa;
}