/*
 * VetrinItaly · VT-P06 · Responsive e collaudo finale
 * Caricato per ultimo dal layout condiviso.
 * Non modifica autenticazione, SSO, query, ruoli o dati.
 */

:root {
  --vt-p06-shell: 1380px;
  --vt-p06-gutter: clamp(14px, 3vw, 38px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

@supports (overflow: clip) {
  html,
  body {
    overflow-x: clip;
  }
}

body {
  width: 100%;
  min-width: 320px;
  max-width: 100%;
}

body.vt-menu-open {
  overflow-x: hidden;
}

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

img,
svg,
video,
canvas {
  height: auto;
}

button,
input,
select,
textarea {
  max-width: 100%;
  font: inherit;
}

input[type="file"] {
  width: 100%;
  min-width: 0;
}

h1,
h2,
h3,
h4,
p,
a,
button,
label,
small,
strong,
span,
li,
td,
th {
  overflow-wrap: anywhere;
}

.vt-wrap,
.vt-header-inner,
.vt-nav,
.vt-footer-network,
.vt-footer-grid,
.vt-footer-bottom,
.vt-home-shell,
.vt-home-main,
.vt-catalog-main,
.vt-public-hero-grid,
.vt-public-card-grid,
.vt-public-product-grid,
.vt-public-showcase-grid,
.vt-showcase-detail,
.vt-product-detail,
body.vt-seller-page .vt-section,
body.vt-seller-page .vt-sidebar-layout,
body.vt-seller-page .vt-panel,
body.vt-seller-page .vt-card,
body.vt-seller-page .vt-form-grid,
.portal-account-page,
.portal-account-panel,
.portal-panel-inner {
  min-width: 0;
}

.vt-wrap {
  width: min(100%, var(--vt-p06-shell));
  padding-inline: var(--vt-p06-gutter);
}

/* Barra Network: resta a larghezza piena, ma scorre solo internamente sui piccoli schermi. */
.hi-network-bar {
  max-width: 100%;
  overflow: hidden;
}

.hi-network-bar-inner,
.hi-network-bar .hi-network-links {
  min-width: 0;
}

.hi-network-bar .hi-network-links {
  overscroll-behavior-inline: contain;
}

/* Header: il menu compatto entra prima, così lo stato utente non forza il viewport. */
@media (max-width: 1180px) {
  .vt-header-inner {
    min-height: 78px;
    flex-wrap: wrap;
    gap: 12px 16px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .vt-nav-toggle {
    display: inline-flex;
  }

  .vt-nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    justify-content: stretch;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--vt-border);
  }

  .vt-js .vt-nav:not(.is-open) {
    display: none;
  }

  .vt-nav a {
    min-width: 0;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 9px;
    text-align: center;
    white-space: normal;
  }

  .vt-user-chip {
    width: 100%;
    max-width: none;
    grid-column: 1 / -1;
    order: -1;
    border-radius: 15px;
  }

  .vt-user-copy {
    display: flex;
  }

  .vt-user-copy small {
    max-width: none;
  }
}

@media (min-width: 1181px) {
  .vt-nav {
    display: flex !important;
  }
}

@media (max-width: 700px) {
  .vt-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vt-nav .vt-btn,
  .vt-nav .vt-btn-light {
    width: 100%;
  }
}

@media (max-width: 390px) {
  .vt-brand-copy > strong {
    font-size: 1.08rem;
  }

  .vt-brand > img {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .vt-nav {
    grid-template-columns: 1fr;
  }
}

/* Footer */
.vt-footer-network > *,
.vt-footer-grid > *,
.vt-footer-bottom > * {
  min-width: 0;
}

@media (max-width: 760px) {
  .vt-footer-network-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vt-footer-network-actions,
  .vt-footer-network-actions a {
    width: 100%;
  }

  .vt-footer-network-actions a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    text-align: center;
  }
}

@media (max-width: 390px) {
  .vt-footer-network-actions {
    grid-template-columns: 1fr;
  }
}

/* Homepage */
.vt-home-hero-grid > *,
.vt-home-services-layout > *,
.vt-home-service-card > *,
.vt-home-showcases-layout > *,
.vt-home-showcase-list > *,
.vt-home-product-grid > *,
.vt-home-benefit-grid > *,
.vt-home-steps > *,
.vt-home-community > * {
  min-width: 0;
}

.vt-home-btn,
.vt-home-actions a,
.vt-home-community-actions a {
  max-width: 100%;
}

@media (max-width: 767.98px) {
  .vt-home-shell {
    width: 100%;
    padding-inline: 12px;
  }

  .vt-home-hero,
  .vt-home-products,
  .vt-home-how,
  .vt-home-community {
    width: 100%;
  }

  .vt-home-orbit-card small {
    overflow-wrap: anywhere;
  }
}

@media (max-width: 390px) {
  .vt-home-shell {
    padding-inline: 10px;
  }

  .vt-home-hero-grid,
  .vt-home-products,
  .vt-home-how,
  .vt-home-community,
  .vt-home-services-hub,
  .vt-home-service-card {
    padding-left: 18px;
    padding-right: 18px;
  }

  .vt-home-showcase-compact {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .vt-home-showcase-compact img {
    min-height: 112px;
  }
}

/* Catalogo pubblico */
.vt-public-search > *,
.vt-public-search-products > *,
.vt-public-card > *,
.vt-public-card-body > *,
.vt-product-media-column,
.vt-product-info-panel,
.vt-showcase-detail-media,
.vt-showcase-detail-panel,
.vt-product-gallery > *,
.vt-product-service-grid > * {
  min-width: 0;
}

.vt-public-card,
.vt-public-product-card,
.vt-public-showcase-card {
  max-width: 100%;
}

.vt-public-card-media img,
.vt-showcase-detail-media img,
.vt-product-main-media img,
.vt-gallery-preview img,
.vt-gallery-preview video {
  max-width: 100%;
  max-height: 100%;
}

.vt-public-btn,
.vt-public-text-link,
.vt-product-actions a,
.vt-product-actions button {
  overflow-wrap: anywhere;
}

.vt-media-viewer {
  width: 100vw;
  max-width: 100%;
  height: 100dvh;
  max-height: 100dvh;
}

.vt-media-viewer-content {
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 24px);
}

.vt-media-viewer-image,
.vt-media-viewer-video {
  object-fit: contain;
}

@media (max-width: 640px) {
  .vt-public-hero {
    width: calc(100% - 16px);
  }

  .vt-public-search-actions,
  .vt-public-contact-actions,
  .vt-product-actions {
    width: 100%;
  }

  .vt-public-search-actions > *,
  .vt-public-contact-actions > *,
  .vt-product-actions > * {
    width: 100%;
  }

  .vt-showcase-detail-media,
  .vt-product-main-media,
  .vt-product-main-media .vt-main-media-button {
    min-height: clamp(250px, 78vw, 330px);
  }
}

@media (max-width: 390px) {
  .vt-public-hero {
    width: calc(100% - 12px);
  }

  .vt-product-gallery {
    grid-template-columns: 1fr;
  }

  .vt-public-card-media,
  .vt-public-product-card .vt-public-card-media {
    min-height: 210px;
  }
}

/* Area venditore */
body.vt-seller-page .vt-wrap,
body.vt-seller-page .vt-section {
  max-width: 100%;
}

body.vt-seller-page .vt-side-nav,
body.vt-seller-page .vt-table-wrap {
  max-width: 100%;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

body.vt-seller-page .vt-table-wrap {
  overflow-x: auto;
}

body.vt-seller-page .vt-table {
  width: 100%;
  min-width: 720px;
}

body.vt-seller-page .vt-input,
body.vt-seller-page .vt-select,
body.vt-seller-page .vt-textarea {
  width: 100%;
  min-width: 0;
}

body.vt-seller-page .vt-actions,
body.vt-seller-page .vt-inline-form {
  min-width: 0;
  flex-wrap: wrap;
}

body.vt-seller-page .vt-card-media img,
body.vt-seller-page .vt-panel img,
body.vt-seller-page form.vt-panel img {
  max-width: 100%;
  height: auto;
}

@media (max-width: 1040px) {
  body.vt-seller-page .vt-seller-sidebar {
    max-width: 100%;
    overflow: hidden;
  }

  body.vt-seller-page .vt-side-nav {
    width: 100%;
  }
}

@media (max-width: 720px) {
  body.vt-seller-page .vt-wrap {
    padding-inline: 12px;
  }

  body.vt-seller-page .vt-section-head {
    width: 100%;
  }

  body.vt-seller-page .vt-table {
    min-width: 640px;
  }

  body.vt-seller-page .vt-panel,
  body.vt-seller-page .vt-card-body {
    min-width: 0;
  }
}

@media (max-width: 390px) {
  body.vt-seller-dashboard-page .vt-stats {
    grid-template-columns: 1fr;
  }

  body.vt-seller-page .vt-table {
    min-width: 580px;
  }
}

/* Accesso e registrazione */
.portal-account-media,
.portal-account-copy,
.portal-account-panel,
.portal-topbar,
.portal-form-grid,
.portal-field,
.portal-actions,
.portal-benefits {
  min-width: 0;
}

.portal-account-copy h1,
.portal-panel-inner h2 {
  overflow-wrap: anywhere;
}

@media (max-width: 960px) {
  .portal-account-page {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .portal-account-page {
    min-width: 0;
  }

  .portal-account-panel {
    width: 100%;
  }

  .portal-topbar,
  .portal-actions,
  .portal-button,
  .portal-home {
    max-width: 100%;
  }
}

/* Focus e accessibilità */
:where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid rgba(197, 138, 43, .48);
  outline-offset: 2px;
}

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