/* DR INTERNATIONAL — Mobile & tablet responsive enhancements */

/* ─── Chrome (header / promo / footer) ─── */
@media (max-width: 1024px) {
  body.jz-page {
    --jz-header-h: 78px;
  }
}

@media (max-width: 767px) {
  body.jz-page {
    --jz-promo-h: 34px;
    --jz-header-h: 68px;
  }

  .jz-promo__group {
    font-size: 0.64rem;
    gap: 0.4rem;
    padding-right: 1.75rem;
  }

  .jz-promo__icon {
    width: 11px;
    height: 11px;
  }

  .jz-promo__sep {
    width: 2px;
    height: 2px;
  }

  .jz-header__inner {
    padding: 0 0.85rem;
    gap: 0.35rem;
  }

  .jz-logo img,
  .jz-logo__img {
    height: clamp(44px, 12vw, 52px);
    max-width: min(180px, 52vw);
  }

  .jz-header__right {
    gap: 0;
  }

  .jz-icon-btn,
  .jz-burger {
    width: 40px;
    height: 40px;
  }

  .jz-mobile__panel {
    width: min(100%, 360px);
    padding: 1.25rem 1rem 1.5rem;
  }

  .jz-footer__main {
    gap: 2rem;
    padding: 2.5rem 0 2rem;
  }

  .jz-footer__cta {
    padding: 1.5rem;
  }

  .jz-footer__cta-btns {
    flex-direction: column;
    width: 100%;
  }

  .jz-footer__cta-btns .jz-footer__cta-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 479px) {
  body.jz-page {
    --jz-promo-h: 32px;
  }

  .jz-promo__text {
    max-width: 52vw;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .jz-promo__link {
    flex-shrink: 0;
  }
}

/* ─── Homepage hero ─── */
@media (max-width: 991px) {
  .nx-hero {
    height: min(72vh, 560px);
    min-height: 440px;
  }

  .nx-hero__title {
    font-size: clamp(2rem, 7.5vw, 3rem);
    letter-spacing: 0.04em;
  }

  .nx-hero__text {
    font-size: 0.92rem;
    line-height: 1.65;
    max-width: 36ch;
  }
}

@media (max-width: 767px) {
  .nx-hero {
    height: min(68vh, 480px);
    min-height: 380px;
  }

  .nx-hero__content {
    width: calc(100% - 1.5rem);
    padding: 0 0.5rem;
  }

  .nx-hero__title {
    font-size: clamp(1.65rem, 8.5vw, 2.35rem);
    margin-bottom: 0.85rem;
  }

  .nx-hero__text {
    font-size: 0.85rem;
    margin-bottom: 1rem;
  }

  .nx-hero__btn-wrap .nx-btn {
    padding: 0.7rem 1.35rem;
    font-size: 0.78rem;
  }

  .nx-hero__arrow {
    width: 36px;
    height: 36px;
  }

  .nx-hero__arrow--prev {
    left: 0.35rem;
  }

  .nx-hero__arrow--next {
    right: 0.35rem;
  }

  .nx-hero__arrow svg {
    width: 16px;
    height: 16px;
  }
}

/* ─── Homepage sections ─── */
@media (max-width: 767px) {
  .container,
  .container--wide {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .nx-section {
    padding: clamp(3rem, 8vw, 4.5rem) 0;
  }

  .nx-head--categories h2,
  .nx-collections__head h2,
  .nx-feat__head h2 {
    font-size: clamp(1.65rem, 7vw, 2.15rem);
  }

  .nx-cats {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .nx-cat {
    min-height: 240px;
  }

  .nx-cat__label h3 {
    font-size: 1rem;
  }

  .nx-collections__tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 1.25rem;
    margin-bottom: 1.75rem;
    padding-bottom: 0.25rem;
  }

  .nx-collections__tabs::-webkit-scrollbar {
    display: none;
  }

  .nx-collections__tab {
    flex-shrink: 0;
    font-size: 0.82rem;
    padding-bottom: 0.7rem;
  }

  .nx-deals-products {
    min-height: 0;
  }

  .nx-deals-card {
    min-height: 0;
    padding: 14px;
    gap: 1rem;
  }

  .nx-deals-card__media {
    min-height: 220px;
  }

  .nx-deals-media__inner {
    height: 220px;
    padding: 0 36px;
  }

  .nx-deals-images img {
    max-height: 200px;
  }

  .nx-deals-banner {
    min-height: 220px;
  }

  .nx-deals-banner__img {
    min-height: 220px;
  }

  .nx-deals-card__title {
    font-size: 1.15rem;
  }

  .nx-deals-card__desc {
    font-size: 0.85rem;
  }

  .nx-feat__nav {
    margin-bottom: 0.75rem;
  }

  .nx-feat__slider-area {
    min-width: 0;
  }

  .nx-features-swiper .swiper-slide {
    width: auto;
  }

  .nx-story-wrap {
    padding: 3rem 0;
  }

  .nx-story__heading {
    font-size: clamp(1.5rem, 6.5vw, 2rem);
  }

  .nx-story__arc {
    width: 120px;
    height: 120px;
  }

  .nx-offer__heading {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

  .nx-offer__panel {
    width: calc(100% - 1.25rem);
    margin-top: -2rem;
  }

  .nx-shop__stage {
    min-height: 320px;
  }

  .nx-shop__content {
    padding-top: 1rem;
  }

  .nx-shop__title {
    font-size: clamp(1.1rem, 4.5vw, 1.35rem);
  }

  .nx-highlights__head h2,
  .nx-assurance__head h2 {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

  .nx-assurance__card {
    padding: 1.25rem;
  }
}

@media (max-width: 479px) {
  .nx-cat {
    min-height: 200px;
  }

  .nx-deals-card__media,
  .nx-deals-media__inner {
    min-height: 190px;
    height: 190px;
  }

  .nx-feat__banner {
    min-height: 260px;
  }
}

/* ─── Touch devices: hide custom cursor ─── */
@media (hover: none), (pointer: coarse) {
  .jz-cursor {
    display: none !important;
  }

  body.jz-page.has-custom-cursor,
  body.jz-page.has-custom-cursor a,
  body.jz-page.has-custom-cursor button {
    cursor: auto !important;
  }
}

/* ─── Inner pages (style.css companions) ─── */
@media (max-width: 767px) {
  html {
    font-size: 16px;
  }

  body.jz-page:not([data-page="home"]) .page-hero {
    padding-top: calc(var(--jz-chrome-h) + 1.75rem);
    padding-bottom: 2rem;
  }

  .page-hero .section-title {
    font-size: clamp(1.65rem, 7vw, 2.25rem);
  }

  .page-hero__breadcrumb {
    font-size: 0.75rem;
  }

  .section {
    padding: clamp(2.5rem, 7vw, 3.5rem) 0;
  }

  .section-head--row {
    gap: 1rem;
  }

  .section-head--row .btn {
    width: 100%;
    justify-content: center;
  }

  .products-filter {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-bottom: 1.5rem;
    padding-bottom: 0.35rem;
  }

  .products-filter::-webkit-scrollbar {
    display: none;
  }

  .products-filter__btn {
    flex-shrink: 0;
    font-size: 0.72rem;
    padding: 0.5rem 0.85rem;
  }

  .products__grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    gap: 1rem;
  }

  .collection-card {
    width: min(280px, 82vw);
  }

  .collections__scroll {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .company__grid,
  .oem__grid,
  .process__grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
  }

  .company-card,
  .oem-card {
    padding: 1.35rem;
  }

  .mfg-pin__right {
    height: 280px;
  }

  .mfg-step-mini {
    font-size: 0.72rem;
  }

  .inquiry-form {
    padding: 1.25rem 1rem;
  }

  .form-block legend {
    font-size: 1rem;
  }

  .form-checks {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
  }

  .form-submit {
    width: 100%;
  }

  .cta__buttons {
    width: 100%;
  }

  .cta__contact {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  .cta__contact span {
    display: none;
  }
}

@media (max-width: 479px) {
  .btn {
    padding: 0.72rem 1.25rem;
    font-size: 0.8rem;
  }

  .btn--lg {
    padding: 0.85rem 1.5rem;
  }
}

body.jz-page {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.nx-hero__bg,
.nx-cat__img {
  transform: translateZ(0);
}

.product-card.has-hover-img:hover .product-card__main-img,
.product-card.has-hover-img:hover .product-card__hover-img {
  will-change: opacity, transform;
}

@media (prefers-reduced-motion: reduce) {
  .nx-hero__bg,
  .nx-cat__img {
    transform: none;
  }
}

@media (max-width: 767px) {
  body[data-page="contact"] .contact-hero {
    margin-top: var(--jz-chrome-h, 0);
  }

  body[data-page="contact"] .contact-info-card p {
    font-size: 14px;
    line-height: 22px;
  }

  body[data-page="contact"] .contact-button {
    width: 100%;
  }
}

/* ═══════════════════════════════════════════
   Cross-device responsive layer
   Laptop · Tablet · Mobile
   ═══════════════════════════════════════════ */

/* Global: prevent horizontal scroll & image overflow */
html {
  overflow-x: clip;
}

body.jz-page {
  overflow-x: clip;
  max-width: 100vw;
}

img,
video,
iframe {
  max-width: 100%;
}

/* Keep sized media from collapsing in flex/grid cards */
.nx-hero__bg,
.nx-cat__img,
.nx-about-banner__bg img,
.pd-gallery__track img,
.product-card__img img,
.jz-logo img,
.jz-logo__img {
  max-width: none;
}

/* ─── Laptop (≤1366px) ─── */
@media (max-width: 1366px) {
  .container,
  .container--wide {
    padding-left: clamp(1rem, 2.5vw, 2rem);
    padding-right: clamp(1rem, 2.5vw, 2rem);
  }

  .nx-hero__title {
    font-size: clamp(2.35rem, 4.2vw, 3.4rem);
  }

  .nx-feat__layout {
    gap: 1.25rem;
  }
}

/* ─── Small laptop / large tablet (≤1100px) ─── */
@media (max-width: 1100px) {
  .nx-section {
    padding: clamp(3.25rem, 6vw, 5rem) 0;
  }

  .nx-collections__grid {
    gap: 1.25rem;
  }

  .nx-highlights__grid,
  .nx-assurance__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
  }

  .nx-about-banner {
    min-height: 320px;
    padding: calc(var(--jz-chrome-h) + 3.5rem) 0 4rem;
  }

  .nx-about-banner__title {
    font-size: clamp(2.2rem, 5vw, 3rem);
  }

  .pd-layout {
    gap: 2rem;
  }

  .jx-buyer-intro__grid,
  .jx-buyer-contact__grid {
    gap: 2rem;
  }
}

/* ─── Tablet (≤991px) ─── */
@media (max-width: 991px) {
  .nx-story__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .nx-story__media {
    max-width: 520px;
    margin: 0 auto;
  }

  .nx-story__copy {
    text-align: center;
    max-width: 540px;
    margin: 0 auto;
  }

  .nx-story__btn {
    margin-left: auto;
    margin-right: auto;
  }

  .nx-feat__layout {
    grid-template-columns: 1fr;
  }

  .nx-feat__banner {
    min-height: 360px;
    max-width: 420px;
    margin: 0 auto;
    width: 100%;
  }

  .nx-offer__grid,
  .nx-offer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pd-qty-row {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .pd-buy {
    flex: 1 1 100%;
    width: 100%;
  }

  .pd-tabs__nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
  }

  .pd-tabs__nav::-webkit-scrollbar {
    display: none;
  }

  .pd-tabs__btn {
    flex-shrink: 0;
  }

  .dr-quote-modal__panel {
    width: min(100% - 1.5rem, 520px);
    max-height: min(92vh, 720px);
    overflow-y: auto;
  }

  .jz-footer__cta {
    text-align: left;
  }

  body[data-page="products"] .products__grid.collection-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 18px;
  }

  .collection-toolbar {
    gap: 1rem;
  }
}

/* ─── Tablet portrait / large phone (≤768px) ─── */
@media (max-width: 768px) {
  .nx-highlights__grid,
  .nx-assurance__grid,
  .nx-offer__grid,
  .nx-offer-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
  }

  .nx-hero__content {
    text-align: center;
    align-items: center;
  }

  .nx-hero__text {
    margin-left: auto;
    margin-right: auto;
  }

  .nx-hero__btn-wrap {
    display: flex;
    justify-content: center;
  }

  .nx-deals-products {
    min-height: 0 !important;
  }

  .nx-deals-card {
    min-height: 0 !important;
    height: auto !important;
  }

  .nx-collections__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

  .nx-about-banner {
    min-height: 260px;
    padding: calc(var(--jz-chrome-h) + 2.75rem) 0 3rem;
  }

  .nx-about-banner__crumb {
    font-size: 0.78rem;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem;
  }

  .pd-main {
    padding-left: 0;
    padding-right: 0;
  }

  .pd-layout,
  .pd-tabs {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .pd-perks {
    grid-template-columns: 1fr;
  }

  .jx-buyer-steps__list {
    grid-template-columns: 1fr;
  }

  .inquiry-form .form-grid,
  .jx-buyer-form .form-grid {
    grid-template-columns: 1fr;
  }

  .nx-counter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

  .oem__grid,
  .company__grid {
    grid-template-columns: 1fr;
  }
}

/* ─── Mobile (≤600px) ─── */
@media (max-width: 600px) {
  .nx-collections__grid {
    grid-template-columns: 1fr;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
  }

  body[data-page="products"] .products__grid.collection-grid {
    grid-template-columns: 1fr;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
    gap: 1.75rem;
  }

  .nx-feat__banner {
    min-height: 300px;
    max-width: none;
  }

  .nx-deals-banner {
    min-height: 240px;
  }

  .nx-deals-banner__img {
    min-height: 240px;
  }

  .nx-deals-banner__title {
    font-size: 0.65rem;
    padding: 4px 12px;
    top: 16px;
  }

  .jz-mobile__cta,
  .jz-btn--block {
    width: 100%;
    justify-content: center;
  }

  .form-submit,
  .pd-buy,
  .nx-btn,
  .jz-footer__cta-btn {
    min-height: 44px;
  }

  .dr-quote-modal__panel {
    width: calc(100% - 1rem);
    padding: 1.35rem 1.1rem 1.5rem;
    border-radius: 12px;
  }

  .nx-counter-grid {
    grid-template-columns: 1fr;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
  }

  .contact-info-grid {
    grid-template-columns: 1fr;
  }

  .contact-emergency > img {
    min-height: 260px;
    aspect-ratio: 4 / 3;
  }
}

/* ─── Small phones (≤479px) ─── */
@media (max-width: 479px) {
  .container,
  .container--wide {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .nx-hero {
    min-height: 340px;
    height: min(64vh, 420px);
  }

  .nx-hero__title {
    font-size: clamp(1.45rem, 8vw, 1.9rem);
  }

  .nx-hero__text {
    font-size: 0.8rem;
    max-width: 32ch;
  }

  .nx-about-banner__title {
    font-size: clamp(1.75rem, 8.5vw, 2.2rem);
  }

  .pd-title {
    font-size: 1.45rem;
  }

  .pd-qty-row {
    flex-direction: column;
    align-items: stretch;
  }

  .pd-qty {
    width: 100%;
  }

  .product-card__hover-actions {
    opacity: 1;
    transform: none;
  }
}

/* Safe area (notched phones) */
@supports (padding: max(0px)) {
  body.jz-page {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }

  .jz-promo,
  .jz-header,
  .jz-footer__bottom {
    padding-left: max(0.75rem, env(safe-area-inset-left));
    padding-right: max(0.75rem, env(safe-area-inset-right));
  }
}
