/* Shared responsive refinements for the public site and the visual editor preview. */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

img,
svg,
video {
  max-width: 100%;
}


/* Multi-spec products share one card; the open comparison panel only covers the left side. */
.product-variant-picker {
  position: relative;
  z-index: 4;
  display: block;
  width: min(54%, 250px);
  min-width: 205px;
  margin: 0 0 18px;
}

.product-variant-picker summary {
  position: relative;
  display: flex;
  min-height: 42px;
  padding: 9px 42px 9px 13px;
  align-items: center;
  border: 1px solid #ccd6dd;
  border-radius: 12px;
  outline: 0;
  background: #f8faf9;
  color: #40576b;
  cursor: pointer;
  font: 700 13px/1.35 Arial, 'Microsoft YaHei', sans-serif;
  list-style: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.product-variant-picker summary::-webkit-details-marker {
  display: none;
}

.product-variant-picker summary::after {
  position: absolute;
  top: 50%;
  right: 16px;
  width: 8px;
  height: 8px;
  transform: translateY(-70%) rotate(45deg);
  border-right: 1.5px solid #28588f;
  border-bottom: 1.5px solid #28588f;
  content: '';
  transition: transform .18s ease;
}

.product-variant-picker[open] summary {
  border-color: #28588f;
  border-radius: 12px 12px 9px 9px;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(114, 189, 241, .16);
}

.product-variant-picker[open] summary::after {
  transform: translateY(-20%) rotate(225deg);
}

.product-variant-options {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  z-index: 8;
  display: grid;
  width: 100%;
  max-height: 248px;
  gap: 3px;
  padding: 6px;
  overflow-y: auto;
  border: 1px solid #c8d4dd;
  border-radius: 14px;
  background: rgba(253, 252, 249, .98);
  box-shadow: 0 18px 38px rgba(16, 54, 92, .18);
  scrollbar-width: thin;
}

.product-variant-option {
  width: 100%;
  min-height: 34px;
  padding: 7px 9px;
  overflow: hidden;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #40576b;
  cursor: pointer;
  font: 700 12px/1.3 Arial, 'Microsoft YaHei', sans-serif;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-variant-option:hover,
.product-variant-option:focus-visible {
  outline: 0;
  background: #eaf3f9;
  color: #10365c;
}

.product-variant-option[aria-selected='true'] {
  background: #28588f;
  color: #fff;
}

.product-item:has(.product-variant-picker[open]) {
  position: relative;
  z-index: 5;
}

.sku-list tr.is-selected td {
  background: rgba(114, 189, 241, .13);
  color: #10365c;
  font-weight: 800;
}

@media (pointer: coarse) {
  :is(a, button, select, summary, input, textarea) {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
}

/* Portrait tablets: stack the large editorial compositions before they become cramped. */
@media (max-width: 900px) {
  header nav .links {
    display: none;
  }

  .hero-grid,
  .about-grid,
  .quality-grid,
  .heading {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-grid,
  .about-grid,
  .quality-grid {
    gap: 42px;
  }

  .hero h1 {
    max-width: 10ch;
    font-size: clamp(52px, 8.5vw, 72px);
  }

  .stage.logo-hero img {
    min-height: clamp(410px, 68vw, 540px);
  }

  .about-carousel {
    min-height: 420px;
  }

  .product-dialog,
  .contact-dialog {
    width: min(100%, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
  }

  .ventro-faq-hero h1 {
    white-space: normal;
    text-wrap: balance;
  }
}

/* Phones and small tablets: favor one readable content column and thumb-safe controls. */
@media (max-width: 700px) {
  .wrap,
  .ventro-faq-wrap,
  .ventro-about-page .about-page-wrap {
    width: min(100% - 28px, 1240px);
  }

  .section {
    padding-block: 64px;
  }

  .hero {
    padding-block: 44px 58px;
  }

  .hero h1 {
    max-width: 9.5ch;
    font-size: clamp(46px, 12vw, 60px);
  }

  .stage,
  .stage.logo-hero img {
    min-height: clamp(310px, 88vw, 430px);
  }

  .product-grid,
  .catalog-toolbar,
  .documentation-grid,
  .inquiry-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .catalog-search,
  .span-2 {
    grid-column: auto;
  }

  .product-item {
    min-height: auto;
  }

  .product-variant-picker summary {
    min-height: 48px;
    font-size: 14px;
  }

  .product-actions > :first-child {
    min-height: 50px;
  }

  .product-actions .inquiry-add {
    min-width: 50px;
    min-height: 50px;
  }

  .cart-panel {
    right: 12px;
    bottom: calc(205px + env(safe-area-inset-bottom));
    left: 12px;
    width: auto;
    max-height: calc(100dvh - 235px - env(safe-area-inset-bottom));
    border-radius: 22px;
  }

  .cart-float {
    right: 14px;
    bottom: calc(137px + env(safe-area-inset-bottom));
  }

  .whatsapp-float {
    right: 14px;
    bottom: calc(62px + env(safe-area-inset-bottom));
  }

  .ventro-faq-page,
  .ventro-about-manufacturing,
  .ventro-about-portfolio,
  .ventro-about-cta {
    padding-top: 54px;
    padding-bottom: 72px;
  }

  .ventro-faq-hero {
    padding: 34px 22px 38px;
  }

  .catalog-group-title,
  .product-body h3,
  .ventro-about-product strong {
    overflow-wrap: anywhere;
  }
}

@media (max-width: 430px) {
  nav.wrap {
    gap: 0.48rem;
  }

  .logo {
    font-size: 19px;
  }

  .lang {
    max-width: 78px;
    padding-inline: 8px;
  }

  .hero h1 {
    font-size: clamp(42px, 13.5vw, 54px);
  }

  .heading h2 {
    font-size: 38px;
  }

  .quality h2 {
    font-size: 45px;
  }

  .catalog-shell {
    padding: 12px;
  }

  .product-body {
    padding-inline: 18px;
  }

  .product-tags {
    gap: 12px;
  }

  .product-tags .product-price {
    font-size: 18px;
  }

  .cart-panel-header,
  .cart-panel-footer {
    padding-inline: 16px;
  }

  .cart-items {
    padding-inline: 16px;
  }

  .cart-item {
    align-items: start;
    grid-template-columns: minmax(0, 1fr);
  }

  .cart-item-controls {
    justify-content: flex-end;
  }

  .cart-item-controls button {
    width: 34px;
    height: 34px;
  }

  .ventro-welcome-notice {
    min-height: 4.5rem;
  }

  .ventro-welcome-notice-inner {
    min-height: 4.5rem;
    width: calc(100% - 12px);
    padding-right: 3.9rem;
    padding-left: 0.5rem;
  }

  .ventro-welcome-message {
    padding-block: 0.85rem;
    font-size: 0.98rem;
    line-height: 1.35;
  }

  .ventro-welcome-close {
    width: 3.8rem;
    height: 4.5rem;
    font-size: 1.8rem;
  }

  .catalog-menu-drawer {
    width: 100vw;
    border-radius: 0;
  }

  .catalog-menu-category {
    min-height: 3.6rem;
  }

  html.catalog-view #products .heading h2,
  .ventro-about-page-title,
  .ventro-faq-hero h1 {
    overflow-wrap: anywhere;
  }
}

@media (max-height: 620px) and (orientation: landscape) {
  .catalog-menu-header {
    padding-top: 4.6rem;
    padding-bottom: 1rem;
  }

  .catalog-menu-footer {
    padding-block: 0.75rem;
  }

  .catalog-menu-research {
    display: none;
  }

  .cart-panel {
    top: 12px;
    bottom: 12px;
    max-height: none;
  }
}

/* Quotation-catalog product photography. The editor's per-SKU image remains the top layer. */
.product-visual > .product-catalog-image,
.dialog-visual > .dialog-product-image {
  position: absolute !important;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-visual > .product-catalog-image { z-index: 1 !important; }
.product-visual > .ve-product-image { position: absolute !important; z-index: 2 !important; }
.product-visual > .product-code { position: absolute !important; z-index: 3 !important; }
.product-visual:has(.product-catalog-image)::before { visibility: hidden; }
.dialog-visual { position: relative; overflow: hidden; }
.dialog-visual > .dialog-product-image { z-index: 1; }

/* Keep every catalog visual square so square product photography is shown without cropping. */
.product-visual {
  width: 100%;
  min-height: 0;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
}

.product-visual > .product-catalog-image,
.product-visual > .ve-product-image {
  object-fit: contain;
}
/* 20260914: compact enquiry controls and readable mobile catalogue search. */
@media (max-width: 900px) {
  #cartFloat { width: 56px; min-width: 56px; height: 56px; min-height: 56px; padding: 14px; right: 14px; bottom: calc(84px + env(safe-area-inset-bottom)); border-radius: 18px; gap: 0; }
  #cartFloat > [data-k="cartLabel"] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  #cartFloat .cart-count { position: absolute; top: -7px; right: -5px; min-width: 22px; width: auto; height: 22px; padding: 0 4px; font-size: 11px; border: 2px solid #fff; border-radius: 50%; }
  #whatsappFloat { width: 52px; height: 52px; min-width: 52px; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); }
  #whatsappFloat svg { width: 29px; height: 29px; }
  #cartPanel { bottom: calc(154px + env(safe-area-inset-bottom)); max-height: calc(100dvh - 175px - env(safe-area-inset-bottom)); }
}
@media (max-width: 600px) {
  #catalogSearchForm { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  #catalogSearchForm .catalog-search { grid-column: auto; }
  #catalogSearchForm .catalog-search-control { grid-template-columns: minmax(0, 1fr) 44px; gap: 6px; }
  #productSearch { min-height: 48px; padding: 10px; font-size: 14px; }
  #catalogSearchSubmit { width: 44px; height: 48px; }
  #clearFilters { grid-column: auto; min-width: 52px; min-height: 48px; padding: 8px; font-size: 13px; }
  .catalog-meta { display: grid; grid-template-columns: 1fr; gap: 6px; margin-top: 18px; }
  .catalog-meta > span:first-child { white-space: nowrap; }
  .catalog-meta > span:last-child { text-align: left; font-size: 12px; line-height: 1.5; }
}
@media (max-height: 620px) and (orientation: landscape) {
  #cartPanel { top: 12px; bottom: 12px; max-height: calc(100dvh - 24px); }
}
