/*
Theme Name: Salient Child Theme
Description: This is a custom child theme for Salient
Theme URI:   https://themeforest.net/item/salient-responsive-multipurpose-theme/4363266
Author: ThemeNectar
Author URI:  https://themeforest.net/user/themenectar
Template: salient
Version: 1.0
*/

/* Original Figma section dividers; scale the artwork and its shadow together. */
.sgvs-brown.wpb_row {
  --lupovet-divider-image: url('assets/images/section-dividers/brown-home.svg');
  --lupovet-divider-width: min(58.3344vw, 1120.02px);
  --lupovet-divider-ratio: 1120.02 / 222.438;
  --lupovet-divider-top: min(1.6146vw, 31px);
  --lupovet-divider-edge: min(2.3958vw, 46px);
}

.sgvs-brown.lupovet-divider-ibd.wpb_row {
  --lupovet-divider-image: url('assets/images/section-dividers/brown-ibd.svg');
  --lupovet-divider-width: min(58.3859vw, 1121.01px);
  --lupovet-divider-ratio: 1121.01 / 221.22;
  --lupovet-divider-top: min(1.5885vw, 30.5px);
  --lupovet-divider-edge: min(2.0838vw, 40.008px);
}

.sgvs-brown.lupovet-divider-stress.wpb_row {
  --lupovet-divider-edge: min(2.2921vw, 44.008px);
}

.sgvs-brown.wpb_row > .row-bg-wrap .row-bg::before {
  content: '';
  position: absolute;
  top: calc(-1 * var(--lupovet-divider-top));
  right: calc(-1 * var(--lupovet-divider-edge));
  width: var(--lupovet-divider-width);
  height: auto;
  aspect-ratio: var(--lupovet-divider-ratio);
  background-image: var(--lupovet-divider-image);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  pointer-events: none;
}

.sgvs-brown.reverse.wpb_row > .row-bg-wrap .row-bg::before {
  right: auto;
  left: calc(-1 * min(2.1355vw, 41.002px) - 1px);
  transform: scaleX(-1);
}

.sf-menu > li ul {
    width: 25em;
}

/* Contenitore: eredita il font già configurato nel sito */
.lv-prurito {
  --lv-ocra: #b67532;
  --lv-oliva: #799800;
  --lv-bordo: #e8e5df;
  --lv-fondo: #f7f6f2;

  width: 100%;
  margin: 32px 0;
  font-family: inherit;
  color: inherit;
}

.lv-prurito .lv-prurito__title {
  margin: 0 0 12px;
  color: var(--lv-ocra);
  font-family: inherit;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.25;
}

.lv-prurito .lv-prurito__intro {
  margin: 0 0 18px;
  padding: 0;
  line-height: 1.65;
}

.lv-prurito .lv-prurito__soglia {
  margin: 0 0 24px;
  padding: 10px 16px;
  border-left: 3px solid var(--lv-oliva);
  background: var(--lv-fondo);
  line-height: 1.5;
}

/* Lo scorrimento resta confinato alla tabella sui piccoli schermi */
.lv-prurito .lv-prurito__scroll {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--lv-bordo);
  border-radius: 6px;
}

.lv-prurito .lv-prurito__scroll:focus-visible {
  outline: 2px solid var(--lv-oliva);
  outline-offset: 4px;
}

body .lv-prurito table {
  width: 100%;
  min-width: 560px;
  margin: 0;
  border: 0;
  border-collapse: collapse;
  border-spacing: 0;
  background: #fff;
  font-family: inherit;
  font-size: inherit;
}

body .lv-prurito table th,
body .lv-prurito table td {
  padding: 18px 22px;
  border: 0;
  border-bottom: 1px solid var(--lv-bordo);
  background: transparent;
  color: inherit;
  font-size: inherit;
  line-height: 1.6;
  text-align: left;
  vertical-align: top;
}

body .lv-prurito table thead th {
  background: var(--lv-fondo);
  font-weight: 700;
}

body .lv-prurito table tbody th {
  font-weight: 600;
}

body .lv-prurito table tr > :first-child {
  width: 16%;
  text-align: center;
}

body .lv-prurito table tr > :nth-child(2) {
  width: 30%;
}

body .lv-prurito table tbody tr:last-child > * {
  border-bottom: 0;
}

/* Verde più scuro per mantenere leggibili le percentuali */
.lv-prurito .lv-prurito__quota {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 4px;
  background: #f0f3e4;
  color: #526600;
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .lv-prurito {
    margin: 24px 0;
  }

  .lv-prurito .lv-prurito__title {
    font-size: 25px;
  }

  body .lv-prurito table th,
  body .lv-prurito table td {
    padding: 14px 16px;
  }
}


.steps-number {
  position: relative;
  overflow: visible;
}

.steps-number .number {
  position: absolute;
  top: -32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;

  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 64px;
  height: 64px;
  margin: 0;
  padding: 0;

  border: 1px solid #ecbb89;
  border-radius: 50%;
  background: #b67532;
  color: #fff;

  font-family: 'Open Sans', sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

.steps-number .number p {
  margin: 0;
  padding: 0;
  font: inherit;
  color: inherit;
}

/* Responsive audit: templates without native per-element wrapping controls. */
body.page-id-3 .main-content a,
body.page-id-933 .main-content a,
body.search .page-title {
  overflow-wrap: anywhere;
}

/* Salient search grids render full-size originals without a thumbnail ratio control. */
body.search-results #search-results:not([data-layout*="list"]) .result .inner-wrap > a > img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  object-position: center;
  background-color: #fff;
}

/* Accordion text has no native wrapping control for long URLs and nonbreaking spaces. */
body.page-id-498 .toggle,
body.page-id-982 .toggle {
  overflow-wrap: anywhere;
}

/* Salient's image transform controls stop at 999px; retain the wide desktop composition. */
@media (min-width: 1000px) and (max-width: 1299px) {
  body:is(.page-id-960, .page-id-951, .page-id-915, .page-id-923, .page-id-502) .img-with-aniamtion-wrap:is(.translate_x_desktop_-100px, .translate_x_desktop_-200px, .translate_x_desktop_100px) {
    transform: none !important;
  }

  body:is(.page-id-960, .page-id-951, .page-id-915, .page-id-923, .page-id-502) .img-with-aniamtion-wrap:is(.translate_x_desktop_-100px, .translate_x_desktop_-200px, .translate_x_desktop_100px) .inner {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* Cart Block's minimum columns overflow narrow phones when totals include savings. */
@media (max-width: 479px) {
  body.woocommerce-cart .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row {
    grid-template-columns: 64px minmax(0, 1fr) auto;
    column-gap: 8px;
  }

  body.woocommerce-cart .wc-block-cart table.wc-block-cart-items .wc-block-cart-item__image {
    padding-right: 8px;
  }

  body.woocommerce-cart .wc-block-cart table.wc-block-cart-items .wc-block-cart-item__product {
    grid-column: 2;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  body.woocommerce-cart .wc-block-cart table.wc-block-cart-items .wc-block-cart-item__total {
    grid-column: 3;
  }
}

/* The symptom introduction leaves the dark hero below the tablet breakpoint. */
@media (max-width: 999px) {
  body.home .lupovet-home-symptom-intro[data-cfc],
  body.home .lupovet-home-symptom-intro h2,
  body.home .lupovet-home-symptom-intro p {
    color: #111 !important;
  }
}

/* Keep Global Section footer links in the surrounding text colour. */
body .footer a,
body .footer a:visited,
body .footer a:hover,
body .footer a:focus,
body .footer a:active {
  color: inherit !important;
}

/* Figma footer: copyright and original payment marks below the existing columns. */
body .footer .lupovet-footer-bottom {
  margin-top: 46px;
  margin-bottom: 0;
  background-image: url('assets/images/footer/footer-divider.svg');
  background-repeat: no-repeat;
  background-position: left top;
  background-size: 100% 1px;
}

body .footer .lupovet-footer-copyright p {
  margin: 0;
  color: inherit;
}

body .footer .lupovet-footer-payments .img-with-aniamtion-wrap {
  flex: 0 0 auto;
  margin: 0;
}

body .footer img.lupovet-footer-payment-logo {
  display: block;
  margin: 0;
  object-fit: cover;
}

body .footer img.lupovet-footer-payment-mastercard { width: 66px; height: 40px; }
body .footer img.lupovet-footer-payment-discover { width: 72px; height: 12px; }
body .footer img.lupovet-footer-payment-visa { width: 70px; height: 22px; }
body .footer img.lupovet-footer-payment-paypal { width: 104px; height: 28px; }
body .footer img.lupovet-footer-payment-american-express { width: 83px; height: 26px; }

/* The payment marks need two rows before Salient's native 999px breakpoint. */
@media (max-width: 1199px) {
  body .footer .lupovet-footer-bottom > .row_col_wrap_12_inner {
    flex-wrap: wrap;
  }

  body .footer .lupovet-footer-bottom > .row_col_wrap_12_inner > .child_column {
    width: 100%;
    margin: 0;
  }

  body .footer .lupovet-footer-copyright-column {
    margin-bottom: 24px !important;
    text-align: center;
  }

  body .footer .lupovet-footer-copyright-column .wpb_wrapper {
    text-align: center;
  }

  body .footer .lupovet-footer-payments > .vc_column-inner > .wpb_wrapper {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* Figma footer: contact details remain editable in the native text element. */
body .footer .lupovet-footer-contacts ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

body .footer .lupovet-footer-contacts li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  column-gap: 17px;
  align-items: start;
  min-height: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
  line-height: 23px;
}

body .footer .lupovet-footer-contacts li > span {
  display: block;
  padding-top: 2px;
  overflow-wrap: anywhere;
}

body .footer .lupovet-footer-contacts .lupovet-footer-contact-icon {
  display: block;
  margin: 0;
}

body .footer .lupovet-footer-contacts .lupovet-footer-contact-email {
  margin-top: 4px;
}

/* Nectar CTA has no responsive padding control; fit the four symptom cards. */
@media (max-width: 1399px) {
  body.home .lupovet-home-symptom-cta .link_wrap {
    padding-left: 1em !important;
    padding-right: 1em !important;
  }
}

/* IBD: elenco dei sintomi nella sezione introduttiva. */
body.page-id-502 #sintomi .lupovet-ibd-symptoms ul {
  display: grid;
  gap: 17px;
  margin: 0;
  padding: 0;
  list-style: none;
}

body.page-id-502 #sintomi .lupovet-ibd-symptoms li {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 60px;
  margin: 0;
  padding: 12px 20px 12px 38px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 30px;
  background: #819b1c;
  list-style: none;
}

body.page-id-502 #sintomi .lupovet-ibd-symptoms li::before {
  position: absolute;
  left: 19px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  content: '';
}

@media (max-width: 999px) {
  body.page-id-502 #sintomi {
    padding-bottom: 120px !important;
  }
}

/* IBD: pannelli dei sintomi sovrapposti alle sezioni successive. */
body.page-id-502 .lupovet-symptom-card > .vc_column-inner {
  position: relative;
  overflow: visible;
}

body.page-id-502 .lupovet-symptom-panel {
  width: 100%;
  color: #000;
}

body.page-id-502 .lupovet-symptom-ready .lupovet-symptom-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  z-index: 10;
  padding: 26px 30px 30px;
  border: 1px solid rgba(121, 152, 0, 0.5);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 40px rgba(121, 152, 0, 0.1);
}

body.page-id-502 .lupovet-symptom-panel[hidden] {
  display: none !important;
}

body.page-id-502 .lupovet-symptom-panel ul {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 20px 0 0 20px;
  list-style: disc;
}

body.page-id-502 .lupovet-symptom-panel li {
  margin: 0;
  padding: 0;
  line-height: 1.35;
}

body.page-id-502 .lupovet-symptom-panel li::marker {
  color: #799800;
}

body.page-id-502 .lupovet-symptom-row-open {
  position: relative;
  z-index: 1000;
}

body.page-id-502 .lupovet-symptom-row-open > .row_col_wrap_12 {
  position: relative;
  z-index: 1;
}

body.page-id-502 .lupovet-symptom-card.is-open {
  position: relative;
  z-index: 10;
}

body.page-id-502 .lupovet-symptom-card .link_text:focus-visible {
  outline: 3px solid #526700;
  outline-offset: 3px;
}
