/*
Theme Name: ZhenYang Glass
Description: Approved editorial site theme for ZhenYang Glass.
Version: 0.2.0
Requires at least: 6.8
Requires PHP: 8.3
Text Domain: zhenyang-glass
*/

.zy-home .zy-home-section.e-con {
  display: block;
  width: 100%;
  max-width: none;
  min-height: auto;
  margin: 0;
  padding: 0;
}
.zy-home .zy-home-section > .elementor-widget {
  /* Elementor's container uses --display for layout. Restore the type token for its content. */
  --display: Manrope, system-ui, sans-serif;
  width: 100%;
  max-width: none;
  margin: 0;
}
.zy-home #contact .quote-form button { font-family: var(--body); }
@media(max-width: 760px) {
  /* Match the approved placement after Elementor's figure reset. */
  .zy-home .elementor-widget .stage figure.product {
    margin-top: calc(-18% - clamp(9px, 2.8vw, 18px));
    margin-bottom: -20%;
  }
}

.zy-page { min-height: 56vh; }
.zy-page .wp-block-heading { margin-block: 1.1em .45em; }
.zy-page .entry-copy { max-width: 67ch; }
.zy-page .entry-copy:has(> .section) { max-width: none; }
.zy-page .entry-copy > p { margin-block: .75em; }
.zy-page .entry-copy > .section > .shell { width: 100%; }

.zy-catalogue, .zy-product, .zy-topic { padding-block: clamp(36px, 6vw, 90px); }
.zy-page .catalogue-heading, .zy-page .detail-request {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 24px clamp(32px, 7vw, 100px);
  align-items: end;
}
.zy-page .label { margin-bottom: 12px; }
.zy-catalogue h1, .zy-product h1, .zy-topic h1 {
  max-width: 19ch;
  font-size: clamp(2.25rem, 5.2vw, 5.2rem);
  line-height: 1.02;
  letter-spacing: -.06em;
}
.catalogue-heading > p, .topic-intro { max-width: 47ch; }
.catalogue-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-block: clamp(26px, 5vw, 65px) 32px;
  padding-block: 10px;
  border-block: 1px solid var(--rule);
}
.catalogue-nav a { padding: 8px 0; font-size: .9rem; font-weight: 650; }
.catalogue-nav a[aria-current] { color: var(--olive-ink); text-decoration-thickness: 2px; }
.catalogue-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 295px), 470px));
  gap: 36px 26px;
  padding: 0;
  list-style: none;
}
.catalogue-card { padding-bottom: 20px; border-bottom: 1px solid var(--rule); }
.catalogue-card-photo { display: block; }
.catalogue-card img { width: 100%; aspect-ratio: 1.35; object-fit: cover; }
.catalogue-card h2 { margin-block: 14px 8px; font-size: clamp(1.5rem, 3vw, 2.4rem); }
.catalogue-card h2 a { text-decoration: none; }
.catalogue-card h2 a:hover { text-decoration: underline; }
.catalogue-card p { margin-bottom: 13px; }
.catalogue-card .actions { flex-wrap: wrap; }
.catalogue-list-single { display: block; }
.catalogue-list-single .catalogue-card:has(.catalogue-card-photo) {
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  gap: clamp(20px, 6vw, 80px);
  align-items: center;
}
.catalogue-list-single h2 { max-width: 15ch; font-size: clamp(2rem, 4vw, 4rem); line-height: 1.04; letter-spacing: -.055em; }
.breadcrumbs { margin-bottom: clamp(24px, 4.6vw, 65px); font-size: .875rem; overflow-wrap: anywhere; }
.catalogue-product { display: grid; gap: clamp(24px, 5vw, 76px); grid-template-columns: .85fr 1.15fr; align-items: start; }
.product-intro { padding-top: clamp(20px, 4vw, 55px); }
.product-intro .entry-copy { margin-block: 22px 25px; }
.product-intro .actions { flex-wrap: wrap; }
.product-main-photo { display: block; background: var(--white); }
.product-main-photo img { width: 100%; aspect-ratio: 1.3; object-fit: contain; }
.product-photos figcaption, .topic-photo figcaption { margin-top: 9px; color: var(--caption); font-size: .85rem; }
.product-thumbnails {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(52px, 1fr));
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.product-thumbnails a { display: block; border: 1px solid var(--rule); padding: 3px; }
.product-thumbnails a[aria-current] { border: 2px solid var(--olive-ink); padding: 2px; }
.product-thumbnails img { aspect-ratio: 1.18; object-fit: cover; width: 100%; }
.detail-section { margin-top: clamp(40px, 7vw, 100px); padding-top: clamp(24px, 4vw, 50px); border-top: 1px solid var(--rule); }
.detail-section h2, .zy-topic .wp-block-heading { font-size: clamp(1.7rem, 3.1vw, 2.9rem); line-height: 1.12; letter-spacing: -.04em; }
.detail-heading { margin-bottom: 23px; }
.detail-section h3 { color: var(--navy); font: 680 1.05rem/1.35 var(--display); }
.spec-groups, .detail-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px clamp(32px, 6vw, 86px); }
.spec-list { padding: 0; margin: 0; }
.spec-list div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 12px; border-top: 1px solid var(--rule); padding-block: 9px; }
.spec-list dt { font-weight: 650; color: var(--navy); }
.spec-list dd { margin: 0; overflow-wrap: anywhere; }
.detail-section > p { margin-block: 20px 12px; }
.product-table-scroll { max-width: 100%; overflow-x: auto; margin-bottom: 25px; }
.product-table { width: 100%; border-collapse: collapse; text-align: left; }
.product-table th, .product-table td { padding: 9px 15px; border-bottom: 1px solid var(--rule); }
.product-table th { color: var(--navy); background: var(--white); }
.detail-links a {
  display: grid;
  gap: 3px;
  padding: 13px 0;
  border-block-end: 1px solid var(--rule);
  text-decoration: none;
}
.detail-links a:hover strong { text-decoration: underline; }
.detail-links span { color: var(--text); font-size: .925rem; }
.detail-request { align-items: center; }
.detail-request .button { justify-self: start; }

.topic-heading { padding-bottom: clamp(24px, 5vw, 56px); border-bottom: 1px solid var(--rule); }
.topic-with-photo { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(22px, 5vw, 74px); align-items: center; }
.topic-intro { margin-top: 20px; }
.topic-photo img { width: 100%; max-height: 525px; object-fit: contain; background: var(--white); }
.zy-topic .entry-copy { padding-top: clamp(18px, 3vw, 42px); }
.zy-topic .entry-copy > ul, .zy-topic .entry-copy > ol { padding-inline-start: 22px; }
.zy-topic .entry-copy li + li { margin-top: 8px; }
.zy-topic .entry-copy .actions { flex-wrap: wrap; margin-top: 23px; }
.zy-topic .entry-copy .video-trigger { margin-block: 18px; border: 1px solid var(--rule); }
.zy-topic .entry-copy .wp-block-heading { margin-block: .95em .5em; }
.zy-topic .entry-copy h3.wp-block-heading { font-size: 1.25rem; color: var(--navy); }

@media(max-width: 760px) {
  .zy-page .catalogue-heading, .catalogue-product, .spec-groups, .detail-links,
  .zy-page .detail-request, .topic-with-photo,
  .catalogue-list-single .catalogue-card:has(.catalogue-card-photo) { grid-template-columns: 1fr; }
  .product-intro { padding-top: 0; }
  .product-thumbnails { grid-template-columns: repeat(auto-fit, minmax(44px, 1fr)); }
  .product-table th, .product-table td { padding-inline: 8px; }
  .catalogue-nav { margin-bottom: 20px; }
}

.zy-contact-links {
  display: grid;
  justify-items: start;
}
.zy-contact-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  max-width: 100%;
  gap: .375rem;
  overflow-wrap: anywhere;
  font-weight: 650;
  text-underline-offset: .2em;
}
.zy-contact-link:hover,
.zy-contact-link:focus-visible {
  text-decoration: underline;
}
.enquiry-copy .zy-contact-links {
  margin-top: .75rem;
}
.zy-product .product-intro > .zy-contact-link,
.zy-oem-contact {
  margin-top: .75rem;
}

.zy-buyer-fields {
  margin-bottom: 1rem;
}
.zy-buyer-fields summary {
  cursor: pointer;
  padding: .75rem 0;
}
.zy-buyer-fields .field {
  margin-top: .75rem;
}
