/* Xingyuan reusable B2B product description v1 */
body.single-product .woocommerce-product-gallery {
  width: 100% !important;
  max-width: 390px !important;
  margin-inline: auto !important;
  padding: 12px !important;
  overflow: hidden !important;
  border: 1px solid #29485e !important;
  border-radius: 16px !important;
  background: #fff !important;
}

body.single-product .woocommerce-product-gallery__wrapper {
  margin: 0 !important;
}

body.single-product .woocommerce-product-gallery__image {
  aspect-ratio: 1 / 1;
  background: #fff;
}

body.single-product .woocommerce-product-gallery__image > a {
  display: grid !important;
  width: 100% !important;
  height: 100% !important;
  padding: 24px !important;
  place-items: center !important;
}

body.single-product .woocommerce-product-gallery__image img {
  width: 100% !important;
  height: 100% !important;
  max-width: 342px !important;
  max-height: 342px !important;
  padding: 0 !important;
  object-fit: contain !important;
  object-position: center !important;
  border-radius: 8px !important;
}

body.single-product .woocommerce-product-gallery .flex-control-thumbs img {
  width: 70px !important;
  height: 70px !important;
  padding: 6px !important;
  background: #fff !important;
  object-fit: contain !important;
}

.xy-product,
.xy-product * {
  box-sizing: border-box;
}

.xy-product {
  --xy-bg: #061625;
  --xy-panel: #0b2236;
  --xy-panel-2: #102c43;
  --xy-yellow: #ffc62b;
  --xy-text: #f7fbff;
  --xy-muted: #b9cbd7;
  --xy-line: #29485e;
  width: 100%;
  max-width: 900px;
  margin: 28px auto;
  overflow: hidden;
  border: 1px solid var(--xy-line);
  border-radius: 18px;
  background: var(--xy-bg);
  color: var(--xy-text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.65;
}

.xy-product img {
  display: block;
  width: 100%;
  height: auto;
}

.xy-product h2,
.xy-product h3,
.xy-product p,
.xy-product figure {
  margin-top: 0;
}

.xy-product h2,
.xy-product h3 {
  color: var(--xy-text);
}

.xy-product h2 {
  margin-bottom: 10px;
  font-size: 30px;
  line-height: 1.18;
}

.xy-product h3 {
  margin-bottom: 12px;
  font-size: 21px;
  line-height: 1.3;
}

.xy-product-section {
  padding: 42px 34px;
  border-top: 1px solid var(--xy-line);
}

.xy-product-section:first-child {
  border-top: 0;
}

.xy-product-heading {
  max-width: 700px;
  margin-bottom: 22px;
}

.xy-product-heading > span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 8px;
  color: var(--xy-yellow);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.xy-product-heading > span::before {
  width: 26px;
  height: 3px;
  border-radius: 8px;
  background: var(--xy-yellow);
  content: "";
}

.xy-product-heading p,
.xy-product-copy,
.xy-product-card p {
  color: var(--xy-muted);
}

.xy-product-snapshot {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  background: linear-gradient(135deg, #0b2941, #061625 78%);
}

.xy-product-stat {
  min-height: 112px;
  padding: 20px;
  border: 1px solid var(--xy-line);
  border-top: 4px solid var(--xy-yellow);
  border-radius: 12px;
  background: rgba(8, 29, 47, .88);
}

.xy-product-stat strong,
.xy-product-stat span {
  display: block;
}

.xy-product-stat strong {
  margin-bottom: 5px;
  color: var(--xy-yellow);
  font-size: 21px;
}

.xy-product-stat span {
  color: var(--xy-muted);
  font-size: 13px;
}

.xy-product-spec-grid,
.xy-product-application-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 24px;
  align-items: stretch;
}

.xy-product-media,
.xy-product-card,
.xy-product-spec-card,
.xy-product-option,
.xy-product-pack-card {
  overflow: hidden;
  border: 1px solid var(--xy-line);
  border-radius: 14px;
  background: var(--xy-panel);
}

.xy-product-media--contain {
  display: grid;
  min-height: 430px;
  padding: 22px;
  place-items: center;
  background: #fff;
}

.xy-product-media--contain img {
  width: 100%;
  height: 100%;
  max-height: 386px;
  object-fit: contain;
}

.xy-product-spec-card {
  padding: 8px 20px 20px;
}

.xy-product table {
  width: 100%;
  border-collapse: collapse;
}

.xy-product th,
.xy-product td {
  padding: 11px 8px;
  border-bottom: 1px solid var(--xy-line);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

.xy-product th {
  width: 39%;
  color: #9fb5c6;
  font-weight: 700;
}

.xy-product td {
  color: #fff;
}

.xy-product-note {
  margin: 18px 0 0;
  padding: 14px 16px;
  border-left: 4px solid var(--xy-yellow);
  background: var(--xy-panel-2);
  color: #d5e2ea;
  font-size: 13px;
}

.xy-product-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.xy-product-option {
  padding: 18px;
}

.xy-product-option strong,
.xy-product-option span {
  display: block;
}

.xy-product-option strong {
  margin-bottom: 6px;
  color: #fff;
}

.xy-product-option span {
  color: var(--xy-muted);
  font-size: 13px;
}

.xy-product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.xy-product-tag {
  padding: 7px 11px;
  border: 1px solid #48677b;
  border-radius: 999px;
  color: #e7f0f5;
  font-size: 12px;
}

.xy-product-media--wide img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.xy-product-media figcaption,
.xy-product-pack-card figcaption {
  padding: 11px 13px;
  color: #d7e4ec;
  font-size: 12px;
}

.xy-product-application-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.xy-product-list {
  margin: 0;
  padding-left: 19px;
  color: #d7e4ec;
}

.xy-product-list li {
  margin-bottom: 8px;
}

.xy-product-pack-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.xy-product-pack-card img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.xy-product-rfq {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  background: var(--xy-yellow);
  color: #071522;
}

.xy-product-rfq h2,
.xy-product-rfq p {
  color: #071522;
}

.xy-product-rfq p {
  margin-bottom: 0;
}

.xy-product-btn {
  display: inline-flex;
  min-height: 48px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 8px;
  background: #071522;
  color: #fff !important;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none !important;
}

@media (max-width: 900px) {
  .xy-product {
    max-width: calc(100% - 28px);
  }

  .xy-product-spec-grid,
  .xy-product-application-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  body.single-product .woocommerce-product-gallery {
    max-width: min(100%, 360px) !important;
  }

  body.single-product .woocommerce-product-gallery__image > a {
    padding: 18px !important;
  }

  .xy-product {
    max-width: calc(100% - 24px);
    margin: 18px auto;
  }

  .xy-product-section {
    padding: 38px 20px;
  }

  .xy-product h2 {
    font-size: 27px;
  }

  .xy-product-snapshot,
  .xy-product-options,
  .xy-product-pack-grid {
    grid-template-columns: 1fr;
  }

  .xy-product-media--contain {
    min-height: 340px;
  }

  .xy-product-rfq {
    align-items: flex-start;
    flex-direction: column;
  }

  .xy-product-btn {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .xy-product th,
  .xy-product td {
    display: block;
    width: 100%;
  }

  .xy-product th {
    padding-bottom: 2px;
    border-bottom: 0;
  }

  .xy-product td {
    padding-top: 2px;
  }
}
