/* Header cart — match order-management / Subway reference */
.navbar__right .cart_bag,
.navbar_right .cart_bag {
  position: relative;
}

/* home.html inline CSS forces 2.4×2.4rem — restore standard bag proportions */
.navbar.cms .navbar_right .cart_bag,
body.subway-home .navbar.cms .navbar_right .cart_bag {
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  border: none !important;
}

body.subway-home .navbar.cms .navbar_right .cart_bag.empty {
  padding: 0.35rem 0.5rem !important;
  margin-right: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  border-radius: 0 !important;
}

/* Home: no green full-cart block */
body.subway-home .navbar.cms .navbar_right .cart_bag.full {
  display: none !important;
}

body.subway-home .navbar.cms .navbar_right .cart_bag .button__content {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

body.subway-home .navbar.cms .navbar_right .cart_bag .bag-quantity {
  position: absolute !important;
  top: -0.2rem !important;
  right: -0.15rem !important;
  z-index: 2;
}

.navbar.cms .navbar_right .cart_bag .button__content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.navbar.cms .navbar_right .cart_bag.empty .picture-container,
.navbar.cms .navbar_right .cart_bag.empty .picture-container__img,
.navbar.cms .navbar_right .cart_bag.empty > img {
  width: 2.3rem !important;
  height: 2.9rem !important;
  max-width: none !important;
  flex-shrink: 0;
}

.navbar.cms .navbar_right .cart_bag.full {
  background-color: #008938 !important;
  width: auto !important;
  min-width: 0 !important;
  padding: 1.2rem 1.4rem !important;
  border-radius: 0.5rem !important;
  flex-direction: row !important;
}

.navbar.cms .navbar_right .cart_bag.full .button__content {
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  height: auto !important;
}

.navbar.cms .navbar_right .cart_bag.full .picture-container {
  width: 2.3rem !important;
  flex-shrink: 0;
}

.navbar.cms .navbar_right .cart_bag.full .picture-container__img {
  width: 2.3rem !important;
  height: 2.9rem !important;
  max-width: none !important;
}

.navbar.cms .navbar_right .bag-quantity {
  color: #000;
  position: absolute;
  top: 0;
  right: 1.6rem;
  border-radius: 0.8rem;
  background-color: #f2b700;
  font-size: 1rem;
  min-width: 1.6rem;
  height: 1.6rem;
  padding: 0 0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "SubwaySansLCGMedium", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 700;
  line-height: 1.6rem;
  pointer-events: none;
}

.navbar__right .cart_bag.full.icons,
.navbar__right .icons.cart_bag.full {
  width: auto !important;
  max-width: none !important;
}

.navbar__right .cart_bag.full {
  background-color: #008938;
  width: auto !important;
  padding: 2rem;
  border-radius: 0.5rem;
  border: none;
}

.navbar__right .cart_bag.full[style*="display: none"],
.navbar__right .cart_bag.full[style*="display:none"],
.navbar__right .cart_bag.subway-bag--hidden,
.navbar_right .cart_bag.subway-bag--hidden,
.navbar.cms .navbar_right .cart_bag.subway-bag--hidden {
  display: none !important;
  width: 0 !important;
  min-width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.navbar__right .account_logged,
.navbar__right .account_loggedIn,
.navbar__right .view_bag_button,
.navbar_right .account_logged,
.navbar_right .account_loggedIn,
.navbar_right .view_bag_button,
button.account_logged[data-testid=profile-icon],
button.account_logged[data-testauto-id=profile-icon],
.subway-profile-rudiment--hidden {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  min-width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

@media screen and (min-width: 1024px) {
  .navbar__right .cart_bag.full {
    padding: 1rem 2rem;
    border-radius: 0.5rem;
  }
}

.navbar__right .cart_bag.full .button__content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.navbar__right .cart_bag.full .picture-container {
  width: 2.3rem !important;
  flex-shrink: 0;
}

.navbar__right .cart_bag.full .picture-container__img {
  width: 2.3rem !important;
  height: 2.9rem !important;
  max-width: none !important;
}

.navbar__right .bag-quantity {
  color: #000;
  position: absolute;
  top: 0;
  right: 1.6rem;
  border-radius: 0.8rem;
  background-color: #f2b700;
  font-size: 1rem;
  min-width: 1.6rem;
  height: 1.6rem;
  padding: 0 0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "SubwaySansLCGMedium", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 700;
  line-height: 1.6rem;
  pointer-events: none;
}

header .cart_bag.full {
  display: inline-flex !important;
}

header .cart_bag.empty[style*="display: none"] {
  display: none !important;
}

/* ── Mobile header: logo + cart, nav in side drawer ── */
@media screen and (max-width: 1023px) {
  .navbar.sticky-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    min-height: 6.9rem !important;
    padding: 0 0 0 1.2rem !important;
    box-sizing: border-box !important;
    background: #fff !important;
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.13) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 10001 !important;
  }

  .navbar__left {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex: 0 1 auto !important;
    min-width: 0 !important;
    gap: 0.8rem !important;
  }

  .navbar__menu-items {
    display: none !important;
  }

  .navbar__left > button[data-testid="navbar__subwayLogo"],
  .navbar__left > button[data-testauto-id="navbar__subwayLogo"] {
    flex-shrink: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
    min-width: 0 !important;
    height: auto !important;
  }

  .navbar__primary-logo,
  .navbar__primary-logo--desktop,
  .navbar__left .picture-container {
    flex-shrink: 0 !important;
    width: auto !important;
    max-width: none !important;
    display: block !important;
  }

  .navbar__left .picture-container__img {
    width: auto !important;
    height: 3.2rem !important;
    max-width: 11rem !important;
    min-width: 7rem !important;
    object-fit: contain !important;
    object-position: left center !important;
    display: block !important;
  }

  .navbar__right {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex-shrink: 0 !important;
    margin-left: auto !important;
    gap: 0 !important;
  }

  .navbar__right .cart_bag.full:not(.subway-bag--hidden):not([style*="display: none"]):not([style*="display:none"]) {
    padding: 1.4rem 1.6rem !important;
    border-radius: 0.5rem !important;
  }

  .navbar__right .cart_bag.empty {
    padding: 1.2rem 1.4rem !important;
    background: transparent !important;
    border: none !important;
  }

  .navbar__right .cart_bag.empty .picture-container__img {
    width: 2.3rem !important;
    height: 2.9rem !important;
    max-width: none !important;
  }

  body.subway-mobile-nav--open .navbar__left > button[data-testid="navbar__subwayLogo"],
  body.subway-mobile-nav--open .navbar__left > button[data-testauto-id="navbar__subwayLogo"] {
    visibility: hidden !important;
    width: 0 !important;
    min-width: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .subway-mobile-nav__toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 4.4rem;
    height: 4.4rem;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #008938;
  }

  .subway-mobile-nav__toggle-icon {
    position: relative;
    width: 2.2rem;
    height: 1.6rem;
  }

  .subway-mobile-nav__toggle-icon span {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    transition: transform 0.2s ease, opacity 0.2s ease, top 0.2s ease;
  }

  .subway-mobile-nav__toggle-icon span:nth-child(1) { top: 0; }
  .subway-mobile-nav__toggle-icon span:nth-child(2) { top: 0.7rem; }
  .subway-mobile-nav__toggle-icon span:nth-child(3) { top: 1.4rem; }

  body.subway-mobile-nav--open .subway-mobile-nav__toggle-icon span:nth-child(1) {
    top: 0.7rem;
    transform: rotate(45deg);
  }

  body.subway-mobile-nav--open .subway-mobile-nav__toggle-icon span:nth-child(2) {
    opacity: 0;
  }

  body.subway-mobile-nav--open .subway-mobile-nav__toggle-icon span:nth-child(3) {
    top: 0.7rem;
    transform: rotate(-45deg);
  }
}

@media screen and (min-width: 1024px) {
  .subway-mobile-nav,
  .subway-mobile-nav__toggle {
    display: none !important;
  }
}

/* Side drawer */
.subway-mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
  visibility: hidden;
}

.subway-mobile-nav[aria-hidden="false"] {
  pointer-events: auto;
  visibility: visible;
}

.subway-mobile-nav__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.subway-mobile-nav[aria-hidden="false"] .subway-mobile-nav__overlay {
  opacity: 1;
}

.subway-mobile-nav__panel {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(100%, 42rem);
  max-width: 100%;
  background: #fff;
  transform: translateX(-105%);
  transition: transform 0.28s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-top: 6.9rem;
  box-shadow: 2px 0 16px rgba(0, 0, 0, 0.12);
}

.subway-mobile-nav[aria-hidden="false"] .subway-mobile-nav__panel {
  transform: translateX(0);
}

.subway-mobile-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.subway-mobile-nav__item {
  border-bottom: 1px solid #eaeaea;
}

.subway-mobile-nav__link {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  padding: 2.2rem 4.8rem 2.2rem 2rem;
  border: none;
  background: transparent;
  color: #000;
  font-family: "SubwaySansCondMedium", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  box-sizing: border-box;
}

.subway-mobile-nav__link::after {
  content: "›";
  position: absolute;
  right: 2rem;
  font-size: 2.4rem;
  line-height: 1;
  color: #008938;
  font-weight: 400;
}

body.subway-mobile-nav--open {
  overflow: hidden;
}

/* Home: navbar lives inside fixed .header-sticky (delivery strip below) */
@media screen and (max-width: 1023px) {
  body.subway-home .navbar.cms {
    position: relative !important;
    top: auto !important;
  }
}

/* ── CMS navbar (Gift Cards, Catering, legal pages) ── */
@media screen and (max-width: 1023px) {
  .navbar.cms {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    min-height: 6.9rem !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    background: #fff !important;
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.13) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 10001 !important;
  }

  .navbar.cms .navbar_left {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    gap: 0.8rem !important;
    padding-left: 1.2rem !important;
  }

  .navbar.cms .navbar_menu_items,
  .navbar.cms .navbar_left .navbar_menu_items ul {
    display: none !important;
  }

  .navbar.cms .navbar_left_button.sf-hidden {
    display: none !important;
  }

  .navbar.cms .navbar_logo {
    flex-shrink: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
  }

  .navbar.cms .navbar_logo .primary_logo {
    height: 3.2rem !important;
    width: auto !important;
    max-width: 11rem !important;
    min-width: 7rem !important;
    object-fit: contain !important;
    object-position: left center !important;
  }

  .navbar.cms .navbar_right {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex-shrink: 0 !important;
    margin-left: auto !important;
  }

  .navbar.cms .navbar_right .start_order {
    display: none !important;
  }

  .navbar.cms .navbar_right .cart_bag.full:not(.subway-bag--hidden) {
    padding: 1.2rem 1.4rem !important;
    border-radius: 0.5rem !important;
    width: auto !important;
    min-height: 0 !important;
    height: auto !important;
  }

  .navbar.cms .navbar_right .cart_bag.full .bag-quantity {
    top: 0 !important;
    right: 1.2rem !important;
  }

  .navbar.cms .navbar_right .cart_bag.empty:not(.subway-bag--hidden) {
    padding: 0.35rem 0.5rem !important;
    background: transparent !important;
    border: none !important;
    margin-right: 0 !important;
    width: auto !important;
    height: auto !important;
  }

  .navbar.cms .navbar_right .cart_bag.empty.subway-bag--hidden {
    display: none !important;
  }

  body.subway-mobile-nav--open .navbar.cms .navbar_logo {
    visibility: hidden !important;
    width: 0 !important;
    min-width: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
  }
}

