/* Reset CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

/* Cấu trúc tổng thể */
body {
    background-color: #f4f4f4;
    color: #333;
    text-align: center;
}

/* Header */
header {
    background-color: #007bff;
    color: white;
    padding: 15px;
}

header h1 {
    margin-bottom: 10px;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 20px;
}

nav ul li {
    display: inline;
}

nav ul li a {
    text-decoration: none;
    color: white;
    font-size: 18px;
    padding: 8px 12px;
}

nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 5px;
}

/* Section */
section {
    margin: 30px;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Sản phẩm */
#products {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.product {
    width: 250px; /* Định kích thước sản phẩm */
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    background: white;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
}


.product img {
    width: 100%;
    height: auto;
    border-radius: 5px;
}

.product p {
    margin: 10px 0;
}

/* Nút bấm */
button {
    padding: 8px 12px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

button:hover {
    background-color: #0056b3;
}

/* Giỏ hàng */
.cart-container {
    max-width: 800px;
    margin: auto;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table th, table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: center;
}

table th {
    background-color: #007bff;
    color: white;
}

/* Ảnh sản phẩm trong giỏ hàng */
table td img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Input số lượng */
.quantity-input {
    width: 50px;
    padding: 5px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* Các nút trong giỏ hàng */
.update-btn, .delete-btn {
    padding: 6px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.update-btn {
    background-color: #28a745;
    color: white;
    border: none;
}

.update-btn:hover {
    background-color: #218838;
}

.delete-btn {
    background-color: #dc3545;
    color: white;
    border: none;
}

.delete-btn:hover {
    background-color: #c82333;
}

.clear-btn, .buy-btn {
    margin-top: 10px;
    padding: 10px 15px;
    font-size: 16px;
    border-radius: 5px;
}

.clear-btn {
    background-color: #ff4d4d;
}

.clear-btn:hover {
    background-color: #e60000;
}

.buy-btn {
    background-color: #28a745;
}

.buy-btn:hover {
    background-color: #218838;
}

/* Form đăng nhập & đăng ký */
.form-container {
    width: 100%;
    max-width: 400px;
    margin: 50px auto;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.form-container h2 {
    margin-bottom: 20px;
}

.form-container label {
    display: block;
    margin: 10px 0 5px;
    text-align: left;
}

.form-container input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.form-container button {
    width: 100%;
    padding: 10px;
    font-size: 16px;
}

.form-container p {
    margin-top: 10px;
}

.form-container a {
    color: #007bff;
    text-decoration: none;
}

.form-container a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    background-color: #f8f9fa;
    padding: 20px;
    margin-top: 20px;
    text-align: center;
    border-top: 1px solid #ddd;
}

.footer-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: auto;
}

.footer-section {
    text-align: left;
    max-width: 250px;
}

.footer-section h4 {
    font-weight: bold;
}

.footer-section a {
    display: block;
    color: #007bff;
    text-decoration: none;
    margin: 5px 0;
}

.footer-section a:hover {
    text-decoration: underline;
}

.footer-section img {
    max-width: 150px;
}

.copyright {
    margin-top: 20px;
}

.search-form {
    margin-bottom: 20px;
    text-align: center;
}

.search-form input {
    width: 60%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.search-form button {
    padding: 10px 15px;
    background-color: #007bff;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;
}

.search-form button:hover {
    background-color: #0056b3;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    text-decoration: none;
    padding: 10px 15px;
    color: white;
    display: inline-block;
}

nav ul li a:hover {
    background: #555;
    border-radius: 5px;
}

.add-product-link {
    background: #28a745;
    border-radius: 5px;
    font-weight: bold;
}

.add-product-link:hover {
    background: #218838;
}

/* CSS cho danh sách sản phẩm */
.product-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

.product-item {
    background: white;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-align: center;
    width: 150px;
}

.product-item img {
    width: 100%;
    height: auto;
    border-radius: 5px;
}

.product-item p {
    margin: 5px 0;
    font-size: 14px;
}

/* Định dạng Header Admin */
.admin-header {
    background-color: #007bff;
    color: white;
    padding: 15px;
    text-align: center;
}

.admin-header h1 {
    margin: 0;
    font-size: 24px;
}

/* Menu Admin */
nav ul {
    list-style: none;
    padding: 0;
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

nav ul li {
    display: inline;
}

nav ul li a {
    text-decoration: none;
    background: white;
    color: #007bff;
    padding: 10px 15px;
    border-radius: 5px;
    font-weight: bold;
    transition: 0.3s;
}

nav ul li a:hover {
    background: #0056b3;
    color: white;
}

/* Nội dung Admin */
.admin-container {
    width: 60%;
    margin: 30px auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.admin-container h2 {
    color: #333;
    font-size: 22px;
}

.admin-container p {
    font-size: 16px;
    color: #666;
}

/* Nút quay lại - Căn góc trái trên cùng */
.back-button {
    position: absolute;
    top: 20px; /* Khoảng cách từ trên xuống */
    left: 20px; /* Căn sát lề trái */
    padding: 10px 15px;
    background: #dc3545; /* Màu đỏ */
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
}

.back-button:hover {
    background: #c82333;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Căn trái */
}

.logo {
    max-width: 120px; /* Điều chỉnh kích thước */
    height: auto;
    margin-right: 15px; /* Tạo khoảng cách với tiêu đề */
}

.header-container h1 {
    margin: 0;
    font-size: 24px; /* Điều chỉnh font chữ */
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
}

th {
    background-color: #f4f4f4;
}

button {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
}

button:hover {
    background-color: #218838;
}

a {
    color: red;
    text-decoration: none;
    margin-left: 10px;
}

a:hover {
    text-decoration: underline;
}

.back-button {
    display: inline-block;
    margin-bottom: 15px;
    padding: 8px 12px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
}

.back-button:hover {
    background-color: #0056b3;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    margin: 20px;
    padding: 20px;
}

h2 {
    text-align: center;
    color: #333;
}

table {
    width: 80%;
    margin: 20px auto;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

th, td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
}

th {
    background-color: #007bff;
    color: white;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

tr:hover {
    background-color: #f1f1f1;
}

a.delete-btn {
    display: inline-block;
    padding: 6px 12px;
    background-color: #dc3545;
    color: white;
    text-decoration: none;
    border-radius: 5px;
}

a.delete-btn:hover {
    background-color: #c82333;
}

/* Nút quay lại */
.back-container {
    text-align: center;
    margin-top: 30px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 25px;
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-size: 18px;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease-in-out;
    position: relative;
    overflow: hidden;
}

.back-btn::before {
    content: "⬅";
    font-size: 20px;
    margin-right: 10px;
}

.back-btn:hover {
    background: linear-gradient(135deg, #2E7D32, #1B5E20);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* ======== PHẢN HỒI KHÁCH HÀNG ======== */
.feedback-container {
    max-width: 600px;
    margin: 30px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.feedback-container h2 {
    margin-bottom: 15px;
    color: #333;
}

.feedback-container form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.feedback-container input,
.feedback-container textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
}

.feedback-container textarea {
    height: 100px;
    resize: vertical;
}

.feedback-container button {
    background: #007bff;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.feedback-container button:hover {
    background: #0056b3;
}

/* ======== DANH SÁCH PHẢN HỒI ======== */
.feedback-list {
    max-width: 600px;
    margin: 20px auto;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
}

.feedback-item {
    background: white;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
}

.feedback-item p {
    margin: 0;
    font-size: 16px;
}

.feedback-item small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

/* ======== PHẦN TIÊU ĐỀ ======== */
.feedback-section {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
    border-left: 5px solid #007bff;
}

.feedback-section h2 {
    font-size: 26px;
    font-weight: bold;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 3px solid #007bff;
    display: inline-block;
    text-transform: uppercase;
}

/* ======== DANH SÁCH PHẢN HỒI ======== */
.feedback-list {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ======== HỘP PHẢN HỒI ======== */
.feedback-item {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 15px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.feedback-item:hover {
    transform: scale(1.02);
    box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.15);
}

/* ======== TÊN KHÁCH HÀNG ======== */
.feedback-item p b {
    font-size: 18px;
    color: #007bff;
    display: block;
}

/* ======== NỘI DUNG PHẢN HỒI ======== */
.feedback-item p {
    margin: 5px 0;
    font-size: 16px;
    color: #444;
    line-height: 1.5;
}

/* ======== THỜI GIAN PHẢN HỒI ======== */
.feedback-item small {
    align-self: flex-end;
    font-size: 13px;
    color: #777;
    font-style: italic;
}

/* ======== HIỆU ỨNG DẤU NGOẶC TRANG TRÍ ======== */
.feedback-item::before {
    content: "“";
    font-size: 40px;
    font-weight: bold;
    color: #007bff;
    position: absolute;
    top: 5px;
    left: 10px;
}

.feedback-item::after {
    content: "”";
    font-size: 40px;
    font-weight: bold;
    color: #007bff;
    position: absolute;
    bottom: 5px;
    right: 10px;
}

/* Container for Add User Form */
.add-user-container {
    background: #fff;
    width: 350px;
    margin: 50px auto;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.add-user-container h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 22px;
}

.add-user-container label {
    display: block;
    font-weight: bold;
    text-align: left;
    margin-bottom: 5px;
    color: #555;
}

.add-user-container input,
.add-user-container select {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
}

.add-user-container button {
    width: 100%;
    padding: 12px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.add-user-container button:hover {
    background: #0056b3;
}

/* Style for User List */
.user-list-container {
    width: 80%;
    margin: 20px auto;
    text-align: center;
}

.user-list-container table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.user-list-container th, .user-list-container td {
    padding: 12px;
    border: 1px solid #ddd;
}

.user-list-container th {
    background: #007bff;
    color: white;
}

.user-list-container td {
    background: #f9f9f9;
}

/* Delete button */
.delete-btn {
    color: red;
    text-decoration: none;
    font-weight: bold;
}

.delete-btn:hover {
    text-decoration: underline;
}

/* Back button */
.back-container {
    text-align: center;
    margin-top: 20px;
}

.back-btn {
    display: inline-block;
    background: #333;
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.3s;
}

.back-btn:hover {
    background: #555;
}

/* Cấu trúc sản phẩm */
.product-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.product {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 200px;
}

.product:hover {
    transform: translateY(-5px); /* Nổi lên khi hover */
    box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.2);
}

/* Hiệu ứng ảnh */
.product img {
    width: 100%;
    border-radius: 5px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product img:hover {
    transform: scale(1.1); /* Phóng to nhẹ */
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.2); /* Tạo bóng */
}

/* Nút Add to Cart */
.product button {
    width: 100%;
    padding: 10px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.product button:hover {
    background: #0056b3;
}

.product-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.product {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 220px;
}

.product:hover {
    transform: translateY(-5px);
    box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.2);
}

/* Hiệu ứng ảnh */
.product img {
    width: 100%;
    border-radius: 5px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product img:hover {
    transform: scale(1.1);
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.2);
}

.product-desc {
    font-size: 14px;
    color: #555;
    margin-top: 5px;
}

.view-details {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
}

.view-details:hover {
    text-decoration: underline;
}

/* Trang chi tiết sản phẩm */
.product-detail {
    width: 80%;
    margin: auto;
    text-align: center;
}

.product-detail img {
    width: 300px;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
}

.product-detail p {
    font-size: 16px;
    line-height: 1.5;
}

html {
    scroll-behavior: smooth;
}
.search-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
}

.search-container form {
    display: flex;
    gap: 10px;
}

.search-container input[type="text"] {
    padding: 6px 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

.search-container button {
    padding: 6px 12px;
    border: none;
    background-color: #007bff;
    color: white;
    border-radius: 5px;
    cursor: pointer;
}

.search-container button:hover {
    background-color: #0056b3;
}
