/* ================================================================
   Home.css — Topbar, navigation and home page layout
   All values use Momento design tokens from tokens.css
   ================================================================ */

/* ── Topbar (desktop) ───────────────────────────────────────── */
.topbar-container {
  display: flex;
  height: 100px;
  padding: var(--space-2);
  align-items: center;
  gap: var(--space-1);        /* was 15px — fixed to 8px grid */
  flex-shrink: 0;
  align-self: stretch;
  background: var(--color-topbar-bg);
}

.topbar-tab-container {
  display: flex;
  height: 64px;
  padding: var(--space-2);
  align-items: center;
  gap: var(--space-1);
  cursor: pointer;
}

.topbar-tab-icon {
  color: var(--color-surface-default);
  text-align: center;
  font-size: 14px;
  font-style: normal;
  font-weight: 900;
  line-height: normal;
}

.topbar-tab-text {
  color: var(--color-surface-default);
  text-align: center;
  font-family: var(--font-body);
  font-size: var(--text-action-md-size);
  font-style: normal;
  font-weight: var(--fw-bold);
  line-height: var(--text-action-md-lh);
}

/* ── Search field container ─────────────────────────────────── */
.topbar-textfiled-container {
  display: flex;
  padding: var(--space-2);
  align-items: center;
  gap: var(--space-1);
  flex: 1 0 0;
  border-radius: var(--radius-lg);
  width: auto;
  border: 1px solid var(--color-border-subtle);
  background: var(--color-surface-default);
}

.home_height {
  display: flex;
  height: 58px;
  padding: var(--space-2);
  align-items: center;
  gap: var(--space-1);
  flex: 1 0 0;
  border-radius: var(--radius-lg);
  width: auto;
  border: 1px solid var(--color-border-subtle);
  background: var(--color-surface-default);
}

.topbar-textfield-icon {
  color: var(--color-brand-dark);
  text-align: center;
  font-size: 14px;
  font-style: normal;
  font-weight: 300;
  line-height: normal;
}

.topbar-input-field {
  border: none;
  outline: none;
  flex: 1;
  color: var(--color-text-secondary);
  font-family: var(--font-body);
  font-size: var(--text-label-md-size);
  font-weight: var(--fw-normal);
  line-height: var(--text-action-md-lh);
  background: none;
}

/* ── Layout helpers ─────────────────────────────────────────── */
.home_layout {
  background: var(--color-topbar-bg);
}

.home_layout_sub {
  width: 1280px;
  margin: 0 auto;
}

/* ── Menu drawer animation ──────────────────────────────────── */
@keyframes custom_drawer_slide_up {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

@keyframes custom_drawer_slide_down {
  from { transform: translateY(0); }
  to   { transform: translateY(100%); }
}

.custom-drawer {
  position: fixed !important;
  left: 0;
  right: 0;
  bottom: 0;
  top: auto !important;
  height: auto !important;
  max-height: 90vh;
  width: 100% !important;
  max-width: 700px;
  margin: 0 auto !important;
  background-color: var(--color-drawer-bg);
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  overflow-y: auto;
  z-index: 1300;
  animation: custom_drawer_slide_up 0.3s ease-out;
  will-change: transform;
}

.custom-drawer.custom-drawer--closing {
  animation: custom_drawer_slide_down 0.28s ease-in forwards;
}

@media (min-width: 745px) {
  .custom-drawer {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%);
  }

  @keyframes custom_drawer_slide_up {
    from { transform: translate(-50%, 100%); }
    to   { transform: translate(-50%, 0); }
  }

  @keyframes custom_drawer_slide_down {
    from { transform: translate(-50%, 0); }
    to   { transform: translate(-50%, 100%); }
  }
}

/* ── Hamburger menu button ──────────────────────────────────── */
.menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
}

.menu-btn i {
  font-size: 32px;
  color: var(--color-surface-default);
}

/* ── Menu drawer items ──────────────────────────────────────── */
.drawer_items_text {
  font-family: var(--font-body);
  font-size: var(--text-action-md-size);
  font-weight: var(--fw-normal);
  letter-spacing: 0.2px;
  line-height: var(--text-action-md-lh);
  color: var(--color-text-primary);
}

.drawer_header_text {
  font-family: var(--font-heading);
  font-size: var(--text-heading-sm-size);
  font-weight: var(--fw-bold);
  letter-spacing: 0.2px;
  line-height: var(--text-heading-sm-lh);
  color: var(--color-text-primary);
}

.drawer_items_icon {
  font-size: 18px;
  color: var(--color-text-primary);
}

.drawer_items_div {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.drawer_close_button {
  padding: var(--space-2);
  border-radius: var(--radius-lg);
  color: var(--color-brand-primary);
  border: 1px solid var(--color-brand-primary);
}

.drawer_items {
  padding: 0 var(--space-2) var(--space-2) var(--space-2);
  gap: var(--space-3);
  display: flex;
  flex-direction: column;
}

/* ── Responsive screen visibility ───────────────────────────── */
@media (max-width: 1024px) {
  .small-screen  { display: block !important; }
  .large-screen  { display: none !important; }

  .cls_item_name_sg {
    font-size: var(--text-xs-size);
    font-weight: var(--fw-normal);
    line-height: var(--text-xs-lh);
    letter-spacing: 0.2px;
  }
  .cls_item_name_search {
    font-size: var(--text-action-md-size);
    font-weight: var(--fw-xbold);
    line-height: var(--text-action-md-lh);
  }
  .cls_item_name_mc {
    font-size: var(--text-xs-size);
    font-weight: var(--fw-normal);
    line-height: var(--text-xs-lh);
    letter-spacing: 0.2px;
  }
  .cls_search_results_search {
    font-family: var(--font-heading);
    font-size: var(--text-heading-xsm-size);
    font-weight: var(--fw-xbold);
    line-height: var(--text-heading-xsm-lh);
  }
  .cls_search_results_search_count {
    font-family: var(--font-body);
    font-size: var(--text-action-md-size);
    font-weight: var(--fw-normal);
  }
  .cls_item_price_sg {
    font-size: var(--text-action-md-size);
    font-weight: var(--fw-xbold);
    line-height: var(--text-action-md-lh);
  }
  .cls_item_price_search {
    font-size: var(--text-action-md-size);
    font-weight: var(--fw-normal);
    line-height: var(--text-action-md-lh);
  }
  .cls_item_price_mc {
    font-size: var(--text-action-md-size);
    font-weight: var(--fw-xbold);
    line-height: var(--text-action-md-lh);
  }
}

@media (min-width: 1025px) {
  .small-screen { display: none !important; }
  .large-screen { display: block; }

  .cls_height { height: 250px !important; }

  .cls_item_name_sg {
    font-size: var(--text-action-md-size);
    font-weight: var(--fw-normal);
    line-height: var(--text-action-md-lh);
  }
  .cls_item_name_search {
    font-size: 22px;
    font-weight: var(--fw-xbold);
    line-height: 32px;
  }
  .cls_search_results_search {
    font-family: var(--font-heading);
    font-size: var(--text-display-lg-size);
    font-weight: var(--fw-xbold);
    line-height: var(--text-display-lg-lh);
    letter-spacing: -1px;
  }
  .cls_search_results_search_count {
    font-family: var(--font-body);
    font-size: var(--text-heading-xsm-size);
    font-weight: var(--fw-normal);
    line-height: 28px;
  }
  .cls_item_name_mc {
    font-size: var(--text-action-md-size);
    font-weight: var(--fw-normal);
    line-height: var(--text-action-md-lh);
  }
  .cls_item_price_sg {
    font-size: 22px;
    font-weight: var(--fw-xbold);
    line-height: 32px;
  }
  .cls_item_price_search {
    font-size: var(--text-action-md-size);
    font-weight: var(--fw-normal);
    line-height: var(--text-action-md-lh);
  }
  .cls_item_price_mc {
    font-size: var(--text-heading-xsm-size);
    font-weight: var(--fw-xbold);
    line-height: 32px;
  }
}

@media (max-width: 950px) {
  .small-screen-1 { display: block !important; }
  .large-screen-1 { display: none !important; }

  .cls_item_name_sg {
    font-size: var(--text-xs-size);
    font-weight: var(--fw-normal);
    line-height: var(--text-xs-lh);
    letter-spacing: 0.2px;
  }
  .cls_item_name_search {
    font-size: var(--text-action-md-size);
    font-weight: var(--fw-xbold);
    line-height: var(--text-action-md-lh);
  }
  .cls_search_results_search {
    font-family: var(--font-heading);
    font-size: var(--text-heading-xsm-size);
    font-weight: var(--fw-xbold);
    line-height: var(--text-heading-xsm-lh);
  }
  .cls_search_results_search_count {
    font-family: var(--font-body);
    font-size: var(--text-action-md-size);
    font-weight: var(--fw-normal);
  }
  .cls_item_price_sg {
    font-size: var(--text-action-md-size);
    font-weight: var(--fw-xbold);
    line-height: var(--text-action-md-lh);
  }
  .cls_item_price_search {
    font-size: var(--text-action-md-size);
    font-weight: var(--fw-normal);
    line-height: var(--text-action-md-lh);
  }
  .cls_item_price_mc {
    font-size: var(--text-action-md-size);
    font-weight: var(--fw-xbold);
    line-height: var(--text-action-md-lh);
  }
}

@media (min-width: 951px) {
  .small-screen-1 { display: none !important; }
  .large-screen-1 { display: block; }

  .cls_item_name_sg {
    font-size: var(--text-action-md-size);
    font-weight: var(--fw-normal);
    line-height: var(--text-action-md-lh);
  }
  .cls_item_name_search {
    font-size: 22px;
    font-weight: var(--fw-xbold);
    line-height: 32px;
  }
  .cls_search_results_search {
    font-family: var(--font-heading);
    font-size: var(--text-display-lg-size);
    font-weight: var(--fw-xbold);
    line-height: var(--text-display-lg-lh);
    letter-spacing: -1px;
  }
  .cls_search_results_search_count {
    font-family: var(--font-body);
    font-size: var(--text-heading-xsm-size);
    font-weight: var(--fw-normal);
    line-height: 28px;
  }
  .cls_item_price_sg {
    font-size: 22px;
    font-weight: var(--fw-xbold);
    line-height: 32px;
  }
  .cls_item_price_search {
    font-size: var(--text-action-md-size);
    font-weight: var(--fw-normal);
    line-height: var(--text-action-md-lh);
  }
}

/* ── Small screen topbar ────────────────────────────────────── */
.topbar-smallscreen-container {
  display: flex;
  padding: var(--space-2) 0;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-1);
  align-self: stretch;
  background: var(--color-topbar-bg);
}

.topbar-smallscreen-space {
  display: flex;
  justify-content: space-between;
  align-items: center;
  align-self: stretch;
  padding: 0 var(--space-2);
}

.topbar_search_div {
  width: 100%;
  padding: var(--space-2);
  background: var(--color-topbar-bg);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.topbar-smallscreen-menu-icon .mud-icon-root {
  color: var(--color-surface-default);
  text-align: center;
  font-size: 36px;
  font-weight: 900;
  line-height: normal;
}

.topbar-snallscreen-tab-icon .mud-icon-root {
  color: var(--color-brand-dark);
  text-align: center;
  font-size: 24px;
  font-weight: 900;
  line-height: normal;
}

.topbar-smallscreen-tab-text {
  color: var(--color-brand-dark);
  text-align: center;
  font-family: var(--font-body);
  font-size: var(--text-xs-size);
  font-weight: var(--fw-normal);
  line-height: var(--text-xs-lh);
  letter-spacing: 0.2px;
}

/* ── Dropdown menu ──────────────────────────────────────────── */
.mud-menu-list {
  display: flex;
  width: 300px;
  padding: var(--space-2);
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  border-radius: var(--radius-lg);
  background: var(--color-surface-default);
  box-shadow: var(--elevation-md);
}

/* ── Bottom navigation bar ──────────────────────────────────── */
.mud-tabs-tabbar-content {
  width: 100%;
  flex: 1 1 auto;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: var(--space-1) var(--space-2) var(--space-3) var(--space-2);
  background: rgba(255, 255, 255, 0.95);
}

.nav-item {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1;
  cursor: pointer;
  gap: 4px;
  color: var(--color-brand-dark);
  font-family: var(--font-body);
  font-size: var(--text-xs-size);
  font-weight: var(--fw-normal);
  line-height: var(--text-xs-lh);
  letter-spacing: 0.2px;
  text-transform: none;
}

.nav-icon {
  color: var(--color-brand-dark);
  text-align: center;
  font-size: 24px;
  font-weight: 900;
  line-height: normal;
}

.nav-text {
  color: var(--color-brand-dark);
  text-align: center;
  font-family: var(--font-body);
  font-size: var(--text-xs-size);
  font-weight: var(--fw-normal);
  line-height: var(--text-xs-lh);
  letter-spacing: 0.2px;
}

.selected-nav-item {
  display: flex;
  width: 64px;
  height: 64px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  border-radius: var(--radius-lg);
  background: var(--color-brand-dark);
}

.selected-nav-icon {
  color: var(--color-surface-default);
  text-align: center;
  font-size: 24px;
  font-weight: 900;
  line-height: normal;
}

.selected-nav-text {
  color: var(--color-surface-default);
  text-align: center;
  font-family: var(--font-body);
  font-size: var(--text-xs-size);
  font-weight: var(--fw-normal);
  line-height: var(--text-xs-lh);
  letter-spacing: 0.2px;
}

.mud-tab.mud-tab-active {
  display: flex;
  width: 64px;
  height: 64px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  border-radius: var(--radius-lg);
  background: var(--color-brand-dark);
  color: var(--color-surface-default);
}

.mud-tab-slider-horizontal { display: none; }
.mud-tabs-scroll-button    { display: none; }

.mud-tab.mud-tab-active:hover {
  display: flex;
  width: 64px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  border-radius: var(--radius-lg);
  background: var(--color-brand-dark);
  color: var(--color-surface-default);
}

.mud-tab .mud-tab-icon-text {
  margin-right: 0;
  margin-inline-end: 0;
  margin-inline-start: 0;
}

.mud-tabs-tabbar .mud-tabs-tabbar-inner {
  display: block !important;
  min-height: 48px;
}

/* ── Fixed tab bar ──────────────────────────────────────────── */
.fixed-bottom-tabs {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: var(--color-surface-default);
}

.custom-tabs-p {
  position: fixed !important;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: var(--color-surface-default);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.1);
  height: 0 !important;
}

.custom-tabs {
  height: 100vh;
  display: flex;
  flex-direction: column;
  --tab-min-width: 100px;
}

.custom-tabs .mud-tabs-tab {
  min-width: var(--tab-min-width) !important;
}

@media (max-width: 420px) {
  .custom-tabs { --tab-min-width: 90px; }

  .mud-tabs-tabbar-content .mud-tabs-tabbar-wrapper {
    width: 100% !important;
    transform: none !important;
    justify-content: space-around;
  }
}

.mud-tabs-panels {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 70px;
}

.mud-tabs-toolbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--color-surface-default);
  height: 70px;
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.1);
}

/* ── Page layout ─────────────────────────────────────────────── */
.page-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.content-area {
  flex: 1;
  overflow-y: auto;
}
