/* Pinocchio storefront enhancements. Every rule is opt-in and frontend scoped. */
body.pt-storefront-enabled {
  --pt-red: #990000;
  --pt-red-hover: #750000;
  --pt-ink: #242424;
  --pt-muted: #646464;
  --pt-line: #e8e3df;
  --pt-surface: #fff;
}
body.pt-storefront-enabled .pt-button,
body.pt-storefront-enabled .pt-filter-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 20px;
  border: 1px solid var(--pt-red);
  border-radius: 6px;
  background: var(--pt-red);
  color: #fff;
  font: inherit;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease;
}
body.pt-storefront-enabled .pt-button:hover { background: var(--pt-red-hover); border-color: var(--pt-red-hover); color: #fff; }
body.pt-storefront-enabled .pt-button--secondary,
body.pt-storefront-enabled .pt-filter-toggle { background: #fff; color: var(--pt-red); }
body.pt-storefront-enabled .pt-button--secondary:hover,
body.pt-storefront-enabled .pt-filter-toggle:hover { background: #fff5f3; color: var(--pt-red); }
body.pt-storefront-enabled :is(.pt-cart, .pt-search, .pt-buybar, .pt-filter-dialog) *,
body.pt-storefront-enabled :is(.pt-cart, .pt-search, .pt-buybar, .pt-filter-dialog) { box-sizing: border-box; }
body.pt-storefront-enabled :is(.pt-button, .pt-filter-toggle, .pt-cart a, .pt-cart button, .pt-cart input, .pt-search input, .pt-search button, .pt-filter-dialog button, .pt-filter-dialog input):focus-visible {
  outline: 3px solid #1565a8;
  outline-offset: 3px;
}
body.pt-storefront-enabled :is(.pt-cart, .pt-search)[hidden] { display: none !important; }
body.pt-storefront-enabled :is(.pt-cart, .pt-search) [hidden],
body.pt-storefront-enabled .pt-buybar[hidden] { display: none !important; }
body.pt-storefront-enabled .pt-cart__status { margin: 0; padding: 12px 20px; font-size: 14px; }
body.pt-storefront-enabled .pt-cart__retry { margin: 0 20px 12px; }
body.pt-storefront-enabled .pt-cart__link { display: block; text-align: center; min-height: 44px; padding: 12px; color: var(--pt-red); text-decoration: underline; }
body.pt-storefront-enabled .pt-cart__coupon-disclosure summary { min-height: 44px; padding: 12px 0; cursor: pointer; }
body.pt-storefront-enabled .pt-cart__coupon { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
body.pt-storefront-enabled .pt-cart__coupon label { width: 100%; }
body.pt-storefront-enabled .pt-cart__coupon input { min-width: 0; flex: 1 1 160px; min-height: 44px; border: 1px solid #8a8581; border-radius: 4px; padding: 10px; font-size: 16px; }
body.pt-storefront-enabled :is(.pt-cart, .pt-search) { position: fixed; inset: 0; z-index: 100050; color: var(--pt-ink); }
body.pt-storefront-enabled :is(.pt-cart__overlay, .pt-search__overlay) { position: absolute; inset: 0; background: rgb(0 0 0 / 45%); }
body.pt-storefront-enabled :is(.pt-cart__panel, .pt-search__panel) {
  position: absolute;
  inset: 0 0 0 auto;
  display: flex;
  flex-direction: column;
  width: min(440px, 100vw);
  height: 100%;
  max-height: 100dvh;
  min-height: 0;
  background: var(--pt-surface);
  box-shadow: -8px 0 40px rgb(0 0 0 / 16%);
}
body.pt-storefront-enabled .pt-cart__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--pt-line); }
body.pt-storefront-enabled .pt-cart__title { margin: 0; font-size: 22px; line-height: 1.3; font-weight: 700; text-transform: none; }
body.pt-storefront-enabled :is(.pt-cart__close, .pt-search__close) { flex: 0 0 44px; min-width: 44px; min-height: 44px; border: 0; border-radius: 4px; background: transparent; color: var(--pt-ink); font-size: 24px; cursor: pointer; }
body.pt-storefront-enabled .pt-cart__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 20px 16px; }
body.pt-storefront-enabled .pt-cart__items { margin: 0; padding: 0; list-style: none; }
body.pt-storefront-enabled .pt-cart__item { display: flex; gap: 14px; padding: 20px 0; border-bottom: 1px solid var(--pt-line); }
body.pt-storefront-enabled .pt-cart__image { flex: 0 0 76px; width: 76px; height: 90px; object-fit: contain; }
body.pt-storefront-enabled .pt-cart__image img { width: 100%; height: 100%; object-fit: contain; }
body.pt-storefront-enabled .pt-cart__info { flex: 1; min-width: 0; }
body.pt-storefront-enabled .pt-cart__name { display: block; color: var(--pt-ink); font-size: 16px; line-height: 1.4; font-weight: 600; overflow-wrap: anywhere; text-transform: none; }
body.pt-storefront-enabled .pt-cart__meta { margin: 5px 0; color: var(--pt-muted); font-size: 13px; line-height: 1.5; }
body.pt-storefront-enabled .pt-cart__price { margin: 8px 0; font-weight: 700; }
body.pt-storefront-enabled .pt-cart__quantity { display: inline-flex; align-items: center; gap: 4px; }
body.pt-storefront-enabled .pt-cart__quantity :is(button, input) { min-height: 44px; min-width: 44px; border: 1px solid var(--pt-line); background: #fff; color: var(--pt-ink); text-align: center; border-radius: 4px; }
body.pt-storefront-enabled .pt-cart__quantity input { width: 56px; padding: 6px; }
body.pt-storefront-enabled .pt-cart__remove { min-height: 44px; padding: 8px; border: 0; background: transparent; color: var(--pt-muted); text-decoration: underline; cursor: pointer; }
body.pt-storefront-enabled .pt-cart__status { color: var(--pt-muted); font-size: 14px; line-height: 1.5; }
body.pt-storefront-enabled .pt-cart__error { margin: 12px 0; padding: 12px; border: 1px solid #d9a09b; border-radius: 4px; background: #fff5f3; color: #790000; }
body.pt-storefront-enabled .pt-cart__retry { min-height: 44px; padding: 8px 14px; border: 1px solid var(--pt-red); border-radius: 4px; background: #fff; color: var(--pt-red); cursor: pointer; }
body.pt-storefront-enabled .pt-cart__foot { flex: 0 0 auto; padding: 16px 20px max(20px, env(safe-area-inset-bottom)); border-top: 1px solid var(--pt-line); background: #fff; }
body.pt-storefront-enabled .pt-cart__subtotal { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 8px; font-size: 18px; font-weight: 700; }
body.pt-storefront-enabled :is(.pt-cart__shipping, .pt-cart__coupon) { margin: 8px 0; color: var(--pt-muted); font-size: 13px; line-height: 1.5; }
body.pt-storefront-enabled :is(.pt-cart__continue, .pt-cart__checkout) { display: flex; width: 100%; min-height: 48px; align-items: center; justify-content: center; margin-top: 10px; }
body.pt-storefront-enabled .pt-cart__empty { padding: 32px 0; text-align: center; line-height: 1.6; }
body.pt-storefront-enabled .pt-cart__gift-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--pt-red); text-decoration: underline; }
body.pt-storefront-enabled :is(.pt-cart, .pt-search) [disabled],
body.pt-storefront-enabled .pt-cart[aria-busy="true"] :is(.pt-cart__quantity, .pt-cart__remove, .pt-cart__checkout) { opacity: .55; cursor: progress; }
body.pt-storefront-enabled .pt-search__panel { padding: 20px; }
body.pt-storefront-enabled .pt-search__close { align-self: flex-end; }
body.pt-storefront-enabled .pt-search__form { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
body.pt-storefront-enabled .pt-search__input { flex: 1 1 220px; min-width: 0; width: 100%; min-height: 48px; padding: 12px; border: 1px solid #8a8581; border-radius: 4px; background: #fff; color: var(--pt-ink); font-size: 16px; }
body.pt-storefront-enabled .pt-search__submit { min-height: 48px; }
body.pt-storefront-enabled .pt-filters .pt-search__panel { overflow-y: auto; }
body.pt-storefront-enabled .pt-filters .wpc-filters-widget-content { display: block !important; }
body.pt-storefront-enabled .pt-filters .wpc-filters-open-button-container { display: none !important; }
body.pt-storefront-enabled .pt-filter-dialog { width: min(440px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 20px; border: 1px solid var(--pt-line); border-radius: 8px; background: #fff; color: var(--pt-ink); overflow-y: auto; }
body.pt-storefront-enabled .pt-filter-dialog[open] { display: block; }
body.pt-storefront-enabled .pt-filter-dialog::backdrop { background: rgb(0 0 0 / 45%); }
body.pt-storefront-enabled .pt-buybar { display: none; }
body.pt-storefront-enabled .wc-block-cart__submit-button { background: var(--pt-red); color: #fff; min-height: 48px; }
body.pt-storefront-enabled .wc-block-cart__submit-button:hover { background: var(--pt-red-hover); color: #fff; }
body.pt-storefront-enabled.archive li.product.outofstock::after { z-index: 2; }
body.pt-storefront-enabled :is(.archive, .home) ul.products li.product .woocommerce-loop-product__title,
body.pt-storefront-enabled:is(.archive, .home) ul.products li.product :is(.woocommerce-loop-product__title, .product-title) { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; font-size: 16px; line-height: 1.4; text-transform: none; }
body.pt-storefront-enabled:is(.pt-cart-open, .pt-search-open) .floating-whatsapp-button { visibility: hidden; pointer-events: none; }
@media (max-width: 767px) {
  body.pt-storefront-enabled.pt-native-buy-visible .floating-whatsapp-button { visibility: hidden; pointer-events: none; }
  body.pt-storefront-enabled .pt-filter-toggle { display: inline-flex; }
  body.pt-storefront-enabled .pt-product-grid .rt-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; font-size: 15px; line-height: 1.4; text-transform: none; min-height: 0; }
  body.pt-storefront-enabled .pt-product-grid .rt-shop-meta { position: static; display: flex; opacity: 1; visibility: visible; transform: none; margin: 8px 0; }
  body.pt-storefront-enabled .pt-product-grid .rt-shop-meta .action-cart { display: inline-flex; width: 100%; min-height: 44px; align-items: center; justify-content: center; gap: 6px; border-radius: 6px; }
  body.pt-storefront-enabled .pt-product-grid .rt-shop-meta .action-cart span { width: auto; opacity: 1; visibility: visible; font-size: 13px; }
  body.pt-storefront-enabled :is(.pt-cart__panel, .pt-search__panel) { width: 100vw; }
  body.pt-storefront-enabled.single-product.pt-buybar-visible { padding-bottom: calc(82px + env(safe-area-inset-bottom)); }
  body.pt-storefront-enabled.pt-buybar-visible .pt-buybar { position: fixed; inset: auto 0 0; z-index: 9990; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px max(12px, env(safe-area-inset-bottom)); border-top: 1px solid var(--pt-line); background: #fff; box-shadow: 0 -3px 16px rgb(0 0 0 / 7%); }
  body.pt-storefront-enabled .pt-buybar__price { font-size: 18px; font-weight: 700; line-height: 1.3; }
  body.pt-storefront-enabled .pt-buybar .pt-button { flex: 1; max-width: 240px; }
  body.pt-storefront-enabled.single-product.pt-buybar-visible .floating-whatsapp-button { bottom: calc(90px + env(safe-area-inset-bottom)); }
  body.pt-storefront-enabled .mean-bar-search { gap: 4px; padding-left: 12px; padding-right: 12px; }
  body.pt-storefront-enabled .mean-bar-search .item-icon a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; }
  body.pt-storefront-enabled .mean-bar-search :is(.logo img, .mobile-logo img) { max-width: 80px; height: auto; }
  body.pt-storefront-enabled .cont-slide-homepage .riga-slide-home { height: auto; min-height: 0; }
  body.pt-storefront-enabled .cont-slide-homepage .col-txt-slide-home { padding: 16px; height: auto; }
  body.pt-storefront-enabled .cont-slide-homepage .titolo-slide-home { font-size: 22px; line-height: 1.2; overflow-wrap: anywhere; }
  body.pt-storefront-enabled .cont-slide-homepage .size-txt-slide-home { font-size: 14px; line-height: 1.5; }
  body.pt-storefront-enabled .cont-slide-homepage .mobile-image-slide-home img,
  body.pt-storefront-enabled .cont-slide-homepage img.mobile-image-slide-home { width: 100%; max-height: 200px; object-fit: cover; }
  body.pt-storefront-enabled .cont-slide-homepage .cta-slide-home { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; }
  body.pt-storefront-enabled .cont-slide-homepage .owl-nav button { min-width: 44px; min-height: 44px; }
}
@media (min-width: 360px) and (max-width: 767px) {
  body.pt-storefront-enabled ul.products.pt-product-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  body.pt-storefront-enabled ul.products.pt-product-grid::before,
  body.pt-storefront-enabled ul.products.pt-product-grid::after { display: none; }
  body.pt-storefront-enabled ul.products.pt-product-grid > li.product { float: none; width: auto; max-width: 100%; margin: 0; padding: 0; }
}
@media (min-width: 768px) { body.pt-storefront-enabled .pt-filter-toggle { display: none; } }
@media (prefers-reduced-motion: reduce) {
  body.pt-storefront-enabled :is(.pt-button, .pt-cart, .pt-search, .pt-buybar) { transition: none; animation: none; scroll-behavior: auto; }
}
