/* ========== RESET & BASE ========== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  margin-top: 5px !important;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  display: flex;
  justify-content: center;
  font-family: var(--font-main);
  font-size: var(--fs-base);
  line-height: 1.5;
}

textarea{
  font-family: var(--font-main);
}

/* Ẩn scrollbar dọc nhưng vẫn cuộn được */
.product-detail::-webkit-scrollbar {
  display: none;
}

/* ========== HOMEPAGE WRAPPER ========== */
.homepage_wrap {
  padding: 1rem;
  max-width: 750px;
  width: 100%;
}

/* ========== HEADER ========== */
.header {
  display: flex;
  align-items: center;
  background: var(--color-card-bg);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding: 12px;
  gap: 12px;
  margin-bottom: 15px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.image_wrap {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.image_wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.info_wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.name_wrap h5.sotre_name {
  font-size: var(--fs-title);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
}

.time_wrap {
  font-size: var(--fs-small);
  color: var(--color-gray-medium);
}

.time_wrap span {
  display: inline-block;
}

/* ========== LINK RESET ========== */
.food-link {
  text-decoration: none;
  color: inherit;
}

/* ========== FOOD CARD IMAGE ========== */
.food-card .image_wrap {
  width: 100%;
  height: 170px;
}

.food-card .image_wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ========== SEARCH BAR ========== */
.search {
  background: var(--color-card-bg);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 10px;
  padding: 0.6rem 1rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  margin-bottom: 1rem;
}

.search input {
  border: none;
  outline: none;
  flex: 1;
  font-size: var(--fs-base);
  color: var(--color-text);
  background: transparent;
}

.search i {
  color: var(--color-gray-medium);
  font-size: 1.2rem;
}

/* ========== CATEGORIES ========== */
.categories {
  display: flex;
  overflow-x: auto;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
}

.cat-item {
  background: var(--color-card-bg);
  border-radius: 16px;
  padding: 0.7rem;
  text-align: center;
  min-width: 70px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  cursor: pointer;
  transition: all 0.3s ease;
}

.cat-item.active {
  background: var(--color-brown-light);
  color: var(--color-white);
  transform: scale(1.05);
}

.cat-item img {
  width: 45px;
  height: 45px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 0.4rem;
}

.cat-item span {
  font-size: var(--fs-small);
  font-weight: 500;
}

/* ========== PROMOTION BOX ========== */
/* .promo {
  background: var(--color-brown-medium);
  border-radius: 16px;
  color: var(--color-white);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  margin-bottom: 1.5rem;
  animation: fadeIn 0.6s ease;
} */

.promo{
  max-width: 750px;
  height: 250px;
}

@media (max-width:480px) {
  .promo{
    max-width: 400px;
  }
}

.promo-text {
  max-width: 60%;
}

.promo-text h4 {
  font-weight: 600;
  margin-bottom: 0.3rem;
  font-size: var(--fs-title);
}

.promo img {
  /* width: 120px;
  height: 100px;
   */
  border-radius: 12px;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-fit: cover;
}

/* Hiệu ứng xuất hiện */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== POPULAR SECTION ========== */
.popular {
  margin: 20px 0 50px 0;
}

.popular h3 {
  font-size: var(--fs-title);
  margin-bottom: 0.8rem;
  font-weight: 600;
}

.popular-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

@media (max-width: 480px) {
  .popular-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ========== FOOD CARD ========== */
.food-card {
  position: relative;
  background: var(--color-card-bg);
  border-radius: 16px;
  height: 100%;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  padding: 0.8rem;
  text-align: center;
  transition: transform 0.2s ease;
}

.food-card:hover {
  transform: scale(1.03);
}

.food-card img {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  object-fit: cover;
  margin-bottom: 0.5rem;
}

.food-card h4 {
  font-size: var(--fs-base);
  font-weight: 600;
  margin: 0.5rem 0;
}

.food-card .price {
  font-size: var(--fs-base);
  color: var(--color-brown-medium);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.food-card .price.base{
  color: var(--color-gray-dark);
  text-decoration: line-through;
  opacity: 0.7;
}

.food-card .promotion_price{
  font-size: var(--fs-base);
  color: var(--color-brown-medium);
  font-weight: 600;
}

/* Hết hàng overlay */
.food-card.sold-out {
  pointer-events: none;
  opacity: 0.5;
}

.food-card.sold-out .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sold-out-badge {
  color: var(--color-white);
  font-weight: 700;
}

/* Nút thêm nhanh */
.add-btn {
  background: var(--color-button);
  color: var(--color-white);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

.add-btn:hover {
  background: var(--color-brown-dark);
}

/* ========== BOTTOM NAVIGATION ========== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  max-width: 750px;
  width: 100%;
  background: var(--color-card-bg);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0.6rem 0;
  box-shadow: 0 -2px 6px rgba(0,0,0,0.05);
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}

a.disabled-link {
  pointer-events: none;
  cursor: default;
}

.bottom-nav .ft_icon {
  width: 30px;
  height: 30px;
  border: none;
  background: none;
  cursor: pointer;
}

.bottom-nav .ft_icon.active #SVGRepo_iconCarrier path {
  fill: var(--color-brown-medium);
}

/* ========== CART BADGE ========== */
.cart_wrap {
  position: relative;
  display: flex;
}

.cart_wrap span {
  position: absolute;
  top: -0.45rem;
  right: -1rem;
  background: var(--color-brown-light);
  padding: 2px 4px;
  border-radius: 30%;
  color: var(--color-white);
  font-size: var(--fs-small);
}

/* ========== PROGRESS / NOTIFY ========== */
.progress-success {
  background: linear-gradient(90deg, var(--color-green-medium), #16a085) !important;
}

.progress-warning {
  background: linear-gradient(90deg, #f1c40f, #e67e22) !important;
}

.progress-error {
  background: linear-gradient(90deg, #c0392b, #e74c3c) !important;
}

.progress-success,
.progress-warning,
.progress-error {
  height: 4px !important;
  border-radius: 0 0 10px 10px;
}
