/* Catalog cards: same 3:4 crop */
:root {
  --go-img-ratio: 3 / 4;
}

.catalog-card-art,
.product-img-wrap,
.product-card-image {
  aspect-ratio: var(--go-img-ratio) !important;
  max-height: none !important;
  min-height: 0 !important;
  height: auto !important;
  overflow: hidden !important;
}

.catalog-card-art img,
.product-img-wrap img,
.product-card-image img,
.placeholder-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
}

/* Product page: image column stretches with info — no white gap under photo */
.product-page-wrap {
  min-height: 0 !important;
  padding: 0.75rem 0 1.25rem !important;
}

.product-page-main {
  align-items: stretch !important;
  max-width: min(920px, 100%) !important;
}

.product-page-gallery,
.product-detail-image-wrap {
  position: relative !important;
  align-self: stretch !important;
  width: 100% !important;
  height: auto !important;
  min-height: 100% !important;
  aspect-ratio: unset !important;
  max-height: none !important;
  overflow: hidden !important;
  background: #1c1c1c !important;
}

.product-page-gallery img,
.product-detail-image-wrap img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
}

.product-page-info,
.product-detail-info {
  justify-content: flex-start !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 1rem 1.15rem 1.1rem !important;
  gap: 0.4rem !important;
}

.product-page-add-btn,
.product-detail-add-btn {
  margin-top: 0.25rem !important;
  margin-bottom: 0 !important;
}

@media (max-width: 980px) {
  .product-page-main {
    align-items: start !important;
  }

  .product-page-gallery,
  .product-detail-image-wrap {
    aspect-ratio: var(--go-img-ratio) !important;
    min-height: 0 !important;
    max-height: none !important;
    width: 100% !important;
  }
}

/* Footer logo: light theme must not force black text on dark footer */
body.has-lina-chrome .footer-brand .lina-logo,
body.has-lina-chrome .footer-brand .lina-logo .lina-logo-text,
body.has-lina-chrome .footer-brand .lina-logo--on-dark,
body.has-lina-chrome .footer-brand .lina-logo--on-dark .lina-logo-text,
[data-theme="light"] body.has-lina-chrome .footer-brand .lina-logo,
[data-theme="light"] body.has-lina-chrome .footer-brand .lina-logo-text {
  color: #f4f4f2 !important;
}

nav.lina-langbar {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

@media (max-width: 900px) {
  /*
   * iOS/Android: overflow-x on BOTH html+body (esp. clip) blocks vertical scroll.
   * Keep clipping only on body; leave html free to scroll.
   */
  html {
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    height: auto !important;
    max-height: none !important;
    touch-action: manipulation;
  }

  body,
  body.has-lina-chrome,
  body:not(.is-checkout-flow) {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: auto !important;
    height: auto !important;
    max-height: none !important;
    min-height: 100% !important;
    position: static !important;
    touch-action: pan-x pan-y !important;
    -webkit-overflow-scrolling: touch;
  }

  body.lina-nav-open {
    overflow: hidden !important;
  }

  nav.lina-langbar {
    display: flex !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    height: calc(2.75rem + env(safe-area-inset-top, 0px)) !important;
    max-height: calc(2.75rem + env(safe-area-inset-top, 0px)) !important;
    min-height: calc(2.75rem + env(safe-area-inset-top, 0px)) !important;
    padding-top: env(safe-area-inset-top, 0px) !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    gap: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x !important;
    z-index: 4000 !important;
    background: #ecece8 !important;
    border-right: none !important;
    border-bottom: 1px solid rgba(28, 28, 28, 0.12) !important;
    box-shadow: none !important;
  }

  nav.lina-langbar a {
    flex: 0 0 auto !important;
    display: grid !important;
    place-items: center !important;
    min-width: 2.6rem !important;
    min-height: 2.75rem !important;
    padding: 0 0.55rem !important;
    font-size: 0.78rem !important;
    font-weight: 800 !important;
    color: #1c1c1c !important;
    background: transparent !important;
  }

  nav.lina-langbar a.is-on {
    background: #c8f542 !important;
    color: #1c1c1c !important;
  }

  body:not(.is-checkout-flow) {
    padding-left: 0 !important;
    padding-top: calc(2.75rem + env(safe-area-inset-top, 0px)) !important;
  }

  .lina-header {
    top: calc(2.75rem + env(safe-area-inset-top, 0px)) !important;
    z-index: 3500 !important;
    background: #f4f4f2 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom: 1px solid rgba(28, 28, 28, 0.08) !important;
    touch-action: manipulation;
  }

  .storefront-main-wrap,
  .lina-home,
  main {
    touch-action: pan-y !important;
    overflow: visible !important;
  }
}
