/* ===================================================
   T3 FOOD - RESPONSIVE STYLESHEET
   Tối ưu hiển thị hoàn hảo trên Mobile, Tablet & Desktop
   =================================================== */

/* ================== BOTTOM NAV FOR MOBILE ================== */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 58px;
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  z-index: 999;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -3px 12px rgba(90, 50, 20, 0.08);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text-muted);
  gap: 3px;
  position: relative;
  flex: 1;
  height: 100%;
  transition: var(--transition);
}

.bottom-nav-item i {
  font-size: 19px;
}

.bottom-nav-item.active, .bottom-nav-item:hover {
  color: var(--primary);
  font-weight: 700;
}

.bottom-nav-item .nav-badge {
  position: absolute;
  top: 4px;
  right: 25%;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  min-width: 17px;
  height: 17px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* ================== TABLET (Max-width: 992px) ================== */
@media (max-width: 992px) {
  .food-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .banner-subs {
    flex-direction: row;
  }

  .banner-sub-card {
    flex: 1;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .address-selector-btn {
    max-width: 180px;
  }
}

/* ================== MOBILE (Max-width: 768px) ================== */
@media (max-width: 768px) {
  body {
    padding-bottom: 64px; /* Chừa khoảng trống cho thanh bottom nav */
  }

  .mobile-bottom-nav {
    display: flex;
  }

  .header-top {
    display: none; /* Ẩn top bar phụ trên mobile */
  }

  .header-main-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 10px 0;
  }

  .header-row-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .address-selector-btn {
    max-width: 100%;
    margin-top: 4px;
  }

  .search-wrapper {
    max-width: 100%;
    width: 100%;
  }

  .search-suggest-tags {
    display: none;
  }

  .header-actions {
    display: none; /* Sử dụng Bottom Nav thay thế */
  }

  .banner-main {
    padding: 22px;
    min-height: 160px;
  }

  .banner-content h2 {
    font-size: 20px;
  }

  .banner-content p {
    font-size: 13px;
    margin-bottom: 10px;
  }

  .banner-subs {
    flex-direction: column;
  }

  .food-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .card-img-wrap {
    height: 135px;
  }

  .card-title {
    font-size: 13px;
    height: 36px;
  }

  .current-price {
    font-size: 14.5px;
  }

  .card-meta {
    font-size: 11px;
    gap: 4px;
  }

  .filter-bar {
    padding: 10px;
  }

  .filter-pills {
    overflow-x: auto;
    width: 100%;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }

  .filter-pill {
    white-space: nowrap;
  }

  .sort-wrapper {
    width: 100%;
    justify-content: space-between;
  }

  .sort-select {
    flex: 1;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .cart-drawer {
    width: 100%;
    max-width: 100vw;
  }

  .modal-dialog {
    width: 95%;
    max-height: 94vh;
  }
}

/* ================== EXTRA SMALL MOBILE (Max-width: 420px) ================== */
@media (max-width: 420px) {
  .food-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .card-body {
    padding: 8px;
  }

  .card-actions-row {
    gap: 3px;
  }

  .btn-card-cart, .btn-card-buy, .btn-card-out {
    height: 26px;
    padding: 0 6px;
    font-size: 10px;
    gap: 3px;
    border-radius: 13px;
  }
}
