/* Reset CSS để loại bỏ các mặc định của trình duyệt */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Thiết lập font chung cho trang web */
body {
  font-family: Arial, sans-serif;
  background-color: #f2f2f2;
  display: grid;
  grid-template-columns: 70% 30%; /* Chia trang thành hai cột */
  max-width: 1200px; /* Độ rộng tối đa của trang web */
  margin: 0 auto; /* Canh giữa trang web trên màn hình */
}

/* Phần tiêu đề trang web */
header {
  background-color: #ff7043;
  color: #fff;
  padding: 20px;
  text-align: center;
  grid-column: 1 / span 2; /* Trải đều qua cả hai cột */
}

/* Phần menu điều hướng */
nav {
  background-color: #FFB6C1;
  color: #fff;
  text-align: center;
  padding: 10px;
  grid-column: 1 / span 2; /* Trải đều qua cả hai cột */
}

nav ul {
  list-style: none;
}

nav ul li {
  display: inline;
  margin-right: 20px;
}



/* Phần danh sách sản phẩm */
.product-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Hiển thị 3 sản phẩm trên mỗi hàng */
  gap: 20px; /* Khoảng cách giữa các sản phẩm */
  padding: 20px;
  grid-column: 1; /* Chỉ nằm ở cột đầu tiên */
}

.product-card {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 5px;
    padding: 10px;
    transition: all 0.3s ease; /* Quan trọng: Giúp chuyển động mượt mà, không bị giật */
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05); /* Bóng nhẹ ban đầu */
    width: 100%;
    text-align: center;
}



.product-card:hover {
    transform: translateY(-10px); /* Nhấc thẻ lên 10px theo trục dọc */
    box-shadow: 0 12px 25px rgba(0,0,0,0.15); /* Làm bóng đậm và rộng hơn để tạo cảm giác "nổi" hẳn lên */
    border-color: #09c797; /* Đổi màu viền sang cam cho đồng bộ thương hiệu của bạn */
}

.product-card img {
  max-width: 100%;
  height: auto;
}

/* Phần sidebar */
.sidebar {
  background-color: #035353;
  color: #fff;
  padding: 10px;
  grid-column: 2; /* Chỉ nằm ở cột thứ hai */
}

.social-icons {
  margin-top: 20px;
}

.social-icons a {
  color: #fff;
  text-decoration: none;
  display: block;
  margin-bottom: 10px;
}

/* Phần footer */
.footer {
  background-color: #333;
  color: #fff;
  text-align: center;
  padding: 20px;
  grid-column: 1 / span 2; /* Trải đều qua cả hai cột */
  display: grid;
}

.footer-item {
  padding: 10px;
}

/* Chỉnh lại bố cục cho màn hình thiết bị di động (dưới 576px) */
@media (max-width: 576px) {
  .product-list {
    grid-template-columns: 1fr; /* Hiển thị một sản phẩm trên mỗi hàng */
  }
  .product-card {
    width: 100%;
    margin-bottom: 20px;
  }
  .sidebar {
    grid-column: 1 / span 2; /* Trải đều qua cả hai cột */
  }
  .footer {
    grid-template-columns: 1fr; /* 1 cột xếp chồng lên nhau trên di động */
  }
}

/* Chỉnh layout cho máy tính (từ 768px trở lên) */
@media (min-width: 768px) {
  .footer {
    grid-template-columns: repeat(3, 1fr); /* 3 cột trên máy tính */
  }
}

/* Định dạng các loại nút bấm */
button {
  font-family: Arial, Helvetica, sans-serif;
  font-weight: bold;
  color: white;
  background-color: #171717;

  border: none;
  border-radius: .6rem;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  padding: 20px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 4px 2px;
}

button span:not(:nth-child(6)) {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  height: 30px;
  width: 30px;
  background-color: #0c6;
  border-radius: 50%;
  transition: .6s ease;
}

button span:nth-child(6) {
  position: relative;
}

button span:nth-child(1) {
  transform: translate(-3.3em, -4em);
}

button span:nth-child(2) {
  transform: translate(-6em, 1.3em);
}

button span:nth-child(3) {
  transform: translate(-.2em, 1.8em);
}

button span:nth-child(4) {
  transform: translate(3.5em, 1.4em);
}

button span:nth-child(5) {
  transform: translate(3.5em, -3.8em);
}

button:hover span:not(:nth-child(6)) {
  transform: translate(-50%, -50%) scale(4);
  transition: 1.5s ease;
}
  

/* ---------------------- contact -------------------------- */
/* Layout cho trang liên hệ */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr; /* Chia làm 2 cột bằng nhau */
  gap: 40px;
  padding: 40px 20px;
  background-color: #fff;
  grid-column: 1 / span 2; /* Trải rộng hết trang giống header/nav */
}

/* Định dạng các ô nhập liệu */
.form-group {
  margin-bottom: 15px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

/* Hỗ trợ di động: Chuyển về 1 cột */
@media (max-width: 576px) {
  .contact-container {
    grid-template-columns: 1fr;
  }
}



/*---------------------------------- Thiết lập cho màn hình điện thoại (dưới 576px) -----------------------*/
/* Thiết lập cho màn hình điện thoại (dưới 576px) */
@media (max-width: 576px) {
  /* Đảm bảo Body không bị tràn ngang */
  body {
    display: block; /* Hủy bỏ grid 2 cột của máy tính */
    width: 100%;
    margin: 0;
    padding: 0;
  }

  /* Ép Header và Nav chiếm 100% chiều ngang */
  header,
  nav {
    width: 100% !important;
    grid-column: 1 / span 1; /* Reset lại grid nếu cần */
    box-sizing: border-box;
    margin: 0;
  }

  /* Chỉnh danh sách sản phẩm thành 1 cột và căn giữa */
  .product-list {
    display: flex;
    flex-direction: column;
    align-items: center; /* Căn giữa các card sản phẩm */
    padding: 10px;
    width: 100%;
  }

  .product-card {
    width: 90%; /* Để thừa một chút lề hai bên cho đẹp */
    margin: 10px 0;
  }

  /* Căn giữa chữ trong menu */
  nav ul {
    padding: 0;
    display: flex;
    justify-content: space-around; /* Chia đều các mục menu */
  }
}

/* ----------------------------- product cam vàng -------------------------------- */
/* TỔNG THỂ - Căn giữa toàn bộ trang */
.product-page-container { 
    max-width: 1200px; 
    margin: 40px auto; /* Tăng margin để trang thoáng hơn */
    padding: 0 20px; 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    line-height: 1.6;
}

/* BREADCRUMB - Fix lỗi tràn và lệch */
.breadcrumb {
    margin-bottom: 30px;
    font-size: 14px;
    color: #666;
}
.breadcrumb strong { color: #333; }

/* BỐ CỤC CHÍNH - Chia 2 cột đối xứng */
.product-core { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 50px; /* Tăng khoảng cách giữa ảnh và chữ */
    margin-bottom: 60px; 
    align-items: start; 
}

/* KHU VỰC ẢNH SẢN PHẨM */
.main-image-container { 
    position: relative; 
    width: 100%; 
    border-radius: 15px; 
    overflow: hidden; 
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.main-display-img { 
    width: 100%; 
    height: auto; 
    display: block; 
    object-fit: cover; 
}

/* NÚT MŨI TÊN ĐÈ LÊN ẢNH */
.slider-btn {
    position: absolute; 
    top: 50%; 
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9); 
    border: none; 
    width: 45px; 
    height: 45px;
    border-radius: 50%; 
    cursor: pointer; 
    z-index: 10; 
    font-size: 20px;
    display: flex; 
    align-items: center; 
    justify-content: center; 
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.slider-btn:hover { background: #ff7043; color: #fff; }
.prev { left: 15px; }
.next { right: 15px; }

/* THUMBNAILS - Sửa lỗi icon bị vỡ */
.thumb-row { display: flex; gap: 12px; margin-top: 20px; }
.thumb { 
    width: 80px; 
    height: 80px; 
    object-fit: cover; 
    cursor: pointer; 
    border-radius: 8px; 
    border: 2px solid #eee; 
    transition: 0.3s;
}
.thumb.active, .thumb:hover { border-color: #ff7043; opacity: 1; }

/* THÔNG TIN MUA HÀNG */
.item-name { font-size: 32px; margin: 0 0 10px 0; font-weight: 700; }
.item-price { font-size: 36px; color: #ff4d4d; font-weight: 800; margin: 20px 0; }

/* BỘ CHỌN SỐ LƯỢNG - Fix lỗi mũi tên */
.buy-box { display: flex; gap: 20px; margin-bottom: 30px; }
.qty-input { 
    display: flex; 
    border: 1px solid #ddd; 
    border-radius: 8px; 
    overflow: hidden; 
    height: 48px;
}
.qty-input input { 
    width: 60px; 
    text-align: center; 
    border: none; 
    font-weight: bold; 
    font-size: 16px;
    outline: none;
}
/* Ẩn mũi tên mặc định của trình duyệt */
.qty-input input::-webkit-outer-spin-button, 
.qty-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.qty-input button { 
    padding: 0 15px; 
    border: none; 
    cursor: pointer; 
    background: #f5f5f5; 
    font-size: 18px;
}
.qty-input button:hover { background: #e0e0e0; }

.add-to-cart-btn { 
    background: #ff7043; 
    color: #fff; 
    border: none; 
    padding: 0 40px; 
    border-radius: 8px; 
    font-weight: bold; 
    cursor: pointer; 
    flex-grow: 1; 
    font-size: 16px;
    text-transform: uppercase;
    transition: 0.3s;
}
.add-to-cart-btn:hover { background: #e65d34; box-shadow: 0 5px 15px rgba(255,112,67,0.3); }

/* KHUNG THÔNG TIN ĐỒNG BỘ */
.product-info-grid { 
    margin-top: 50px; 
    border-top: 1px solid #eee; 
    padding-top: 40px; 
}
.info-layout-flex { display: flex; gap: 30px; }

.box-description, .box-service {
    background-color: #fcfcfc; 
    border: 1px solid #ececec; 
    border-radius: 15px; 
    padding: 30px; 
}
.box-description { flex: 2; }
.box-service { flex: 1; height: fit-content; }

/* Tiêu đề đồng nhất cho cả 2 bên */
.service-header, .box-description h3 {
    background: transparent;
    border-bottom: 2px solid #ff7043; /* Thêm gạch chân cam cho chuyên nghiệp */
    padding: 0 0 12px 0;
    margin-bottom: 25px;
    text-align: left;
    color: #333;
    font-size: 1.3rem;
    font-weight: bold;
    display: block;
}

.box-description hr {
    display: none;
}

/* Danh sách dịch vụ */
.service-row { display: flex; align-items: flex-start; gap: 15px; margin-bottom: 20px; }
.service-row p { font-size: 15px; color: #555; margin: 0; line-height: 1.4; }

/* RESPONSIVE - Chuyển về 1 cột cho mobile */
@media (max-width: 992px) {
    .product-core { grid-template-columns: 1fr; gap: 30px; }
    .info-layout-flex { flex-direction: column; }
    .item-name { font-size: 26px; }
}

/* ------------------------------- product ------------------------------------ */
/* RESET & FONTS */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', Tahoma, sans-serif; background-color: #f9f9f9; color: #333; }

/* HEADER & NAV */
.main-header { background-color: #ff7043; color: white; text-align: center; padding: 25px 0; }
.pink-nav { background-color: #ff7575; padding: 10px 5%; }
.pink-nav ul { list-style: none; display: flex; align-items: center; gap: 20px; }
.pink-nav a { color: white; text-decoration: none; font-weight: 600; font-size: 15px; }
.cart-item { margin-left: auto; background: rgba(255,255,255,0.2); border-radius: 20px; padding: 5px 15px; }

/* BỐ CỤC CHÍNH */
.product-container { display: flex; max-width: 1200px; margin: 30px auto; gap: 30px; padding: 0 20px; }
.filter-sidebar { flex: 1; background: white; padding: 20px; border-radius: 12px; height: fit-content; border: 1px solid #eee; }
.filter-sidebar h3 { border-bottom: 2px solid #ff7043; padding-bottom: 10px; margin-bottom: 15px; }
.filter-sidebar ul {
    list-style: none;
    padding-left: 0;
}
/* Nếu muốn các checkbox nằm thẳng hàng đẹp hơn */
.filter-sidebar li {
    display: flex;
    align-items: center;
    gap: 10px; /* Khoảng cách giữa ô vuông và chữ */
    margin-bottom: 10px;
}

/* DANH SÁCH SẢN PHẨM */
.product-grid { flex: 3; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 25px; }

/* THẺ SẢN PHẨM & HIỆU ỨNG NỔI LÊN */
.product-card { 
    background: white; border-radius: 15px; padding: 20px; text-align: center; 
    border: 1px solid #eee; position: relative;
    transition: all 0.3s ease; /* Chuyển động mượt mà */
}
.product-card:hover { 
    transform: translateY(-10px); /* Nhấc thẻ lên */
    box-shadow: 0 10px 25px rgba(0,0,0,0.1); /* Đổ bóng sâu */
    border-color: #ff7043; 
}
.product-card img { width: 100%; height: auto; margin-bottom: 15px; border-radius: 8px; }
.price { color: #ff4d4d; font-weight: 800; font-size: 18px; margin: 10px 0; }
.promo-tag { position: absolute; top: 10px; left: 10px; background: #fff0ed; color: #ff7043; font-size: 10px; padding: 3px 8px; border-radius: 4px; font-weight: bold; }

/* NÚT CHI TIẾT */
.btn-detail { 
    display: inline-block; background-color: #26d4a5; color: white; 
    padding: 8px 25px; text-decoration: none; border-radius: 5px; font-weight: bold;
}
.btn-detail:hover { background-color: #1eb88f; }

/* FOOTER 3 CỘT */
.main-footer { 
    background-color: #333; color: #eee; padding: 40px 10%; 
    display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 40px; text-align: center;
}
.footer-column h3 { color: #ff7043; margin-bottom: 15px; }
.footer-column a { color: #aaa; text-decoration: none; font-size: 14px; }

/* RESPONSIVE */
@media (max-width: 768px) {
    .product-container, .main-footer { grid-template-columns: 1fr; flex-direction: column; }
}

/* ------------------------------------- shopping cart -------------------------------- */
/* Các thuộc tính chung đã có từ trước */
.cart-page { max-width: 1200px; margin: 40px auto; padding: 0 20px; }
.cart-page h2 { margin-bottom: 20px; border-bottom: 2px solid #26d4a5; display: inline-block; padding-bottom: 5px; }

/* Bố cục chia 2 phần: Bảng và Tổng thanh toán */
.cart-container { display: flex; gap: 30px; align-items: flex-start; }

/* Định dạng bảng sản phẩm */
.cart-table { flex: 2; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.cart-table th { background: #f4f4f4; padding: 15px; text-align: left; }
.cart-table td { padding: 15px; border-bottom: 1px solid #eee; vertical-align: middle; }

.product-info { display: flex; align-items: center; gap: 15px; }
.product-info img { width: 60px; height: 60px; object-fit: cover; border-radius: 5px; }

/* Ô nhập số lượng */
input[type="number"] { width: 50px; padding: 5px; border: 1px solid #ddd; border-radius: 4px; text-align: center; }

/* Nút xóa */
.btn-remove { background: #ff4d4d; color: white; border: none; padding: 5px 10px; border-radius: 4px; cursor: pointer; }

/* Khu vực tổng tiền */
.cart-summary { flex: 1; background: #fff; padding: 25px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); border: 1px solid #eee; }
.summary-item { display: flex; justify-content: space-between; margin-bottom: 15px; }
.summary-item.total { border-top: 2px solid #eee; padding-top: 15px; font-weight: bold; font-size: 1.2rem; color: #ff4d4d; }

.btn-checkout { 
    width: 100%; background: #26d4a5; color: white; border: none; 
    padding: 15px; border-radius: 8px; font-weight: bold; cursor: pointer;
    transition: background 0.3s;
} 
.btn-checkout:hover { background: #1eb88f; }

/* Ẩn bảng nếu không có hàng */
#cart-items-body:empty ~ #empty-cart-msg {
    display: block;
}

/* Ẩn tóm tắt đơn hàng nếu chưa có gì */
.cart-summary {
    transition: opacity 0.3s ease;
}

/* Định dạng cho mục giỏ hàng trên menu */
.cart-wrapper {
    margin-left: auto; /* Đẩy giỏ hàng sang bên phải menu */
}

#cart-count {
    background-color: #ffffff; /* Nền trắng cho con số nổi bật */
    color: #ff7575;            /* Chữ màu hồng trùng màu menu */
    padding: 2px 8px;
    border-radius: 10px;       /* Bo tròn con số */
    font-weight: bold;
    font-size: 14px;
    margin-left: 5px;
    transition: all 0.3s ease;
}

/* Hiệu ứng khi con số thay đổi (sẽ dùng với JS) */
.bump {
    transform: scale(1.3);
    background-color: #26d4a5 !important; /* Đổi sang xanh khi có hàng mới */
    color: white !important;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .cart-container { flex-direction: column; }
    .cart-table { width: 100%; font-size: 14px; }
}