/*
 * Geometry-only parity pass.
 * No colors, image sources, transitions, animations, or interaction states.
 */

html {
  overflow-x: hidden;
}

/* Homepage spacing and partner carousel geometry.  The partners keep their
   existing controls in the markup for accessibility/fallback, but the
   homepage presentation is an automatic, arrow-free loop. */
.home .qt-partners .qt-carousel__arrow {
  display: none !important;
}

@media (min-width: 1000px) {
  .home .qt-categories {
    margin-top: 20px;
  }
}

/* WeChat contact dialog: match the measured source popup geometry while the
   QR remains the editable QIANTONG media-library slot. */
.qt-wechat-dialog {
  display: block !important;
  box-sizing: border-box;
  width: min(400px, 100%) !important;
  height: 430.09375px !important;
  min-height: 430.09375px;
  max-height: calc(100vh - 48px);
  padding: 30px !important;
  border-radius: 7px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(41, 51, 61, .1);
  text-align: center;
}

.qt-wechat-dialog .qt-modal__close {
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 100%;
  background: rgba(0, 0, 0, .5);
  color: #fff;
  transition: background-color .15s ease, color .15s ease;
}

.qt-wechat-dialog .qt-modal__close:hover,
.qt-wechat-dialog .qt-modal__close:focus-visible {
  background: var(--qt-accent);
  color: var(--qt-on-accent);
}

.qt-wechat-dialog .qt-modal__close .qt-icon {
  width: 10px;
  height: 10px;
}

.qt-wechat-dialog__qr {
  display: block;
  box-sizing: border-box;
  width: min(var(--qt-wechat-qr-size, 340px), 100%);
  height: min(var(--qt-wechat-qr-size, 340px), 100%);
  max-width: 100%;
  padding: 0 !important;
  margin: 0 auto;
}

.qt-wechat-dialog__qr > .qt-picture {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  max-width: 100%;
  margin: 0 auto;
}

.qt-wechat-dialog__qr img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.qt-wechat-dialog .qt-wechat-dialog__hint {
  margin: 7px 0 0;
  font-size: 14px;
  line-height: 23.1px;
  text-align: center;
}

@media (max-width: 689.98px) {
  .qt-wechat-dialog {
    width: 100% !important;
    height: auto !important;
    min-height: 0;
    max-height: calc(100vh - 20px);
    padding: 30px !important;
  }

  .qt-wechat-dialog__qr,
  .qt-wechat-dialog__qr > .qt-picture {
    width: min(var(--qt-wechat-qr-size, 340px), 100%);
    height: min(var(--qt-wechat-qr-size, 340px), calc(100vw - 80px));
    aspect-ratio: 1;
  }
}

body {
  /* clip prevents horizontal overflow without creating a second scrolling
     ancestor that interferes with sticky anchor navigation. */
  overflow-x: clip;
}

#certifications {
  overflow: hidden;
}

@media (min-width: 1000px) {
  .qt-inner-hero > .qt-container,
  .home .qt-who > .qt-split,
  .home .qt-materials > .qt-container,
  .home .qt-visits__heading,
  .home .qt-visits__layout,
  .home .qt-visits__gallery-row,
  .home .qt-categories > .qt-container,
  .home .qt-featured > .qt-container,
  .qt-products-archive-section > .qt-products-layout,
  .qt-contact-container {
    width: min(90vw, 1290px);
    max-width: 1290px;
    margin-inline: auto;
  }

  .home .qt-who > .qt-split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;
  }

  .home .qt-who > .qt-split > div:first-child,
  .home .qt-who > .qt-split > .qt-who__visual {
    width: 100%;
    min-width: 0;
  }

  .home .qt-who > .qt-split > div:first-child {
    padding-top: 15px;
  }

  .home .qt-visits__layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;
  }

  .home .qt-visits__hero,
  .home .qt-visits__grid {
    width: 100%;
  }

  .home .qt-visits__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home .qt-visits__grid figure {
    width: calc(100% - 40px);
    height: auto;
    aspect-ratio: 275 / 366.65625;
  }

  .home .qt-visits__gallery-grid {
    width: 100%;
    grid-template-columns:
      calc((100% - 30px) / 4)
      calc((100% - 30px) / 4)
      calc((100% - 30px) / 2);
  }

  .home .qt-visits__gallery-grid figure {
    width: calc(100% - 40px);
    height: auto;
    aspect-ratio: 275 / 366.65625;
  }

  .home .qt-visits__gallery-grid .qt-visits__gallery-feature {
    width: 100%;
    height: auto;
    aspect-ratio: 561 / 350.65625;
  }

  .home .qt-visits__gallery-grid .qt-visits__gallery-feature > .qt-picture,
  .home .qt-visits__gallery-grid .qt-visits__gallery-feature img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .home .qt-categories .qt-category-grid {
    width: 100%;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 20px;
  }

  .home .qt-featured .qt-product-grid {
    width: 100%;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: 30px;
  }

  .home .qt-featured .qt-product-card,
  .home .qt-featured .qt-product-card__body {
    width: auto;
  }

  .home .qt-featured .qt-product-card__image {
    width: calc(100% - 2px);
    height: auto;
    aspect-ratio: 1;
    flex: 0 0 auto;
  }

  .qt-products-archive-section > .qt-products-layout {
    grid-template-columns: 25% 72%;
    column-gap: 3%;
  }

  .qt-products-archive-section .qt-products-sidebar,
  .qt-products-archive-section .qt-products-archive-main {
    width: auto;
  }

  .qt-products-archive-section .qt-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 30px;
  }

  .qt-products-archive-section .qt-product-card,
  .qt-products-archive-section .qt-product-card__image {
    width: auto;
  }

  .qt-products-archive-section .qt-product-card__image {
    height: auto;
    aspect-ratio: 1;
    flex: 0 0 auto;
  }

  .qt-custom-intro > .qt-split,
  .qt-custom-fabric > .qt-split,
  .qt-custom-foam > .qt-split,
  .qt-custom-cards > .qt-container {
    width: min(90vw, 1290px);
    max-width: 1290px;
    margin-inline: auto;
  }

  .qt-custom-intro > .qt-split,
  .qt-custom-fabric > .qt-split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;
  }

  .qt-custom-intro__media {
    width: 100%;
  }

  .qt-custom-intro__media img {
    width: min(500px, 100%);
  }

  .qt-contact-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;
  }

  .qt-contact-container {
    width: min(90vw, 1290px) !important;
    max-width: 1290px !important;
  }
}

@media (min-width: 1200px) {
  #company.qt-story-section > .qt-container,
  #company .qt-split,
  #company + .qt-story-stats > .qt-container,
  #company + .qt-story-stats .qt-counters__grid,
  #why-choose-us.qt-story-section > .qt-container,
  #why-choose-us .qt-section-heading,
  #why-choose-us .qt-advantage-grid,
  #our-factory.qt-story-section > .qt-container,
  #our-factory .qt-section-heading,
  #our-factory .qt-factory-grid,
  #certifications.qt-story-section > .qt-container,
  #certifications .qt-section-heading,
  #certifications .qt-cert-carousel,
  #certifications .qt-cert-carousel .qt-carousel__viewport {
    width: min(90vw, 1290px);
    max-width: 1290px;
  }

  #company .qt-split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #company .qt-split > div:first-child,
  #company .qt-split > div:first-child h2,
  #company .qt-split > div:first-child [data-expand-content],
  #company .qt-split > div:first-child [data-expand-toggle],
  #company .qt-story-company__media,
  #company .qt-story-company__media > .qt-picture,
  #company .qt-story-company__media img {
    width: 100%;
  }

  #company .qt-story-company__media,
  #company .qt-story-company__media > .qt-picture,
  #company .qt-story-company__media img {
    height: auto;
    aspect-ratio: 630 / 453.9375;
  }

  #company + .qt-story-stats .qt-counters__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
  }

  #company + .qt-story-stats .qt-story-stat {
    width: auto;
  }

  #why-choose-us .qt-section-heading h2,
  #our-factory .qt-section-heading h2,
  #our-factory .qt-section-heading p,
  #certifications .qt-section-heading h2 {
    width: 100%;
  }

  #why-choose-us .qt-advantage-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #why-choose-us .qt-advantage-grid article {
    width: auto;
  }

  #why-choose-us .qt-advantage-grid article > p {
    width: auto;
  }

  #our-factory .qt-factory-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: repeat(3, auto);
  }

  #our-factory .qt-factory-grid button,
  #our-factory .qt-factory-grid button img,
  #our-factory .qt-factory-grid button .qt-picture {
    width: 100%;
    height: auto;
    aspect-ratio: 304.5 / 185.734375;
  }

  #certifications .qt-cert-carousel .qt-carousel__track {
    gap: 20px;
  }

  #certifications .qt-cert-carousel .qt-cert-card,
  #certifications .qt-cert-carousel .qt-cert-card button,
  #certifications .qt-cert-carousel .qt-cert-card .qt-picture,
  #certifications .qt-cert-carousel .qt-cert-card img {
    width: calc((min(90vw, 1290px) - 60px) / 4) !important;
    flex-basis: calc((min(90vw, 1290px) - 60px) / 4) !important;
    height: auto;
    aspect-ratio: 273 / 381.546875;
  }
}

@media (min-width: 1000px) and (max-width: 1199.98px) {
  #company.qt-story-section > .qt-container,
  #company .qt-split,
  #company + .qt-story-stats > .qt-container,
  #why-choose-us.qt-story-section > .qt-container,
  #our-factory.qt-story-section > .qt-container,
  #certifications.qt-story-section > .qt-container {
    width: 90vw;
    max-width: none;
    margin-inline: auto;
  }

  #company .qt-split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;
  }

  #company .qt-split > div:first-child,
  #company .qt-story-company__media {
    width: 100%;
  }

  #company .qt-story-company__media {
    height: auto;
    aspect-ratio: 630 / 453.9375;
    margin-top: 38px;
  }

  #company h2,
  #why-choose-us h2,
  #our-factory h2,
  #certifications h2 {
    width: 100%;
    font-size: 28px;
    line-height: 42px;
  }

  #company + .qt-story-stats .qt-counters__grid {
    width: 100%;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
  }

  #why-choose-us .qt-section-heading,
  #why-choose-us .qt-advantage-grid,
  #our-factory .qt-section-heading,
  #our-factory .qt-factory-grid,
  #certifications .qt-section-heading,
  #certifications .qt-cert-carousel,
  #certifications .qt-cert-carousel .qt-carousel__viewport {
    width: 100%;
    max-width: none;
  }

  #why-choose-us .qt-advantage-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #our-factory .qt-factory-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
  }
}

@media (min-width: 1400px) {
  .home .qt-visits {
    height: 982.72px;
    min-height: 982.72px;
  }

  .home .qt-featured {
    margin-top: 5.18px;
    padding-top: 65.19px !important;
  }

  #why-choose-us.qt-story-section {
    height: 691.125px;
    min-height: 691.125px;
  }

  #our-factory.qt-story-section {
    height: 949.34375px;
    min-height: 949.34375px;
  }

  #our-factory .qt-factory-grid {
    height: 603.171875px;
  }

  #certifications.qt-story-section {
    height: 707.40625px;
    min-height: 707.40625px;
  }

  #certifications .qt-cert-carousel,
  #certifications .qt-cert-carousel .qt-carousel__viewport,
  #certifications .qt-cert-carousel .qt-carousel__track,
  #certifications .qt-cert-carousel .qt-cert-card {
    height: 430.078125px;
  }
}

@media (min-width: 690px) and (max-width: 999.98px) {
  .qt-inner-hero {
    height: 150px;
  }

  .qt-inner-hero > .qt-container,
  .qt-products-archive-section > .qt-products-layout,
  .qt-contact-container,
  #company > .qt-container,
  #company + .qt-story-stats > .qt-container,
  #why-choose-us > .qt-container,
  #our-factory > .qt-container,
  #certifications > .qt-container {
    width: 90vw;
    max-width: none;
    margin-inline: auto;
  }

  .qt-products-archive-section {
    padding-block: 40px;
  }

  .qt-products-archive-section > .qt-products-layout {
    grid-template-columns: 1fr;
  }

  .qt-products-archive-section .qt-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 50px 20px;
  }

  #company .qt-split {
    width: 90vw;
    margin-inline: auto;
    grid-template-columns: 1fr;
    gap: 35px;
  }

  #company .qt-story-company__media {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    height: auto;
    aspect-ratio: 630 / 453.9375;
    margin: 0;
  }

  #company .qt-split > div:first-child {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
  }

  #company h2,
  #why-choose-us h2,
  #our-factory h2,
  #certifications h2 {
    font-size: 26px;
    line-height: 39px;
  }

  .qt-contact-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;
  }

  .qt-contact-benefits {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 15px;
    margin: 0;
    padding: 45px 0 35px;
    overflow-x: auto;
  }

  .qt-contact-benefit {
    flex: 0 0 340px;
    width: 340px;
    height: 168px;
  }

  .qt-custom-intro > .qt-split,
  .qt-custom-fabric > .qt-split,
  .qt-custom-foam > .qt-split,
  .qt-custom-cards > .qt-container {
    width: 90vw;
    max-width: none;
    margin-inline: auto;
  }

  .qt-custom-intro > .qt-split,
  .qt-custom-fabric > .qt-split,
  .qt-custom-foam > .qt-split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 689.98px) {
  .qt-inner-hero {
    height: 100px;
  }

  body:has(.qt-custom-intro) .qt-inner-hero {
    height: 110.89px;
  }

  .qt-inner-hero > .qt-container,
  .qt-products-archive-section > .qt-products-layout,
  .qt-contact-container,
  #company > .qt-container,
  #company + .qt-story-stats > .qt-container,
  #why-choose-us > .qt-container,
  #our-factory > .qt-container,
  #certifications > .qt-container {
    width: 94vw;
    max-width: none;
    margin-inline: auto;
  }

  .qt-products-archive-section {
    padding-block: 40px;
  }

  .qt-products-archive-section .qt-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 50px 10px;
  }

  #company .qt-split {
    width: 94vw;
    margin-inline: auto;
    grid-template-columns: 1fr;
    gap: 35px;
  }

  #company .qt-story-company__media {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    height: auto;
    aspect-ratio: 630 / 453.9375;
    margin: 0;
  }

  #company .qt-split > div:first-child {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
  }

  #company h2,
  #why-choose-us h2,
  #our-factory h2,
  #certifications h2 {
    font-size: 24px;
    line-height: 36px;
  }

  .qt-custom-intro > .qt-split,
  .qt-custom-fabric > .qt-split,
  .qt-custom-foam > .qt-split,
  .qt-custom-cards > .qt-container {
    width: 94vw;
    max-width: none;
    margin-inline: auto;
  }

  .qt-custom-intro > .qt-split {
    padding-inline: 0;
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .qt-custom-intro__media {
    width: 100%;
  }

  .qt-contact-map {
    height: 400px;
  }
}

/* Floating Email dialog: use the reference's single-column contact card
   proportions while keeping the existing QIANTONG fields and submit flow. */
#floating-email-modal .qt-modal__dialog--contact,
#quote-modal .qt-modal__dialog--contact {
  display: block;
  width: min(600px, calc(100vw - 24px)) !important;
  height: 548px;
  max-height: calc(100vh - 24px);
  padding: 40px 30px 28px !important;
  border-radius: 8px;
  overflow: auto;
  box-shadow: var(--qt-shadow);
}

.qt-modal--floating-contact .qt-modal__dialog--contact > .qt-eyebrow,
.qt-modal--floating-contact .qt-modal__dialog--contact > p {
  display: none;
}

.qt-modal--floating-contact .qt-modal__dialog--contact h2 {
  margin: 0 0 23px;
  font-size: 18px;
  line-height: 24px;
  font-weight: 500;
}

.qt-modal--floating-contact .qt-modal__dialog--contact .qt-modal__close {
  top: 16px;
  right: 16px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  transition: background-color .15s ease, color .15s ease;
}

.qt-modal--floating-contact .qt-modal__dialog--contact .qt-modal__close:hover,
.qt-modal--floating-contact .qt-modal__dialog--contact .qt-modal__close:focus-visible {
  background: var(--qt-accent);
  color: var(--qt-on-accent);
}

.qt-modal--floating-contact .qt-floating-inquiry-form,
.qt-modal--floating-contact .qt-inquiry-form {
  width: 100%;
}

.qt-modal--floating-contact .qt-floating-inquiry-grid,
.qt-modal--floating-contact .qt-form-grid--product-compact {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.qt-modal--floating-contact .qt-floating-inquiry-grid > label,
.qt-modal--floating-contact .qt-form-grid--product-compact > label {
  display: block;
  min-width: 0;
  margin: 0;
  font-size: 0;
  line-height: 0;
}

.qt-modal--floating-contact .qt-floating-inquiry-grid > label.qt-form-grid__wide,
.qt-modal--floating-contact .qt-form-grid--product-compact > label.qt-form-grid__wide {
  grid-column: auto;
}

.qt-modal--floating-contact .qt-floating-inquiry-grid input,
.qt-modal--floating-contact .qt-floating-inquiry-grid textarea,
.qt-modal--floating-contact .qt-form-grid--product-compact input,
.qt-modal--floating-contact .qt-form-grid--product-compact textarea {
  display: block;
  width: 100%;
  height: 40px;
  min-height: 40px;
  margin: 0;
  padding: 8px 15px;
  font-size: 16px;
  line-height: 24px;
}

.qt-modal--floating-contact .qt-floating-inquiry-grid textarea,
.qt-modal--floating-contact .qt-form-grid--product-compact textarea {
  height: 170px;
  min-height: 170px;
  resize: vertical;
}

.qt-modal--floating-contact .qt-floating-inquiry-grid input::placeholder,
.qt-modal--floating-contact .qt-floating-inquiry-grid textarea::placeholder,
.qt-modal--floating-contact .qt-form-grid--product-compact input::placeholder,
.qt-modal--floating-contact .qt-form-grid--product-compact textarea::placeholder {
  opacity: 1;
}

.qt-modal--floating-contact .qt-floating-inquiry-form .qt-form-status,
.qt-modal--floating-contact .qt-inquiry-form .qt-form-status {
  min-height: 0;
  height: 0;
  margin: 0;
  overflow: hidden;
}

.qt-modal--floating-contact .qt-floating-inquiry-form .qt-form-status.is-error,
.qt-modal--floating-contact .qt-floating-inquiry-form .qt-form-status.is-success,
.qt-modal--floating-contact .qt-inquiry-form .qt-form-status.is-error,
.qt-modal--floating-contact .qt-inquiry-form .qt-form-status.is-success {
  height: auto;
  min-height: 20px;
  margin-top: 10px;
}

.qt-modal--floating-contact .qt-form-privacy {
  display: none;
}

.qt-modal--floating-contact .qt-floating-inquiry-form > .qt-button,
.qt-modal--floating-contact .qt-inquiry-form > .qt-button {
  width: 180px;
  min-height: 40px;
  height: 40px;
  margin-top: 20px;
  padding: 8px 18px;
  font-size: 14px;
  line-height: 20px;
}

.qt-modal--floating-contact .qt-floating-inquiry-form > .qt-button .qt-icon,
.qt-modal--floating-contact .qt-inquiry-form > .qt-button .qt-icon {
  display: none;
}

@media (max-width: 689.98px) {
  #floating-email-modal .qt-modal__dialog--contact,
  #quote-modal .qt-modal__dialog--contact {
    width: calc(100vw - 24px) !important;
    height: auto;
    min-height: 548px;
    padding: 40px 22px 28px !important;
  }
}
/* Hover feedback requested for the carousel controls. Keep each control in
   its original neutral palette; only deepen the existing gray/white tones so
   the interaction does not introduce the site's accent blue or shift layout. */
.qt-hero .qt-carousel__arrow:hover,
.qt-hero .qt-carousel__arrow:focus-visible {
  background: #e1e1e1 !important;
  border-color: #bdbdbd !important;
  color: #1a1a1a !important;
}

.qt-testimonials .qt-carousel__arrow:hover,
.qt-testimonials .qt-carousel__arrow:focus-visible {
  background: #ededed !important;
  border-color: #d4d4d4 !important;
  color: #1a1a1a !important;
}

#certifications .qt-carousel__arrow:hover,
#certifications .qt-carousel__arrow:focus-visible {
  background: #d8d8d8 !important;
  border-color: #b8b8b8 !important;
  color: #444 !important;
}

/* Product-category cards expose the title underline only while the pointer
   is over that card, matching the reference menu without changing card
   geometry or the supporting description text. */
.qt-products-mega-menu__category:hover .qt-products-mega-menu__category-copy strong,
.qt-products-mega-menu__category:focus-within .qt-products-mega-menu__category-copy strong {
  text-decoration-line: underline !important;
  text-decoration-style: solid !important;
  text-decoration-thickness: 1px !important;
  text-decoration-color: currentColor !important;
  text-underline-offset: 2px !important;
}

/* Story-section navigation uses the same word-level hover cue as the
   product menu. The existing bottom progress indicator remains untouched. */
.qt-story-nav button:hover,
.qt-story-nav button:focus-visible {
  text-decoration-line: underline !important;
  text-decoration-style: solid !important;
  text-decoration-thickness: 2px !important;
  text-decoration-color: currentColor !important;
  text-underline-offset: 4px !important;
  text-decoration-skip-ink: none !important;
}

.qt-visits__hero .qt-button:hover,
.qt-visits__hero .qt-button:focus-visible {
  background: var(--qt-accent-hover) !important;
  border-color: var(--qt-accent-hover) !important;
  color: var(--qt-on-accent) !important;
}
