/* Walco – TYPO3 13 site package */
:root {
  --c-brand: #d4122f;
  --c-brand-dark: #a80e25;
  --c-ink: #1f2328;
  --c-muted: #5c6670;
  --c-line: #e3e6ea;
  --c-soft: #f5f6f8;
  --c-white: #fff;
  --radius: 10px;
  --shadow: 0 6px 24px rgba(20, 24, 28, .08);
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --font: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--c-ink);
  background: var(--c-white);
}
img, video, iframe { max-width: 100%; height: auto; }
a { color: var(--c-brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--c-brand-dark); }
h1, h2, h3, h4 { line-height: 1.25; margin: 1.6em 0 .6em; font-weight: 700; }
h1 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin-top: .4em; }
h2 { font-size: clamp(1.4rem, 2.5vw, 1.9rem); }
h3 { font-size: 1.25rem; }
table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
th, td { padding: .55rem .75rem; border-bottom: 1px solid var(--c-line); text-align: left; vertical-align: top; }
th { background: var(--c-soft); }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--c-brand); color: #fff; padding: .5rem 1rem; z-index: 100; }
.skip-link:focus { left: 1rem; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--c-brand) 60%, transparent); outline-offset: 2px; }

/* Topbar */
.topbar { background: var(--c-ink); color: #cfd4d9; font-size: .85rem; }
.topbar__inner { display: flex; gap: 1.5rem; justify-content: flex-end; padding-block: .35rem; }
.topbar a { color: inherit; text-decoration: none; }
.topbar a:hover { color: #fff; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--c-line); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 1rem; }
.brand img { display: block; height: 44px; width: auto; }

.main-nav__list { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; }
.main-nav__item { position: relative; }
.main-nav__item > a {
  display: block; padding: .75rem 1rem; color: var(--c-ink); text-decoration: none;
  font-weight: 600; font-size: .95rem; border-radius: 6px;
}
.main-nav__item > a:hover, .main-nav__item.is-active > a { color: var(--c-brand); }
.main-nav__sub {
  list-style: none; margin: 0; padding: .5rem; position: absolute; left: 0; top: 100%;
  min-width: 260px; background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius);
  box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
.main-nav__item:hover > .main-nav__sub,
.main-nav__item:focus-within > .main-nav__sub { opacity: 1; visibility: visible; transform: none; }
.main-nav__sub a { display: block; padding: .5rem .75rem; color: var(--c-ink); text-decoration: none; border-radius: 6px; font-size: .92rem; }
.main-nav__sub a:hover, .main-nav__sub .is-active > a { background: var(--c-soft); color: var(--c-brand); }
.submenu-toggle, .nav-toggle { display: none; }

@media (max-width: 960px) {
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
    border: 1px solid var(--c-line); border-radius: 8px; background: #fff; cursor: pointer;
  }
  .nav-toggle__bar, .nav-toggle__bar::before, .nav-toggle__bar::after {
    display: block; width: 20px; height: 2px; background: var(--c-ink); position: relative; transition: transform .2s;
  }
  .nav-toggle__bar::before, .nav-toggle__bar::after { content: ""; position: absolute; left: 0; }
  .nav-toggle__bar::before { top: -6px; }
  .nav-toggle__bar::after { top: 6px; }
  .nav-open .nav-toggle__bar { background: transparent; }
  .nav-open .nav-toggle__bar::before { top: 0; transform: rotate(45deg); }
  .nav-open .nav-toggle__bar::after { top: 0; transform: rotate(-45deg); }
  .nav-open { overflow: hidden; }

  .main-nav {
    position: fixed; inset: var(--header-h, 110px) 0 0 0; background: #fff; overflow-y: auto;
    transform: translateX(100%); visibility: hidden; transition: transform .25s, visibility .25s;
    padding: 1rem var(--gutter) 3rem; z-index: 60;
  }
  .nav-open .main-nav { transform: none; visibility: visible; }
  .main-nav__list { flex-direction: column; }
  .main-nav__item { border-bottom: 1px solid var(--c-line); display: flex; flex-wrap: wrap; }
  .main-nav__item > a { flex: 1; padding: 1rem .25rem; font-size: 1.05rem; }
  .submenu-toggle {
    display: block; width: 48px; border: 0; background: none; cursor: pointer; position: relative;
  }
  .submenu-toggle::after {
    content: ""; position: absolute; top: 50%; left: 50%; width: 9px; height: 9px;
    border-right: 2px solid var(--c-ink); border-bottom: 2px solid var(--c-ink);
    transform: translate(-50%, -70%) rotate(45deg); transition: transform .2s;
  }
  .submenu-toggle[aria-expanded="true"]::after { transform: translate(-50%, -30%) rotate(-135deg); }
  .main-nav__sub {
    position: static; flex-basis: 100%; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; padding: 0 0 .75rem .5rem; display: none; min-width: 0;
  }
  .main-nav__item:hover > .main-nav__sub { display: none; }
  .main-nav__item.sub-open > .main-nav__sub { display: block; }
}

/* Breadcrumb */
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; padding: 1rem 0 0; font-size: .85rem; color: var(--c-muted); }
.breadcrumb li + li::before { content: "›"; margin-right: .35rem; }
.breadcrumb a { color: var(--c-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--c-brand); }

/* Layout */
.site-main { min-height: 50vh; }
.page-content { padding-block: 1.5rem 4rem; min-width: 0; }
.layout-sidebar { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 3rem; }
.sidebar { padding-block: 1.5rem; }
.side-nav ul { list-style: none; margin: 0; padding: 0; }
.side-nav > ul { border-left: 3px solid var(--c-line); }
.side-nav a { display: block; padding: .45rem 1rem; color: var(--c-ink); text-decoration: none; font-size: .95rem; margin-left: -3px; border-left: 3px solid transparent; }
.side-nav a:hover { color: var(--c-brand); }
.side-nav .is-active > a { color: var(--c-brand); border-left-color: var(--c-brand); font-weight: 600; }
.side-nav ul ul a { padding-left: 2rem; font-size: .9rem; }
@media (max-width: 860px) {
  .layout-sidebar { grid-template-columns: 1fr; gap: 0; }
  .sidebar { order: 2; border-top: 1px solid var(--c-line); }
}

/* Home */
.hero { position: relative; }
.hero__fallback {
  min-height: clamp(320px, 55vh, 560px); display: flex; align-items: center; color: #fff;
  background: linear-gradient(105deg, rgba(20, 24, 28, .78), rgba(20, 24, 28, .2)), url("../Images/hero.jpg") center / cover no-repeat, #2a3036;
}
.hero__kicker { text-transform: uppercase; letter-spacing: .15em; font-size: .85rem; margin: 0; opacity: .85; }
.hero__title { color: #fff; font-size: clamp(2.2rem, 6vw, 4rem); margin: .2em 0; }
.hero__lead { max-width: 560px; font-size: 1.15rem; }
.hero .frame { margin: 0; }
.hero .ce-gallery, .hero .ce-outer, .hero .ce-inner, .hero .ce-column, .hero figure { margin: 0 !important; padding: 0; float: none !important; width: 100% !important; right: auto !important; }
.hero .ce-gallery { overflow: hidden; position: relative; }
.hero img { width: 100%; height: clamp(220px, 32vw, 520px); object-fit: cover; display: block; border-radius: 0 !important; }
.hero figcaption { display: none; }
.hero-slider .ce-row { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease; }
.hero-slider .ce-row.is-active { position: relative; opacity: 1; }
@media (prefers-reduced-motion: reduce) { .hero-slider .ce-row { transition: none; } }
.home-boxes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: -3rem; position: relative; z-index: 2; }
.home-box { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.75rem; border-top: 4px solid var(--c-brand); }
.home-box:empty { display: none; }
.home-box h2, .home-box h3 { margin-top: 0; font-size: 1.2rem; }
@media (max-width: 860px) {
  .home-boxes { grid-template-columns: 1fr; margin-top: 1.5rem; }
}

/* Content elements (fluid_styled_content) */
.frame { margin-bottom: 2rem; }
.ce-gallery img { border-radius: 6px; }
.ce-uploads { list-style: none; padding: 0; }
.ce-uploads li { display: flex; gap: .75rem; align-items: center; padding: .6rem 0; border-bottom: 1px solid var(--c-line); }
.ce-uploads-fileName { font-weight: 600; }
@media (max-width: 640px) {
  .ce-intext.ce-right .ce-gallery, .ce-intext.ce-left .ce-gallery { float: none; margin: 0 0 1rem; }
  .ce-column { float: none; width: 100% !important; }
}

/* Buttons & forms */
.btn, button[type="submit"], input[type="submit"] {
  display: inline-block; background: var(--c-brand); color: #fff; border: 0; border-radius: 6px;
  padding: .7rem 1.4rem; font-weight: 600; text-decoration: none; cursor: pointer; font: inherit;
}
.btn:hover, button[type="submit"]:hover, input[type="submit"]:hover { background: var(--c-brand-dark); color: #fff; }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="password"], select, textarea {
  width: 100%; padding: .65rem .8rem; border: 1px solid #c9ced4; border-radius: 6px; font: inherit; background: #fff;
}
label { font-weight: 600; display: block; margin-bottom: .25rem; }

/* Cart / Prodotti */
.product-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1.25rem; margin: 1rem 0 2rem; }
.product {
  border: 1px solid var(--c-line); border-radius: var(--radius); padding: 1rem; background: #fff;
  display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s;
}
.product:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.product__link { color: var(--c-ink); text-decoration: none; display: block; }
.product__link:hover .product__title { color: var(--c-brand); }
.product__media { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; background: var(--c-soft); border-radius: 6px; overflow: hidden; }
.product__media img { width: 100%; height: 100%; object-fit: contain; }
.product__noimg { width: 40%; aspect-ratio: 1; border-radius: 50%; background: var(--c-line); }
.product__title { font-size: 1rem; margin: .8rem 0 .2rem; }
.product__sku { font-size: .8rem; color: var(--c-muted); margin: 0; }
.product__price { margin-top: auto; padding-top: .6rem; font-weight: 700; color: var(--c-ink); }
.product__onrequest { font-weight: 600; color: var(--c-muted); font-size: .9rem; }
.product-detail__buy { margin: 1.5rem 0; padding: 1.25rem; background: var(--c-soft); border-radius: var(--radius); }
.product-detail__buy .price { font-size: 1.5rem; font-weight: 700; }
.product-detail__buy form { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; margin-top: .75rem; }
.product-detail__buy input[type="number"] { width: 6rem; }
.topbar__cart { font-weight: 700; color: #fff !important; }
.topbar__cart::before { content: ""; display: inline-block; width: .55em; height: .55em; border-radius: 50%; background: var(--c-brand); margin-right: .4em; }
.frame-type-cart_cart .form-group, .frame-type-cart_cart .row > div { margin-bottom: .75rem; }
.frame-type-cart_cart table { display: table; }
.product-detail { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 2.5rem; align-items: start; }
.product-detail__media img { width: 100%; height: auto; border-radius: var(--radius); background: var(--c-soft); }
.product-detail__files { list-style: none; padding: 0; }
.product-detail__files li { border-bottom: 1px solid var(--c-line); }
.product-detail__files a { display: flex; gap: .6rem; align-items: center; padding: .6rem 0; text-decoration: none; }
.product-detail__files a::before { content: "PDF"; font-size: .7rem; font-weight: 700; color: #fff; background: var(--c-brand); border-radius: 4px; padding: .15rem .35rem; }
@media (max-width: 760px) { .product-detail { grid-template-columns: 1fr; } }
.f3-widget-paginator { list-style: none; display: flex; gap: .4rem; padding: 0; }
.f3-widget-paginator a, .f3-widget-paginator .current { display: block; padding: .3rem .7rem; border: 1px solid var(--c-line); border-radius: 6px; }

/* Form */
.frame-type-form_formframework form { max-width: 640px; }
.frame-type-form_formframework .form-group { margin-bottom: 1rem; }
.frame-type-form_formframework .required { color: var(--c-brand); }
.frame-type-form_formframework .error .form-control { border-color: var(--c-brand); }
.frame-type-form_formframework .help-block, .frame-type-form_formframework .error { color: var(--c-brand); font-size: .85rem; }

/* Footer */
.site-footer { background: #181b1f; color: #b9c0c7; font-size: .95rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: #ff8091; }
.site-footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; padding-block: 3rem; }
.site-footer__title { color: #fff; font-size: 1rem; margin: 0 0 .75rem; text-transform: uppercase; letter-spacing: .06em; }
.site-footer address { font-style: normal; }
.site-footer__bottom { border-top: 1px solid #2c3238; font-size: .85rem; }
.site-footer__bottom-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-block: 1rem; }
.footer-nav { list-style: none; display: flex; flex-wrap: wrap; gap: 1rem; margin: 0; padding: 0; }
@media (max-width: 760px) {
  .site-footer__grid { grid-template-columns: 1fr; }
}

/* Contatto */
.frame-contact-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); border-top: 4px solid var(--c-brand); padding: clamp(1.25rem, 3vw, 2rem); margin-bottom: 2rem; }
.frame-contact-card p:last-child { margin-bottom: 0; }
.frame-contact-card .btn { margin-top: .5rem; }
.map-consent { position: relative; width: 100%; aspect-ratio: 16 / 7; min-height: 320px; border-radius: var(--radius); overflow: hidden; background: var(--c-soft); border: 1px solid var(--c-line); display: flex; align-items: center; justify-content: center; text-align: center; }
.map-consent__box { max-width: 34rem; padding: 1.5rem; color: var(--c-muted); }
.map-consent__box a { margin-left: .75rem; }
.map-consent.is-loaded { border: 0; }
.map-consent iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 600px) { .map-consent { aspect-ratio: 4 / 5; } .map-consent__box a { display: inline-block; margin: .75rem 0 0; } }

/* Tabelle (cookie policy) */
.contenttable { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; font-size: .92rem; }
.contenttable th, .contenttable td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--c-line); vertical-align: top; }
.contenttable th { background: var(--c-soft); }
@media (max-width: 600px) { .contenttable, .contenttable tbody, .contenttable tr, .contenttable td { display: block; } .contenttable thead { display: none; } .contenttable tr { border-bottom: 1px solid var(--c-line); padding: .5rem 0; } .contenttable td { border: 0; padding: .15rem 0; } .contenttable td:first-child { font-weight: 700; } }

/* Banner cookie */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000; background: var(--c-ink); color: #fff; box-shadow: 0 -6px 24px rgba(0,0,0,.2); }
.cookie-banner[hidden] { display: none; }
.cookie-banner__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; padding-block: 1rem; }
.cookie-banner__text { margin: 0; flex: 1 1 32rem; font-size: .92rem; line-height: 1.5; }
.cookie-banner__text a { color: #fff; text-decoration: underline; }
.cookie-banner__actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.btn--ghost { background: transparent; border: 1px solid rgba(255,255,255,.6); color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,.12); }
@media (max-width: 600px) { .cookie-banner__actions, .cookie-banner__actions .btn { flex: 1 1 auto; text-align: center; } }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
.footer-nav--legal { margin-left: auto; }
