/*
 * YOKO Kids v3.4.1
 * Runtime fixes: product header/breadcrumb, reliable page scrolling, contact
 * media fields and the real YOKO/P&L/DOREME Size system.
 */

/* ---------- Recover stale Rey/preloader scroll locks ---------- */
html.yoko-scroll-ready,
html.yoko-scroll-ready body.yoko-native-template,
html.yoko-scroll-ready body.yoko-pdp-php-template,
html.yoko-scroll-ready body.yoko-product-archive-page {
  min-height: 100%;
  max-height: none !important;
  overflow-x: clip;
  overflow-y: auto !important;
  overscroll-behavior-y: auto;
}

/* ---------- Single product: header, breadcrumb and first viewport ---------- */
body.yoko-pdp-php-template .yoko-pdp__container {
  padding-top: calc(clamp(28px, 2.4vw, 44px) + var(--yoko-live-header-offset, 0px)) !important;
}
body.yoko-pdp-php-template .yoko-pdp__breadcrumb {
  position: relative;
  z-index: 2;
  display: block !important;
  margin: 0 0 22px !important;
  min-height: 20px;
  color: var(--yoko-muted);
}
body.yoko-pdp-php-template .yoko-pdp__breadcrumb .woocommerce-breadcrumb {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 0;
  line-height: 1.5;
}
body.yoko-pdp-php-template .yoko-pdp__hero {
  align-items: start;
}
body.yoko-pdp-php-template .yoko-summary {
  top: 104px;
}
body.admin-bar.yoko-pdp-php-template .yoko-summary {
  top: 136px;
}
body.yoko-pdp-php-template .yoko-summary__stock-row {
  gap: 12px;
}
body.yoko-pdp-php-template .yoko-button--buy-now.is-loading {
  cursor: wait;
  opacity: .72;
}
body.yoko-pdp-php-template .yoko-button--buy-now.is-loading::after {
  content: "";
  width: 18px;
  height: 18px;
  margin-left: 10px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: yoko-v341-spin .7s linear infinite;
}
@keyframes yoko-v341-spin { to { transform: rotate(360deg); } }

/* Product Size data only displays the source-supported Size/weight columns. */
body.yoko-pdp-php-template .yoko-data-card--sizes table {
  min-width: 0;
  table-layout: fixed;
}
body.yoko-pdp-php-template .yoko-data-card--sizes th,
body.yoko-pdp-php-template .yoko-data-card--sizes td {
  width: 50%;
}

/* ---------- Contact page selected media ---------- */
body.yoko-contact-page .yoko-contact-hero__visual picture,
body.yoko-contact-page .yoko-contact-hero__visual picture img {
  display: block;
  width: 100%;
  height: 100%;
}
body.yoko-contact-page .yoko-contact-hero__visual picture img {
  max-height: 620px;
  object-fit: cover;
  object-position: center;
  border-radius: 24px;
}
body.yoko-contact-page .yoko-contact-map.has-image {
  padding: 0;
  overflow: hidden;
  background: #fff;
}
body.yoko-contact-page .yoko-contact-map.has-image img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 340px;
  object-fit: cover;
}
body.yoko-contact-page .yoko-contact-location-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
}
body.yoko-contact-page .yoko-contact-location-list__image {
  width: 118px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 12px;
}
body.yoko-contact-page .yoko-contact-location-list__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
body.yoko-contact-page .yoko-content-cta.has-image {
  grid-template-columns: auto minmax(0, 1fr) auto;
}
body.yoko-contact-page .yoko-content-cta__image {
  width: 150px;
}
body.yoko-contact-page .yoko-content-cta__image img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* ---------- Real Size tables ---------- */
body.yoko-size-guide-page .yoko-size-main {
  grid-template-columns: minmax(0, 2.15fr) minmax(310px, .7fr);
  align-items: start;
}
body.yoko-size-guide-page .yoko-size-table-set {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
body.yoko-size-guide-page .yoko-size-table-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--yoko-border);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--yoko-shadow-sm);
}
body.yoko-size-guide-page .yoko-size-table-card > header {
  min-height: 112px;
  padding: 20px 20px 16px;
  background: linear-gradient(145deg, #fbf7fd, #f5ecfb);
}
body.yoko-size-guide-page .yoko-size-table-card > header h3 {
  margin: 0;
  color: var(--yoko-primary);
  font-size: 19px;
  line-height: 1.25;
}
body.yoko-size-guide-page .yoko-size-table-card > header p {
  margin: 7px 0 0;
  color: var(--yoko-muted);
  font-size: 13px;
  line-height: 1.5;
}
body.yoko-size-guide-page .yoko-size-table-card .yoko-size-table-wrap {
  margin: 0;
  overflow: visible;
  border: 0;
  border-top: 1px solid var(--yoko-border);
  border-radius: 0;
  box-shadow: none;
}
body.yoko-size-guide-page .yoko-size-table--weight {
  width: 100%;
  min-width: 0 !important;
  table-layout: fixed;
}
body.yoko-size-guide-page .yoko-size-table--weight th,
body.yoko-size-guide-page .yoko-size-table--weight td {
  width: 50%;
  padding: 13px 10px;
  font-size: 14px;
}
body.yoko-size-guide-page .yoko-size-table--weight tbody th {
  font-size: 18px;
}
body.yoko-size-guide-page .yoko-size-table-note {
  margin-top: 18px;
}

@media (max-width: 1199px) {
  body.yoko-size-guide-page .yoko-size-main {
    grid-template-columns: 1fr;
  }
  body.yoko-size-guide-page .yoko-size-table-set {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  body.yoko-pdp-php-template .yoko-pdp__container {
    padding-top: calc(16px + var(--yoko-live-header-offset, 0px)) !important;
  }
  body.yoko-pdp-php-template .yoko-pdp__breadcrumb {
    display: block !important;
    margin: 0 0 14px !important;
    padding-bottom: 3px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scrollbar-width: none;
    font-size: 12px;
  }
  body.yoko-pdp-php-template .yoko-pdp__breadcrumb::-webkit-scrollbar { display: none; }
  body.yoko-pdp-php-template .yoko-pdp__breadcrumb .woocommerce-breadcrumb {
    width: max-content;
    min-width: 100%;
    flex-wrap: nowrap;
  }
  body.yoko-pdp-php-template .yoko-summary { top: auto; }

  body.yoko-contact-page .yoko-contact-hero__visual picture img {
    max-height: 460px;
    border-radius: 18px;
  }
  body.yoko-contact-page .yoko-contact-location-list article {
    grid-template-columns: minmax(0, 1fr) 88px;
    gap: 12px;
  }
  body.yoko-contact-page .yoko-contact-location-list__image { width: 88px; }
  body.yoko-contact-page .yoko-content-cta.has-image {
    grid-template-columns: 1fr;
  }
  body.yoko-contact-page .yoko-content-cta__image {
    width: 120px;
    margin-inline: auto;
  }

  body.yoko-size-guide-page .yoko-size-table-set {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  body.yoko-size-guide-page .yoko-size-table-card > header {
    min-height: 0;
    padding: 18px 16px 14px;
  }
  body.yoko-size-guide-page .yoko-size-table--weight th,
  body.yoko-size-guide-page .yoko-size-table--weight td {
    padding: 12px 8px;
  }
}
body.yoko-pdp-php-template .yoko-summary__stock-row > span:not(.yoko-summary__stock) { display: none !important; }
