/*
 * Tank Zone — Mobile Commerce UX v2
 * This stylesheet is inert unless JavaScript adds html.tz-modern-mobile.
 * Removing the class or loading ?tz_ui=classic restores the original UI.
 */

html.tz-modern-mobile {
  --tz-m-accent: #c71920;
  --tz-m-ink: #0d0d0d;
  --tz-m-paper: #fff;
  --tz-m-soft: #f2f1ed;
  --tz-m-line: #deded8;
  --tz-m-muted: #737373;
  --tz-m-radius: 16px;
  --tz-m-shadow: 0 18px 48px rgba(0,0,0,.13);
}

html.tz-modern-mobile body {
  overflow-x: hidden;
  padding-bottom: env(safe-area-inset-bottom);
}

html.tz-modern-mobile *,
html.tz-modern-mobile *::before,
html.tz-modern-mobile *::after {
  box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   Homepage: faster path to products
   -------------------------------------------------------------------------- */
html.tz-modern-mobile .hero {
  min-height: 0 !important;
}

html.tz-modern-mobile .hero > .shell,
html.tz-modern-mobile .hero > .shell.hero-grid {
  gap: 16px !important;
}

html.tz-modern-mobile .hero .hero-copy {
  padding-block: 24px 8px !important;
}

html.tz-modern-mobile .hero .hero-copy h1 {
  margin-bottom: 12px !important;
}

html.tz-modern-mobile .hero .hero-copy p:not(.eyebrow):not(.tz-heavy-eyebrow):not(.tz-gym-tanks-kicker) {
  line-height: 1.65;
}

html.tz-modern-mobile .hero .button,
html.tz-modern-mobile .hero a[class*="button"] {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-inline: 20px;
}

html.tz-modern-mobile .tz-mobile-categories {
  background: var(--tz-m-paper);
  border-bottom: 1px solid var(--tz-m-line);
  padding: 16px 0 22px;
}

html.tz-modern-mobile .tz-mobile-categories .shell {
  width: min(100% - 24px, 1280px);
}

html.tz-modern-mobile .tz-mobile-categories-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

html.tz-modern-mobile .tz-mobile-categories-head strong {
  font-size: 1rem;
  line-height: 1.3;
}

html.tz-modern-mobile .tz-mobile-categories-head span {
  color: var(--tz-m-muted);
  font-size: .67rem;
}

html.tz-modern-mobile .tz-mobile-category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 7px;
}

html.tz-modern-mobile .tz-mobile-category {
  min-width: 0;
  min-height: 88px;
  padding: 10px 8px;
  border: 1px solid var(--tz-m-line);
  border-radius: 12px;
  background: var(--tz-m-soft);
  color: var(--tz-m-ink);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

html.tz-modern-mobile .tz-mobile-category:active {
  transform: scale(.985);
}

html.tz-modern-mobile .tz-mobile-category-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
}

html.tz-modern-mobile .tz-mobile-category-index {
  color: var(--tz-m-accent);
  font: 800 .62rem/1 var(--font-en, sans-serif);
}

html.tz-modern-mobile .tz-mobile-category-arrow {
  font-size: .8rem;
}

html.tz-modern-mobile .tz-mobile-category strong {
  overflow-wrap: anywhere;
  font-size: .73rem;
  line-height: 1.35;
}

html[dir="rtl"].tz-modern-mobile .tz-mobile-category strong {
  font-family: var(--font-ar, sans-serif);
}

html.tz-modern-mobile .featured-section,
html.tz-modern-mobile .catalog-page,
html.tz-modern-mobile [class*="catalog"] {
  scroll-margin-top: 70px;
}

/* --------------------------------------------------------------------------
   Product cards: cleaner hierarchy, keep all existing actions
   -------------------------------------------------------------------------- */
html.tz-modern-mobile .product-grid,
html.tz-modern-mobile .catalog-grid {
  gap: 22px 9px !important;
}

html.tz-modern-mobile .product-card,
html.tz-modern-mobile .tz-product-family {
  min-width: 0;
}

html.tz-modern-mobile .product-card-image {
  border-radius: 14px;
  background: var(--tz-m-soft) !important;
}

html.tz-modern-mobile .product-card-image img {
  object-fit: contain;
}

html.tz-modern-mobile .product-card-copy {
  padding: 10px 2px 0 !important;
}

html.tz-modern-mobile .product-category {
  margin-bottom: 4px;
  color: var(--tz-m-muted);
  font-size: .57rem !important;
  letter-spacing: .04em;
}

html.tz-modern-mobile .product-card h3 {
  min-height: 0 !important;
  margin: 4px 0 8px !important;
  font-size: .82rem !important;
  line-height: 1.45;
}

html.tz-modern-mobile .product-card-meta {
  border-top: 0 !important;
  padding-top: 0 !important;
  align-items: center;
}

html.tz-modern-mobile .product-price {
  color: var(--tz-m-accent);
  font-size: .8rem !important;
  font-weight: 850 !important;
}

html.tz-modern-mobile .round-arrow {
  width: 27px;
  height: 27px;
  border-color: var(--tz-m-line);
  color: var(--tz-m-muted);
}

html.tz-modern-mobile .product-card button,
html.tz-modern-mobile .product-card a {
  -webkit-tap-highlight-color: transparent;
}

html.tz-modern-mobile .product-card-cart-button,
html.tz-modern-mobile .product-card-red-cart,
html.tz-modern-mobile [data-quick-cart-open],
html.tz-modern-mobile [data-open-quick-cart] {
  min-height: 42px !important;
  margin-top: 9px !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  font-size: .69rem !important;
}

html.tz-modern-mobile .tz-buy-action {
  background: var(--tz-m-ink) !important;
  border-color: var(--tz-m-ink) !important;
  color: #fff !important;
}

html.tz-modern-mobile .tz-add-action:not(.tz-buy-action) {
  background: #fff !important;
  border-color: #cfcfc9 !important;
  color: var(--tz-m-ink) !important;
}

/* --------------------------------------------------------------------------
   Group color variants client-side without touching products/database
   -------------------------------------------------------------------------- */
html.tz-modern-mobile .tz-product-family {
  display: block;
}

html.tz-modern-mobile .tz-family-cards > .product-card {
  display: none;
}

html.tz-modern-mobile .tz-family-cards > .product-card.tz-family-active {
  display: block;
}

html.tz-modern-mobile .tz-family-swatches {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 9px;
  padding-inline: 2px;
}

html.tz-modern-mobile .tz-family-swatch {
  width: 25px;
  height: 25px;
  padding: 0;
  border: 2px solid #fff;
  outline: 1px solid #bcbcb5;
  border-radius: 999px;
  background: var(--tz-swatch, #777);
  cursor: pointer;
  box-shadow: none;
}

html.tz-modern-mobile .tz-family-swatch[aria-pressed="true"] {
  outline: 2px solid var(--tz-m-ink);
  outline-offset: 1px;
}

html.tz-modern-mobile .tz-family-swatch[data-tz-light="1"] {
  box-shadow: inset 0 0 0 1px #d0d0cc;
}

/* --------------------------------------------------------------------------
   Quick cart becomes a proper mobile bottom sheet. Existing forms stay intact.
   -------------------------------------------------------------------------- */
html.tz-modern-mobile body.quick-cart-is-open {
  overflow: hidden;
}

html.tz-modern-mobile .quick-cart-modal {
  align-items: end !important;
  place-items: end stretch !important;
  padding: 0 !important;
  background: rgba(0,0,0,.58) !important;
}

html.tz-modern-mobile .quick-cart-panel {
  width: 100% !important;
  max-width: none !important;
  max-height: min(86dvh, 760px) !important;
  margin: 0 !important;
  padding: 20px 16px calc(18px + env(safe-area-inset-bottom)) !important;
  border: 0 !important;
  border-radius: 22px 22px 0 0 !important;
  box-shadow: 0 -18px 50px rgba(0,0,0,.25) !important;
}

html.tz-modern-mobile .quick-cart-panel::before,
html.tz-modern-mobile .quick-cart-dialog-form::before {
  content: "";
  display: block;
  width: 42px;
  height: 4px;
  margin: -7px auto 15px;
  border-radius: 999px;
  background: #d6d6d1;
}

html.tz-modern-mobile .quick-cart-heading {
  padding-bottom: 14px !important;
}

html.tz-modern-mobile .quick-cart-heading h3 {
  font-size: 1rem !important;
}

html.tz-modern-mobile .quick-cart-close {
  border-radius: 999px !important;
}

html.tz-modern-mobile .quick-cart-field select,
html.tz-modern-mobile [data-quick-cart-select] {
  min-height: 48px;
  border-radius: 10px !important;
  background: #fff;
}

html.tz-modern-mobile .quick-cart-submit,
html.tz-modern-mobile .quick-cart-confirm {
  min-height: 50px !important;
  border-radius: 11px !important;
}

/* Native dialog fallback from older quick-cart versions. */
html.tz-modern-mobile dialog.quick-cart-dialog[open] {
  position: fixed;
  inset: auto 0 0 0;
  width: 100% !important;
  max-width: none !important;
  max-height: 86dvh;
  margin: 0;
  border: 0;
  border-radius: 22px 22px 0 0 !important;
  overflow: auto;
}

html.tz-modern-mobile .quick-cart-dialog-form {
  padding: 20px 16px calc(18px + env(safe-area-inset-bottom)) !important;
}

/* Optional visual chips layered on top of the original select. */
html.tz-modern-mobile .tz-option-ui {
  display: grid;
  gap: 14px;
  margin: 4px 0 12px;
}

html.tz-modern-mobile .tz-option-group {
  display: grid;
  gap: 8px;
}

html.tz-modern-mobile .tz-option-group-label {
  color: var(--tz-m-muted);
  font-size: .66rem;
  font-weight: 750;
}

html.tz-modern-mobile .tz-option-row {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

html.tz-modern-mobile .tz-option-chip {
  min-width: 40px;
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid #cecec8;
  border-radius: 9px;
  background: #fff;
  color: var(--tz-m-ink);
  font: 750 .68rem/1 var(--font-en, sans-serif);
  cursor: pointer;
}

html[dir="rtl"].tz-modern-mobile .tz-option-chip {
  font-family: var(--font-ar, sans-serif);
}

html.tz-modern-mobile .tz-option-chip[aria-pressed="true"] {
  border-color: var(--tz-m-ink);
  background: var(--tz-m-ink);
  color: #fff;
}

html.tz-modern-mobile .tz-option-chip[disabled] {
  opacity: .34;
  cursor: not-allowed;
  text-decoration: line-through;
}

html.tz-modern-mobile .tz-color-chip {
  width: 36px;
  min-width: 36px;
  padding: 0;
  border-radius: 999px;
  background: var(--tz-chip-color, #777);
  border: 2px solid #fff;
  outline: 1px solid #bdbdb7;
  color: transparent;
}

html.tz-modern-mobile .tz-color-chip[aria-pressed="true"] {
  outline: 2px solid var(--tz-m-ink);
  outline-offset: 1px;
  background: var(--tz-chip-color, #777);
  color: transparent;
}

html.tz-modern-mobile .tz-option-fallback-note {
  margin: 0;
  color: #8a8a84;
  font-size: .58rem;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Product page: sticky purchase action + size helper
   -------------------------------------------------------------------------- */
html.tz-modern-mobile.tz-product-page body {
  padding-bottom: calc(82px + env(safe-area-inset-bottom)) !important;
}

html.tz-modern-mobile .product-info {
  min-width: 0;
}

html.tz-modern-mobile .product-info h1 {
  line-height: 1.35;
}

html.tz-modern-mobile .product-form label,
html.tz-modern-mobile .product-form select,
html.tz-modern-mobile .product-form input,
html.tz-modern-mobile .product-form button {
  max-width: 100%;
}

html.tz-modern-mobile .product-form select {
  min-height: 48px;
  border-radius: 10px;
}

html.tz-modern-mobile .tz-size-help-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #3158a5;
  font: 750 .67rem/1.4 var(--font-ar, sans-serif);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

html.tz-modern-mobile .tz-sticky-buy {
  position: fixed;
  z-index: 99970;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 68px;
  padding: 9px 12px calc(9px + env(safe-area-inset-bottom));
  border-top: 1px solid #d5d5cf;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: grid;
  grid-template-columns: minmax(78px,.72fr) minmax(0,1.65fr);
  gap: 9px;
  align-items: center;
  box-shadow: 0 -10px 30px rgba(0,0,0,.08);
}

html.tz-modern-mobile .tz-sticky-buy-price {
  min-width: 0;
  color: var(--tz-m-ink);
  font-weight: 850;
  font-size: .8rem;
  line-height: 1.25;
}

html.tz-modern-mobile .tz-sticky-buy-button {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--tz-m-accent);
  border-radius: 11px;
  background: var(--tz-m-accent);
  color: #fff;
  font: 850 .76rem/1 var(--font-ar, sans-serif);
  cursor: pointer;
}

html.tz-modern-mobile .tz-sticky-buy-button:disabled {
  opacity: .52;
  cursor: not-allowed;
}

html.tz-modern-mobile .tz-help-sheet[hidden] {
  display: none !important;
}

html.tz-modern-mobile .tz-help-sheet {
  position: fixed;
  z-index: 100050;
  inset: 0;
  display: grid;
  align-items: end;
  background: rgba(0,0,0,.58);
}

html.tz-modern-mobile .tz-help-panel {
  max-height: 76dvh;
  overflow: auto;
  padding: 20px 17px calc(22px + env(safe-area-inset-bottom));
  border-radius: 22px 22px 0 0;
  background: #fff;
  color: var(--tz-m-ink);
  box-shadow: 0 -18px 50px rgba(0,0,0,.24);
}

html.tz-modern-mobile .tz-help-handle {
  width: 42px;
  height: 4px;
  margin: -6px auto 16px;
  border-radius: 999px;
  background: #d6d6d1;
}

html.tz-modern-mobile .tz-help-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

html.tz-modern-mobile .tz-help-head h3 {
  margin: 0;
  font-size: 1rem;
}

html.tz-modern-mobile .tz-help-close {
  width: 35px;
  height: 35px;
  padding: 0;
  border: 1px solid #d2d2cc;
  border-radius: 999px;
  background: #fff;
  font-size: 1.2rem;
  cursor: pointer;
}

html.tz-modern-mobile .tz-help-panel p {
  margin: 0 0 10px;
  color: #555;
  font-size: .75rem;
  line-height: 1.85;
}

html.tz-modern-mobile .tz-help-highlight {
  padding: 12px;
  border: 1px solid #e2e2dc;
  border-radius: 12px;
  background: var(--tz-m-soft);
  color: var(--tz-m-ink) !important;
  font-weight: 700;
}

/* Existing product assurances: make them faster to scan, don't replace them. */
html.tz-modern-mobile .product-assurances {
  gap: 7px !important;
}

html.tz-modern-mobile .product-assurances > * {
  border-radius: 10px;
}

/* Catalog search: large tap target, no feature replacement. */
html.tz-modern-mobile .catalog-page input[type="search"],
html.tz-modern-mobile .catalog-page input[name="q"],
html.tz-modern-mobile [class*="catalog"] input[type="search"],
html.tz-modern-mobile [class*="catalog"] input[name="q"] {
  min-height: 48px;
  border-radius: 11px;
  font-size: 16px;
}

@media (max-width: 390px) {
  html.tz-modern-mobile .tz-mobile-category-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  html.tz-modern-mobile .tz-mobile-category {
    min-height: 70px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.tz-modern-mobile *,
  html.tz-modern-mobile *::before,
  html.tz-modern-mobile *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* TANKZONE_PRODUCT_HOTFIX_V21_START */
@media (max-width: 760px) {
  html.tz-modern-mobile .tz-sticky-buy {
    min-height: 60px;
    padding: 7px 10px calc(7px + env(safe-area-inset-bottom));
    grid-template-columns: minmax(92px,.78fr) minmax(0,1.48fr);
    gap: 8px;
    box-shadow: 0 -6px 22px rgba(0,0,0,.08);
    transition: transform .22s ease, opacity .18s ease, visibility .18s ease;
  }

  html.tz-modern-mobile .tz-sticky-buy.tz-sticky-hidden {
    transform: translateY(calc(110% + env(safe-area-inset-bottom)));
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  html.tz-modern-mobile .tz-sticky-buy-price {
    font-size: .77rem;
    line-height: 1.2;
    text-align: start;
    white-space: nowrap;
  }

  html.tz-modern-mobile .tz-sticky-buy-button {
    min-height: 44px;
    border-radius: 10px;
    font-size: .74rem;
  }

  html.tz-modern-mobile.tz-modern-product-page body {
    padding-bottom: calc(70px + env(safe-area-inset-bottom));
  }
}
/* TANKZONE_PRODUCT_HOTFIX_V21_END */
