/* ============================================================
   Iwakuni menu redesign — categories, nav, location card,
   order-status panel, menu item cards, mobile cart bar.
   ============================================================ */

/* ---------- Shared page width ---------- */
.menu-page-container {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
  width: 100%;
}

/* ---------- Top navigation ---------- */
#page-header.redesign-header {
  background: #FFC930;
  padding: 12px 0;
  position: relative;
}
#page-header.redesign-header .menu-header {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
  float: none;
  width: 100%;
}
#page-header.redesign-header .logo {
  flex: 0 0 auto;
}
#page-header.redesign-header #headerLogo {
  max-height: 48px;
  width: auto;
}
#page-header.redesign-header .navbar-header {
  display: none;
}
.nav-desktop {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-desktop li > a {
  color: #000;
  text-decoration: none;
  text-transform: uppercase;
  font-size: .85rem;
  font-weight: 600;
  white-space: nowrap;
}
.nav-toggle-btn {
  display: none;
  border: 2px solid #000;
  background: transparent;
  padding: 6px 12px;
  font-size: 1.2rem;
  line-height: 1;
  border-radius: 6px;
  cursor: pointer;
}
.nav-mobile-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 2px solid #000;
  z-index: 60;
  flex-direction: column;
  padding: 8px 0;
  box-shadow: 0 8px 16px rgba(0,0,0,.15);
}
.nav-mobile-panel.open {
  display: flex;
}
.nav-mobile-panel a {
  display: block;
  padding: 12px 24px;
  color: #000;
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 600;
  font-size: .9rem;
}
@media (max-width: 899px) {
  .nav-desktop { display: none !important; }
  .nav-toggle-btn { display: inline-block !important; }
}

/* ---------- Location header card (replaces hero image) ---------- */
.location-header-card {
  border: 1px solid #d8d8d8;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.10);
  padding: 20px 22px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin: 16px auto 0;
  max-width: 1220px;
}
.location-header-card .eyebrow {
  margin: 0 0 4px;
  color: #991B20;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-align: left;
}
.location-header-card h1 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.1;
  text-transform: uppercase;
  text-align: left;
  color: #000;
}
.location-header-card .address {
  margin: 8px 0 0;
  color: #333;
  text-align: left;
}
.location-header-card .change-restaurant-link {
  border: 0;
  background: transparent;
  color: #991B20;
  font-weight: 700;
  text-decoration: underline;
  padding: 4px;
  cursor: pointer;
  white-space: nowrap;
}

/* ---------- Category bar (top, scrollable, sticky) ---------- */
.top-category-bar {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  padding: 12px 0;
  border-bottom: 1px solid #ddd;
  margin-bottom: 15px;
  font-size: 12px;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 40;
  background: #fff;
}
.top-category-bar .category-parent {
  flex: 0 0 auto;
  width: auto;
  margin: 0;
}
.category-pill {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 20px;
  border: 2px solid #FFC930;
  background: #fff;
  color: #000;
  text-decoration: none;
  white-space: nowrap;
  text-transform: uppercase;
  font-weight: 700;
}
.category-pill.active {
  border-color: #991B20;
  background: #991B20;
  color: #fff;
}
.category-pill:hover:not(.active) {
  background: #e8ab3f;
  border-color: #e8ab3f;
  color: #000;
}
.category-pill.active:hover {
  background: #FFC930;
  border-color: #FFC930;
  color: #000;
}
.category-group-wrap {
  position: relative;
}
.category-group-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border-radius: 20px;
  border: 2px solid #FFC930;
  background: #fff;
  color: #000;
  text-decoration: none;
  white-space: nowrap;
  text-transform: uppercase;
  font-weight: 700;
  cursor: pointer;
}
.category-group-toggle.active {
  border-color: #991B20;
  background: #991B20;
  color: #fff;
}
.category-group-toggle:hover:not(.active) {
  background: #e8ab3f;
  border-color: #e8ab3f;
  color: #000;
}
.category-group-toggle.active:hover {
  background: #FFC930;
  border-color: #FFC930;
  color: #000;
}
.category-group-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0,0,0,.18);
  min-width: 190px;
  padding: 6px 0;
  white-space: normal;
}
.category-group-dropdown .category-sub-item {
  padding: 2px 14px;
}
.category-group-dropdown a {
  display: block;
  padding: 6px 4px;
  text-decoration: none;
  white-space: nowrap;
}
.category-bar-disclaimer {
  width: 100%;
  padding: 0;
  margin-top: 4px;
  white-space: normal;
}

/* ---------- Order status ("My Order") panel ---------- */
#order-status.redesign-order-status {
  border: 1px solid #000;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
#order-status.redesign-order-status #order-items {
  padding: 0 !important;
}
.order-header-bar {
  background: #FFC930;
  margin: 0;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 7px 7px 0 0;
}
.order-header-bar h2 {
  margin: 0;
  font-size: 1.25rem;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
}
.order-header-bar .glyphicon-shopping-cart {
  font-size: 1.5rem;
}
.order-count-badge {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #991B20;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .95rem;
  margin-left: auto;
}
.order-content {
  padding: 18px;
}
.order-content .location-line {
  margin: 0 0 2px;
}
.order-content h3.location-name {
  margin: 0 0 2px;
  text-transform: none;
  font-size: 1.15rem;
}
.order-content h4.location-address {
  margin: 0 0 2px;
  font-weight: 400;
  color: #333;
}
.order-content h4.location-phone {
  margin: 0 0 12px;
  font-weight: 400;
  color: #333;
}
.order-type-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 0;
  margin: 0;
  border-top: 1px solid #ddd;
  width: 100%;
}
.order-type-label {
  font-weight: 700;
  text-transform: uppercase;
  font-size: .85rem;
  margin: 0;
  width: 100%;
}
.order-type-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin: 0;
  text-align: left;
}
.order-type-box {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  border: 1px solid #d8d8d8;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  background: #fff;
  box-sizing: border-box;
}
.order-type-box input[type="radio"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #991B20;
}
.order-type-box .option-text {
  font-size: .85rem;
  white-space: nowrap;
}
.order-type-box.selected {
  background: #FFE07D;
  border: 2px solid #e8ab3f;
}
.empty-cart-box {
  background: #f7f7f7;
  border-radius: 10px;
  padding: 24px 12px;
  text-align: center;
  color: #666;
  font-size: 1rem;
  font-weight: 400;
  margin-top: 14px;
}

/* ---------- Menu item cards ---------- */
.menu-card {
  display: flex;
  flex-direction: column;
  height: auto;
  border: 1px solid #ddd;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  background: #fff;
}
.menu-card-image {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  flex-shrink: 0;
}
.menu-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.menu-card-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.menu-card-title {
  font-size: 15px;
  text-transform: uppercase;
  font-weight: 700;
  margin: 0;
}
.menu-card-desc {
  font-size: 13px;
  color: #555;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}
.menu-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 6px;
}
.menu-card-price {
  font-size: 17px;
  font-weight: 700;
  margin: 0;
}
.add-to-order-btn {
  font-size: 11px;
  padding: 8px 16px;
  border-radius: 20px;
  background: #991B20;
  color: #fff;
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 700;
  white-space: nowrap;
  display: inline-block;
}
.add-to-order-btn:hover {
  background: #FFC930;
  color: #000;
}
.menu-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
@media (max-width: 640px) {
  .menu-card-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Mobile cart bar ---------- */
.mobile-cart-bar-link {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 80;
  min-height: 58px;
  border: none;
  border-radius: 999px;
  background: #991B20;
  color: #fff;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  box-shadow: 0 10px 26px rgba(0,0,0,.28);
  transition: opacity .25s ease, transform .25s ease;
}
.mobile-cart-bar-link .bar-label {
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  font-size: .95rem;
}
.mobile-cart-bar-link .bar-summary {
  color: #fff;
  font-weight: 700;
  font-size: .9rem;
}
.mobile-cart-bar-link.hidden-bar {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}
@media (min-width: 921px) {
  .mobile-cart-bar-link {
    display: none;
  }
}

#order-status.redesign-order-status {
  padding: 0 !important;
}

.order-type-locked {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  border: 2px solid #e8ab3f;
  background: #FFE07D;
  border-radius: 10px;
  padding: 10px 12px;
  box-sizing: border-box;
}

.order-type-locked {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  border: 2px solid #e8ab3f;
  background: #FFE07D;
  border-radius: 10px;
  padding: 10px 12px;
  box-sizing: border-box;
}

/* Fix: location name (h1) color losing to a higher-specificity global heading rule */
.location-header-card h1 {
  color: #000 !important;
}

/* Fix: nav sitting left-aligned inside its old Bootstrap grid column instead of at the header's right edge */
#page-header.redesign-header .col-xs-8.col-md-3 {
  flex: 0 0 auto !important;
  width: auto !important;
  float: none !important;
}
#page-header.redesign-header .col-xs-4.col-md-9 {
  flex: 1 1 auto !important;
  width: auto !important;
  float: none !important;
}
#page-header.redesign-header #site-menu,
#page-header.redesign-header #site-menu nav {
  display: flex !important;
  justify-content: flex-end !important;
  width: 100%;
}

/* Fix: "My Order" h2 not stretching full width, so badge's margin-left:auto has nowhere to push to */
.order-header-bar h2 {
  width: 100%;
}

/* Center "My Order" + badge together as one group instead of spacing them apart */
.order-header-bar {
  justify-content: center !important;
}
.order-header-bar h2 {
  width: auto !important;
}
.order-count-badge {
  margin-left: 4px !important;
}

/* Override #content h1's white/centered/oversized-line-height styling (template.css:116)
   by matching its #content prefix so our rule wins on specificity, not just !important */
#content .location-header-card h1 {
  color: #000000 !important;
  text-align: left !important;
  line-height: 1.1 !important;
  font-size: 2rem !important;
  text-transform: uppercase !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* Fix: logo was capped at 48px by our nav restyle - restore a larger size */
#page-header.redesign-header #headerLogo {
  max-height: 64px !important;
}

/* Fix: nav links shrunk to .85rem by our nav restyle - restore closer to original size */
.nav-desktop li > a {
  font-size: 1rem !important;
}

/* Fix: order-type text (both boxed radio options and the locked read-only state)
   inheriting a smaller font-size than the original template - restore explicit size */
.order-type-box .option-text,
.order-type-locked span {
  font-size: 1rem !important;
}

/* Bump nav and order-type text sizes up further - still a bit small at 1rem */
.nav-desktop li > a {
  font-size: 1.1rem !important;
}
.order-type-box .option-text,
.order-type-locked span {
  font-size: 1.1rem !important;
}

/* Order type locked state (item already in cart) - matches checkout page's look:
   label + icon + value centered on one line, thin gold border, no solid fill */
.order-type-locked {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  background: #fff !important;
  border: 1px solid #e8ab3f !important;
}
.order-type-locked-label {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1rem;
}

/* Fill the locked order-type box with the lighter yellow, bigger text */
.order-type-locked {
  background: #FFE07D !important;
  border: 2px solid #e8ab3f !important;
}
.order-type-locked-label,
.order-type-locked span {
  font-size: 1.15rem !important;
}

/* Fix: the Java-generated order-type markup carries Bootstrap's .row class, whose
   default -15px left/right margin has nothing canceling it out here, causing the
   whole box to bleed left/right past the rest of the card's content */
.order-type-row .row {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Small gap between the order-type bubble and whatever follows it (item table, etc.) */
.order-type-row {
  margin-bottom: 12px !important;
}

/* Fix: order item table extends 15px past the order-type bubble's right edge -
   force it to respect the same box model/width as everything else in the card */
#order-status .order-content table.table-striped {
  width: 100% !important;
  box-sizing: border-box !important;
  margin-right: 0 !important;
}
#order-status .order-content .table-responsive {
  width: 100% !important;
  margin-right: 0 !important;
  overflow-x: visible !important;
}

/* Match the gap below the order-type bubble to the gap above it */
.order-type-row {
  margin-bottom: 20px !important;
  padding-bottom: 12px !important;
}

/* Fix: the actual gap between the order-type bubble and its border-bottom separator
   line is controlled by this inner Java-generated wrapper (form-separator-2), not
   our outer .order-type-row - add real space here instead */
.order-type-row .form-separator-2 {
  padding-bottom: 12px !important;
}

/* Stack order-status below menu items on narrow screens instead of squeezing side-by-side */
@media (max-width: 920px) {
  .menu-content-row {
    flex-direction: column !important;
  }
  .menu-content-row > div:last-child {
    position: static !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: 100% !important;
  }
}

/* Fix: something overrides display:flex on this <a> tag to display:block,
   causing its children to stack left instead of spreading across the bar */
.mobile-cart-bar-link {
  display: flex !important;
}

/* Bigger text in the mobile cart bar */
.mobile-cart-bar-link .bar-label,
.mobile-cart-bar-link .bar-summary {
  font-size: 1.1rem !important;
}

/* Bigger still */
.mobile-cart-bar-link .bar-label,
.mobile-cart-bar-link .bar-summary {
  font-size: 1.3rem !important;
}

/* Fix: jumping to #menu-items on category change lands the category name right
   behind the sticky category bar - reserve space so the browser scrolls past it */
#menu-items {
  scroll-margin-top: 70px;
}

/* Fix: missing menu item images were collapsing the whole image area, making those
   cards shorter than ones with real images. Keep the space reserved, show a plain
   placeholder background instead. */
.menu-card-image.no-image {
  background: #f0f0f0;
}

/* Force every card in the grid to the same height, regardless of content amount,
   using CSS Grid's implicit row sizing */
.menu-card-grid {
  grid-auto-rows: 1fr;
}
.menu-card {
  height: 100%;
}

/* Fix: .nav-mobile-panel was positioning against the inner #site-menu column
   (which has its own position:relative from elsewhere), not the full header -
   switch to fixed positioning anchored to the viewport instead */
.nav-mobile-panel {
  position: fixed !important;
  top: 86px !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
}

/* Identify/checkout-login page: single centered card instead of a spread 3-column grid */
.identify-card {
  max-width: 480px;
  margin: 40px auto;
  padding: 30px;
  border: 1px solid #d8d8d8;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  background: #fff;
}
.identify-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.identify-section-title {
  margin: 0 0 4px;
  font-size: 1.3rem;
  text-transform: uppercase;
  text-align: center;
}
.identify-field label {
  display: block;
  font-weight: 700;
  font-size: .9rem;
  margin-bottom: 4px;
}
.identify-input {
  width: 100%;
  box-sizing: border-box;
}
.identify-error-row {
  min-height: 20px;
  text-align: center;
}
.identify-btn-full {
  width: 100%;
  text-align: center;
}
.identify-btn-secondary {
  margin-top: 4px;
}
.identify-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 24px 0;
  color: #999;
  font-weight: 700;
  text-transform: uppercase;
  font-size: .85rem;
}
.identify-divider::before,
.identify-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid #ddd;
}
.identify-divider span {
  padding: 0 12px;
}
