* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
:root {
  --brown: #6f4e3d;
  --brown2: #8d6b58;
  --cream: #f8f0e8;
  --cream2: #efe0d2;
  --accent: #b88c70;
  --text: #3d2d25;
  --white: #fff;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: "Be Vietnam Pro", sans-serif;
  background: #fbf7f3;
  color: var(--text);
}
a {
  text-decoration: none;
  color: inherit;
}
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 247, 243, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #eaded3;
  width: 100%;
  background-color: #ffffff;
}
.topbar { 
  max-width: 1200px;
  margin:0 auto;
  height: 76px;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 12px 20px;
}
.logo {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--brown);
  white-space: nowrap;
}
.logo span {
  font-weight: 600;
}
.menu-btn {
  display: none;
  border: 0;
  background: none;
  font-size: 25px;
  cursor: pointer;
  color: var(--brown);
}
.desktop-nav {
  display: flex;
  gap: 24px;
  font-size: 14px;
  font-weight: 600;
  
}
.desktop-nav a {
  white-space: nowrap;
}

.desktop-nav a:hover {
  color: var(--accent);
}
.cart-btn {
  border: 0;
  background: var(--cream2);
  color: var(--brown);
  width: 46px;
  height: 42px;
  border-radius: 22px;
  cursor: pointer;
}
.cart-btn b {
  font-size: 11px;
}
.hero {
  max-width: 1200px;
  margin: 28px auto 0;
  min-height: 390px;
  border-radius: 28px;
  background: linear-gradient(115deg, #ead5c4, #f7e9dc);
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  padding: 55px 75px;
  position: relative;
}
.hero-content {
  max-width: 600px;
}
.eyebrow,
.tag {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.6px;
  color: var(--brown2);
}
.hero h1 {
  font-size: 53px;
  line-height: 1.1;
  margin: 14px 0;
  color: var(--brown);
  letter-spacing: -2px;
}
.hero h1 span {
  color: #a77b5e;
}
.hero p:not(.eyebrow) {
  font-size: 16px;
  color: #654d40;
  max-width: 520px;
}
.hero-btn {
  display: inline-block;
  margin-top: 28px;
  background: var(--brown);
  color: #fff;
  padding: 13px 22px;
  border-radius: 25px;
  font-weight: 700;
  font-size: 14px;
}
.hero-food {
  width: 320px;
  height: 280px;
  position: relative;
  display: grid;
  place-items: center;
}
.food-circle {
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: #fdf8f2;
  box-shadow: 0 18px 50px #a77b5e40;
  display: grid;
  place-items: center;
  font-size: 110px;
  transform: rotate(-5deg);
}
.mini-card {
  position: absolute;
  bottom: 18px;
  right: 0;
  background: #fff;
  padding: 11px 17px;
  border-radius: 14px;
  box-shadow: 0 10px 25px #6f4e3d20;
  font-size: 12px;
  font-weight: 700;
}
.features {
  max-width: 1100px;
  margin: 30px auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  padding: 0 20px;
}
.features > div {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 17px;
  background: #fff;
  border-radius: 16px;
  border: 1px solid #eee2d9;
}
.features span {
  font-size: 25px;
}
.features b,
.features small {
  display: block;
}
.features b {
  font-size: 13px;
}
.features small {
  font-size: 11px;
  color: #8c7669;
  margin-top: 3px;
}
.section {
  max-width: 1200px;
  margin: 65px auto;
  padding: 0 22px;
}
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 24px;
}
.section-title h2 {
  font-size: 28px;
  margin-top: 6px;
  color: var(--brown);
}
.section-title > a {
  font-size: 13px;
  font-weight: 700;
  color: var(--brown2);
}
.products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.product {
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #eee1d7;
  transition: 0.25s;
  position: relative;
}
.product:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 35px #654d4014;
}
.product-img {
  height: 210px;
  background: linear-gradient(135deg, #f1dfd0, #e5cbb8);
  display: grid;
  place-items: center;
  font-size: 78px;
}
.product-body {
  padding: 15px;
}
.product-cat {
  font-size: 10px;
  color: #a18778;
  text-transform: uppercase;
  font-weight: 700;
}
.product h3 {
  font-size: 14px;
  line-height: 1.45;
  margin: 7px 0 9px;
  min-height: 40px;
}
.price {
  color: #9b6849;
  font-size: 16px;
  font-weight: 800;
}
.add {
  position: absolute;
  right: 14px;
  bottom: 13px;
  border: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brown);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}
.new-section {
  background: var(--cream);
  max-width: none;
  padding: 55px max(22px, calc((100% - 1156px) / 2));
}
.new-section .products {
  max-width: 1156px;
  margin: auto;
}
.new-section .section-title {
  max-width: 1156px;
  margin: 0 auto 24px;
}
.category-bar {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.category-bar button {
  border: 1px solid #e3d3c7;
  background: #fff;
  color: #705849;
  padding: 9px 15px;
  border-radius: 20px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}
.category-bar button.active,
.category-bar button:hover {
  background: var(--brown);
  color: #fff;
  border-color: var(--brown);
}
footer {
  margin-top: 80px;
  background: #5b4134;
  color: #fff;
  padding: 50px max(22px, calc((100% - 1156px) / 2));
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}
footer p {
  color: #e7d8cf;
  font-size: 13px;
  line-height: 1.8;
  margin-top: 8px;
}
.footer-logo {
  font-weight: 800;
}
.side-menu {
  position: fixed;
  z-index: 100;
  left: -310px;
  top: 0;
  width: 290px;
  height: 100vh;
  background: #fff;
  padding: 24px;
  box-shadow: 10px 0 35px #0002;
  transition: 0.3s;
}
.side-menu.open {
  left: 0;
}
.side-head {
  display: flex;
  justify-content: space-between;
  font-size: 23px;
  color: var(--brown);
  margin-bottom: 30px;
}
.side-head button,
.cart-head button {
  border: 0;
  background: none;
  font-size: 30px;
  cursor: pointer;
}
.side-menu > a {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid #f0e5dd;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.side-menu p {
  font-size: 12px;
  color: #a18778;
  font-weight: 700;
  margin: 25px 0 8px;
}
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: #0006;
  z-index: 90;
}
.overlay.show {
  display: block;
}
.cart-panel {
  position: fixed;
  z-index: 110;
  right: -430px;
  top: 0;
  height: 100vh;
  width: 410px;
  background: #fff;
  transition: 0.3s;
  box-shadow: -10px 0 35px #0002;
  display: flex;
  flex-direction: column;
}
.cart-panel.open {
  right: 0;
}
.cart-head {
  padding: 22px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
}
.cart-items {
  padding: 20px;
  flex: 1;
  overflow: auto;
}
.empty {
  text-align: center;
  color: #9b877b;
  margin-top: 100px;
}
.cart-row {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}
.cart-row .emoji {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: var(--cream);
  display: grid;
  place-items: center;
  font-size: 30px;
}
.cart-row h4 {
  font-size: 13px;
}
.cart-row p {
  font-size: 12px;
  color: #a06d4e;
  margin-top: 5px;
}
.qty button {
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 5px;
  padding: 2px 7px;
  cursor: pointer;
}
.cart-footer {
  padding: 20px;
  border-top: 1px solid #eee;
}
.cart-footer > div {
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
}
.checkout {
  width: 100%;
  border: 0;
  background: var(--brown);
  color: #fff;
  padding: 14px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
}

/* --- KHUNG TÌM KIẾM & LỊCH SỬ TÌM KIẾM Trang --- */
.search {
  position: relative;
  height: 42px;
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 380px;
  border: 1px solid #dfd0c4;
  border-radius: 25px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(111, 78, 61, 0.05);
}
.search input {
  border: 0;
  outline: 0;
  flex: 1;
  padding: 0 12px 0 18px;
  font: inherit;
  font-size: 14px;
  background: transparent;
  min-width: 0;
}
.clear-input-btn {
  display: none;
  border: none !important;
  background: transparent !important;
  color: #a89487 !important;
  font-size: 20px !important;
  width: 30px !important;
  height: 30px !important;
  cursor: pointer;
  padding: 0 !important;
  margin-right: 4px;
  line-height: 1;
  border-radius: 50% !important;
  transition: 0.2s ease;
}
.clear-input-btn:hover {
  background: #f4ece4 !important;
  color: #6f4e3d !important;
}
.search #searchBtn {
  width: 44px;
  height: 100%;
  border: 0;
  background: var(--brown);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  border-radius: 0 24px 24px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
  padding: 0;
}
.search #searchBtn:hover {
  background: var(--brown2);
}
.search-history {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  background: #ffffff;
  border: 1px solid #eaded3;
  border-radius: 16px;
  padding: 10px 0;
  z-index: 9999;
  box-shadow: 0 10px 30px rgba(101, 77, 64, 0.12);
}
.history-header {
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 4px 16px 8px !important;
  border-bottom: 1px solid #f2e7de;
}
.history-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--brown2);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.btn-clear-all {
  border: none !important;
  background: transparent !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #9b6849 !important;
  cursor: pointer;
  padding: 4px 8px !important;
  border-radius: 6px !important;
  white-space: nowrap !important;
  line-height: normal !important;
  transition: 0.2s;
}
.btn-clear-all:hover {
  background: #f8efe8 !important;
  color: #c0392b !important;
}
.history-list {
  max-height: 240px;
  overflow-y: auto;
}
.history-item {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 9px 16px;
  cursor: pointer;
  transition: 0.15s ease;
}
.history-item:hover {
  background: #fbf7f3;
}
.history-text {
  flex: 1;
  font-size: 13px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.btn-del-item {
  border: none !important;
  background: transparent !important;
  font-size: 16px !important;
  line-height: 1 !important;
  color: #a89487 !important;
  cursor: pointer;
  width: 24px !important;
  height: 24px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  transition: 0.2s;
}
.btn-del-item:hover {
  background: #f1e2d6 !important;
  color: #c0392b !important;
}
.no-products {
  grid-column: 1 / -1;
  text-align: center;
  padding: 50px 20px;
  color: var(--brown);
}
.search-alert {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  background: #ffeae8;
  color: #d63031;
  border: 1px solid #fab1a0;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  z-index: 10000;
  box-shadow: 0 4px 15px rgba(214, 48, 49, 0.15);
  animation: fadeIn 0.2s ease-in-out;
}
/* --- KHUNG TÌM KIẾM & LỊCH SỬ TÌM KIẾM Trang --- */

/*trang chi tiết Vy*/
.action-group {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.quantity-selector {
  display: flex;
  align-items: center;
  gap: 10px;
}
.qty-label {
  font-weight: 600;
  color: var(--text);
  margin-right: 10px;
  font-size: 16px;
}
.quantity-selector button {
  width: 38px;
  height: 38px;
  border: 1px solid #dfd0c4;
  background: #fff;
  border-radius: 8px;
  font-size: 20px;
  cursor: pointer;
  color: var(--brown);
  display: grid;
  place-items: center;
  transition: 0.2s;
}
.quantity-selector button:hover {
  background: var(--cream);
}
.quantity-selector input {
  width: 30px;
  text-align: center;
  border: none;
  background: transparent;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  outline: none;
}
.add-to-cart-btn {
  margin-top: 0;
  padding: 14px 30px;
} /* Ghi đè margin mặc định của hero-btn */
.detail-container {
  max-width: 1000px;
  margin: 50px auto;
  background: #fff;
  padding: 40px;
  border-radius: 20px;
  display: flex;
  gap: 40px;
  box-shadow: 0 10px 30px rgba(101, 77, 64, 0.08);
}
.detail-img {
  flex: 1;
  background: var(--cream);
  border-radius: 16px;
  overflow: hidden;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
}
.detail-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.detail-info {
  flex: 1;
}
.detail-price {
  font-size: 28px;
  color: #9b6849;
  font-weight: 800;
  margin-bottom: 20px;
}
.detail-desc {
  font-size: 15px;
  color: #654d40;
  line-height: 1.6;
  margin-bottom: 30px;
}
.back-btn {
  display: inline-block;
  margin-top: 20px;
  font-weight: 600;
  color: var(--accent);
}

@media (max-width: 768px) {
  .detail-container {
    flex-direction: column;
    padding: 20px;
    margin: 15px;
    gap: 20px;
  }
  .detail-info h1 {
    font-size: 24px !important;
  }
  .detail-price {
    font-size: 22px;
    margin-bottom: 15px;
  }
  .action-group {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }
  .quantity-selector {
    justify-content: space-between;
  }
  .add-to-cart-btn {
    width: 100%;
    text-align: center;
  }
}
/*trang chi tiết Vy*/

/* --- RESPONSIVE MEDIA QUERIES --- */
@media (max-width: 900px) {
  .desktop-nav {
    display: none;
  }
  .menu-btn {
    display: block;
  }
  .topbar {
    gap: 12px;
  }
  .search {
    max-width: none;
  }
  .hero {
    margin: 18px 16px 0;
    padding: 42px 30px;
  }
  .hero-food {
    width: 230px;
  }
  .food-circle {
    width: 170px;
    height: 170px;
    font-size: 75px;
  }
  .products {
    grid-template-columns: repeat(3, 1fr);
  }
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .topbar {
    height: 64px;
  }
  .logo {
    font-size: 23px;
  }
  .search {
    height: 38px;
  }
  .hero {
    min-height: 460px;
    display: block;
    padding: 38px 24px;
  }
  .hero h1 {
    font-size: 39px;
  }
  .hero-food {
    margin: 20px auto 0;
    height: 170px;
  }
  .hero-food .food-circle {
    width: 150px;
    height: 150px;
  }
  .mini-card {
    right: 10px;
    bottom: 0;
  }
  .features {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 0 16px;
  }
  .features > div {
    padding: 12px 10px;
  }
  .section {
    margin: 45px auto;
    padding: 0 16px;
  }
  .section-title h2 {
    font-size: 23px;
  }
  .products {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .product-img {
    height: 155px;
    font-size: 58px;
  }
  .product-body {
    padding: 11px;
  }
  .product h3 {
    font-size: 12px;
  }
  .price {
    font-size: 14px;
  }
  .add {
    width: 30px;
    height: 30px;
  }
  .new-section {
    padding: 40px 16px;
  }
  .cart-panel {
    width: 100%;
  }
  footer {
    grid-template-columns: 1fr;
    padding: 40px 22px;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.history-text {
  pointer-events: none;
}

/* --- PHẦN ĐÁNH GIÁ SẢN PHẨM Vy --- */
.reviews-container {
  max-width: 1000px;
  margin: 0 auto 50px;
  background: #fff;
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(101, 77, 64, 0.08);
}
.review-form {
  background: var(--cream);
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 30px;
}
.rating-stars span {
  font-size: 28px;
  color: #ccc;
  cursor: pointer;
  transition: 0.2s;
}
.rating-stars span.active {
  color: #f39c12;
}
.review-form input,
.review-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #dfd0c4;
  border-radius: 8px;
  font-family: inherit;
  outline: none;
}
.review-form textarea {
  height: 100px;
  resize: none;
  margin-bottom: 15px;
}
.review-item {
  border-bottom: 1px solid #eee;
  padding: 20px 0;
}
.review-item:last-child {
  border-bottom: none;
}
.review-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.review-head .stars {
  color: #f39c12;
  letter-spacing: 2px;
}
.review-item p {
  font-size: 14px;
  color: #654d40;
  line-height: 1.6;
}
.review-item small {
  color: #a18778;
  font-size: 12px;
}

/* --- CSS CHO ẢNH ĐÁNH GIÁ --- */
.upload-btn {
  display: inline-block;
  padding: 8px 14px;
  background: #f0e5dd;
  color: var(--brown);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: 0.2s;
}
.upload-btn:hover {
  background: #e3d3c7;
}
.review-uploaded-img {
  max-width: 150px;
  max-height: 150px;
  border-radius: 8px;
  margin-top: 10px;
  object-fit: cover;
  border: 1px solid #eee;
  display: block; /* Đảm bảo ảnh rớt xuống dòng mới */
}

@media (max-width: 768px) {
  .reviews-container {
    padding: 20px;
    margin: 0 15px 30px;
  }
}

/* --- TỔNG QUAN & LỌC ĐÁNH GIÁ --- */
.review-summary {
  display: flex;
  align-items: center;
  background: #fffcf9;
  border: 1px solid #f0e5dd;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  gap: 30px;
}
.rating-average {
  text-align: center;
  border-right: 1px solid #e3d3c7;
  padding-right: 30px;
  min-width: 150px;
}
.avg-number {
  font-size: 38px;
  font-weight: 800;
  color: #e67e22; /* Màu cam nổi bật */
}
.rating-average .stars {
  font-size: 22px;
  color: #f39c12;
  margin: 5px 0;
  letter-spacing: 2px;
}
.rating-average p {
  font-size: 13px;
  color: #a18778;
  margin: 0;
}
.rating-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  flex: 1;
}
.filter-btn {
  background: #fff;
  border: 1px solid #dfd0c4;
  padding: 8px 18px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  color: var(--brown);
  transition: all 0.2s ease;
}
.filter-btn:hover {
  background: #f0e5dd;
}
.filter-btn.active {
  background: var(--brown);
  color: #fff;
  border-color: var(--brown);
}

/* Responsive cho điện thoại */
@media (max-width: 768px) {
  .review-summary {
    flex-direction: column;
    text-align: center;
    padding: 20px;
    gap: 20px;
  }
  .rating-average {
    border-right: none;
    padding-right: 0;
    border-bottom: 1px solid #e3d3c7;
    padding-bottom: 20px;
    width: 100%;
  }
  .rating-filters {
    justify-content: center;
  }
}
/* --- GỢI Ý TÌM KIẾM --- */
.yt-suggest-list {
  padding: 6px 0;
}

.yt-suggest-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 18px;
  cursor: pointer;
  font-size: 14.5px;
  color: #222;
  transition: background 0.15s ease;
}

.gytk-suggest-item:hover {
  background-color: #f2f2f2;
}

.gytk-icon {
  font-size: 14px;
  color: #606060;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.gytk-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shopee-address-item:hover {
  background: var(--cream);
  color: var(--brown);
}
.saved-address-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.saved-address-item {
  border: 1px solid #dfd0c4;
  background: #fdfaf7;
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  transition: 0.2s;
}

.saved-address-item:hover {
  border-color: var(--brown);
}

.saved-address-item.selected {
  border: 2px solid var(--brown);
  background: #faf3ed;
}

.saved-address-item label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
}

.saved-address-item input[type="radio"] {
  width: auto;
  margin-top: 3px;
  accent-color: var(--brown);
}

.saved-address-name {
  font-weight: 700;
  color: var(--brown);
  margin-bottom: 3px;
}

.saved-address-text {
  font-size: 13px;
  color: #654d40;
  line-height: 1.5;
}

.btn-add-address {
  border: 1px dashed var(--brown);
  background: #fff;
  color: var(--brown);
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  width: 100%;
  margin-bottom: 15px;
}
.shopee-address-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.shopee-address-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid #e5d8cf;
  border-radius: 12px;
  cursor: pointer;
  background: #fff;
  transition: all 0.2s;
}
.shopee-address-item.selected {
  border-color: #ee4d2d;
  background: #fffdfc;
}
.shopee-address-item input[type="radio"] {
  margin-top: 3px;
  accent-color: #ee4d2d;
}
.field-relative {
  position: relative;
  margin-bottom: 12px;
}
.addr-suggestions {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  max-height: 180px;
  overflow-y: auto;
  z-index: 10000;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}
.addr-suggest-item {
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  border-bottom: 1px solid #f2f2f2;
}
.addr-suggest-item:hover {
  background: #fff0e6;
  color: #ee4d2d;
}
.shopee-address-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 6px;
}
.shopee-address-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  border: 1px solid #e3d3c8;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}
.shopee-address-item:hover {
  border-color: #ee4d2d;
}
.shopee-address-item.selected {
  border-color: #ee4d2d;
  background: #fffbfa;
  box-shadow: 0 4px 14px rgba(238, 77, 45, 0.08);
}
.shopee-address-item input[type="radio"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #ee4d2d;
  cursor: pointer;
  flex-shrink: 0;
}

/* --- LỊCH SỬ MUA HÀNG Vy --- */
 .history-container { max-width: 900px; margin: 40px auto; padding: 0 20px; min-height: 60vh; }
        .history-title { color: var(--brown); font-size: 28px; margin-bottom: 30px; text-align: center; }
        .order-card { background: #fff; border-radius: 12px; padding: 20px; margin-bottom: 20px; box-shadow: 0 4px 15px rgba(111,78,61,0.08); border: 1px solid #f0e5dd; }
        .order-header { display: flex; justify-content: space-between; border-bottom: 1px solid #f0e5dd; padding-bottom: 12px; margin-bottom: 15px; font-size: 14px; }
        .order-status { font-weight: bold; padding: 4px 12px; border-radius: 20px; background: #fff3cd; color: #856404; }
        .status-Hoàn.thành { background: #d4edda; color: #155724; }
        .status-Đã.hủy { background: #f8d7da; color: #721c24; }
        .order-item { display: flex; gap: 15px; margin-bottom: 15px; align-items: center; }
        .order-item img { width: 80px; height: 80px; border-radius: 8px; object-fit: cover; border: 1px solid #eee; }
        .item-info { flex: 1; }
        .item-info h4 { font-size: 15px; color: var(--text); margin-bottom: 5px; }
        .item-info p { font-size: 13px; color: #666; }
        .item-price { font-weight: 600; color: #9b6849; }
        .order-footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #f0e5dd; padding-top: 15px; margin-top: 10px; }
        .total-price { font-size: 18px; font-weight: 700; color: var(--brown); }
        .btn-review { display: inline-block; padding: 8px 16px; background: var(--brown); color: #fff; border-radius: 8px; text-decoration: none; font-size: 13px; font-weight: 600; transition: 0.2s; }
        .btn-review:hover { background: var(--brown2); }
        .empty-history { text-align: center; color: #8c7669; margin-top: 50px; }

        
.history-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}
.history-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    overflow-x: auto;
    padding-bottom: 5px;
}
.history-tabs button {
    padding: 8px 16px;
    border: 1px solid #e3d3c7;
    background: #fff;
    color: #705849;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}
.history-tabs button.active, .history-tabs button:hover {
    background: var(--brown);
    color: #fff;
    border-color: var(--brown);
}
.order-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid #eee1d7;
    box-shadow: 0 5px 15px rgba(101,77,64,0.03);
}
.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f0e5dd;
    padding-bottom: 15px;
    margin-bottom: 15px;
}
.order-status {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
}

.status-chờ-xác-nhận { background: #fff3cd; color: #856404; }
.status-đang-xử-lý, .status-đang-giao { background: #cce5ff; color: #004085; }
.status-hoàn-thành { background: #d4edda; color: #155724; }
.status-đã-hủy { background: #f8d7da; color: #721c24; }

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}
.item-info {
    display: flex;
    gap: 15px;
    align-items: center;
}
.item-info img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #eee;
}
.item-info h4 a {
    color: var(--text);
    font-size: 14px;
    text-decoration: none;
}
.item-info h4 a:hover { color: var(--accent); }
.item-info p {
    font-size: 12px;
    color: #8c7669;
    margin-top: 5px;
}
.item-action {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}
.item-price { font-weight: 700; color: #9b6849; }
.btn-review {
    background: #fff;
    border: 1px solid #e67e22;
    color: #e67e22;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    transition: 0.2s;
}
.btn-review:hover {
    background: #e67e22;
    color: #fff;
}
.order-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    border-top: 1px dashed #f0e5dd;
    padding-top: 15px;
    margin-top: 15px;
}
.total-price { font-size: 20px; color: var(--brown); }
.empty-orders { text-align: center; padding: 40px; color: #8c7669; background: #fff; border-radius: 12px; }
.empty-orders a { color: var(--brown); font-weight: 700; text-decoration: underline; }

.history-tabs {
    display: flex;
    background: #ffffff;
    margin-bottom: 20px;
    border-bottom: 1px solid #eaeaea;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    overflow-x: auto; /* Cho phép lướt ngang nếu dùng trên điện thoại */
}

.history-tabs a {
    flex: 1; /* Chia đều không gian cho các tab */
    text-align: center;
    padding: 16px 10px;
    text-decoration: none;
    color: #333;
    font-size: 16px;
    white-space: nowrap; /* Tránh việc chữ bị rớt dòng */
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

/* Hiệu ứng khi rê chuột vào */
.history-tabs a:hover {
    color: #ee4d2d; 
}

/* Định dạng cho Tab đang được chọn (active) */
.history-tabs a.active {
    color: #ee4d2d; /* Màu cam */
    border-bottom: 2px solid #ee4d2d; /* Đường gạch chân màu cam */
}
/* --- LỊCH SỬ MUA HÀNG Vy --- */

 .login-btn-header {
        display: inline-flex;
        align-items: center;
        padding: 8px 16px;
        background-color: #f3f4f6;
        color: #1f2937;
        text-decoration: none;
        border-radius: 20px;
        font-size: 14px;
        font-weight: 600;
        transition: all 0.2s ease;
      }

      .admin-btn-header {
        display: inline-flex;
        align-items: center;
        padding: 8px 16px;
        background-color: #fef3c7;
        color: #92400e;
        text-decoration: none;
        border-radius: 20px;
        font-size: 14px;
        font-weight: 700;
        border: 1px solid #fcd34d;
        transition: all 0.2s ease;
      }

      /* Định dạng khung bao bọc lịch sử tìm kiếm để không bị phình to */
.search-history {
    position: absolute;
    top: calc(100% + 5px); /* Nằm ngay dưới thanh tìm kiếm cách 5px */
    left: 0;
    width: 100%;
    max-height: 250px; /* Giới hạn chiều cao */
    overflow-y: auto; /* Hiển thị thanh cuộn nếu quá nhiều lịch sử */
    background: #fff;
    border: 1px solid #eaded3;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}
.history-item, .yt-suggest-item {
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 14px; /* Ép cỡ chữ nhỏ lại */
    transition: background 0.2s ease;
}

.history-item:hover, .yt-suggest-item:hover {
    background-color: #f3f4f6;
}
.history-text, .yt-text {
    font-size: 14px;
    color: #3d2d25;
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    max-width: 80%;
}

.history-title {
    font-size: 13px;
    font-weight: 600;
    padding: 10px 12px 5px;
    display: block;
    color: #888;
    white-space: nowrap;
}

.btn-del-item, .btn-clear-all {
    background: none;
    border: none;
    cursor: pointer;
    color: #888;
    font-size: 12px;
}
.btn-del-item:hover, .btn-clear-all:hover {
    color: #ef4444;
}
.pagination-bar button {
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid #dfd0c4;
  background: #fff;
  color: #5c3d2e;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.pagination-bar button:hover:not(:disabled) {
  background: #f7ede2;
  border-color: #d97706;
  color: #d97706;
}
.pagination-bar button.active {
  background: #d97706;
  border-color: #d97706;
  color: #fff;
  cursor: default;
}
.pagination-bar button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}