/* Wiplo responsive finishing layer.
 * Loaded last so every template follows the same laptop/tablet/mobile rhythm. */

:root {
  --wiplo-page-gutter: clamp(18px, 5vw, 80px);
  --wiplo-section-space: clamp(56px, 7vw, 104px);
  --wiplo-card-radius: clamp(18px, 2vw, 28px);
}

html { font-size: clamp(15px, .22vw + 13px, 17px); }
body { overflow-wrap: break-word; }
img, video, iframe { max-width: 100%; }

/* Consistent readable typography without oversized laptop headings. */
body h1 { font-size: clamp(2.15rem, 4.4vw, 4.5rem); }
body h2 { font-size: clamp(1.75rem, 3vw, 3rem); }
body h3 { font-size: clamp(1.25rem, 1.8vw, 1.8rem); }

/* About Us: retain the editorial hierarchy with a slightly quieter scale. */
.original-brand-page .brand-copy h1,
.original-brand-page .brand-copy h2,
.original-brand-page .brand-range h2,
.original-brand-page .brand-values-intro h2 {
  font-size: clamp(2.05rem, 3.35vw, 3rem) !important;
  line-height: 1.12;
}
.original-brand-page .brand-statements h2 {
  font-size: clamp(1.75rem, 2.7vw, 2.2rem) !important;
  line-height: 1.15;
}
.original-brand-page .brand-values-grid h3 {
  font-size: clamp(1.15rem, 1.45vw, 1.25rem) !important;
}

/* Public order tracking page. */
.wiplo-track-order-page { background: linear-gradient(180deg, #fff 0, #fff7f8 42%, #fdf7f8 100%); }
.wiplo-track-order-page .content-layout {
  width: min(calc(100% - 40px), 920px);
  padding-block: clamp(70px, 8vw, 110px);
}
.wiplo-track-order-page .page-hero {
  display: flex;
  min-height: 0;
  max-width: 760px;
  margin: 0 auto 38px;
  padding: 0;
  flex-direction: column;
  gap: 10px;
  background: transparent;
  overflow: visible;
  text-align: center;
}
.wiplo-track-order-page .page-hero .eyebrow {
  margin: 0;
  color: var(--color-aqua-dark, #278f89);
  font-size: .72rem;
  letter-spacing: .18em;
}
.wiplo-track-order-page .page-hero h1 {
  max-width: none;
  margin: 0;
  font-size: clamp(2.25rem, 4vw, 3.35rem) !important;
  line-height: 1.08;
}
.wiplo-track-order-page .page-hero p {
  max-width: 680px;
  margin: 4px auto 0;
  color: #735d66;
  font-size: clamp(.95rem, 1.4vw, 1.05rem);
  line-height: 1.7;
}
.wiplo-track-order-page .wiplo-public-tracking {
  max-width: 760px;
  margin-inline: auto;
}
.wiplo-track-order-page .wiplo-public-tracking > p:first-child {
  max-width: 620px;
  margin: 0 auto 22px;
  color: #715763;
  font-size: .92rem;
  text-align: center;
}
.wiplo-track-order-page .track_order {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 18px;
  max-width: 760px !important;
  margin-inline: auto !important;
  padding: clamp(28px, 4vw, 42px) !important;
  border: 1px solid rgba(73, 45, 56, .07) !important;
  border-radius: 28px !important;
  background: rgba(255, 255, 255, .94) !important;
  box-shadow: 0 20px 55px rgba(74, 43, 55, .09) !important;
}
.wiplo-track-order-page .track_order > p:first-child {
  grid-column: 1 / -1;
  max-width: 650px;
  margin: 0 0 2px;
  color: #604b54;
  font-size: .92rem;
  line-height: 1.7;
}
.wiplo-track-order-page .track_order .form-row { margin: 0 !important; padding: 0 !important; }
.wiplo-track-order-page .track_order .form-row-first,
.wiplo-track-order-page .track_order .form-row-last { width: auto !important; float: none !important; }
.wiplo-track-order-page .track_order label {
  margin-bottom: 8px;
  color: #392c32;
  font-size: .8rem;
  font-weight: 700;
}
.wiplo-track-order-page .track_order .input-text {
  min-height: 54px;
  padding-inline: 16px;
  font-size: .9rem;
}
.wiplo-track-order-page .track_order .clear { display: none; }
.wiplo-track-order-page .track_order .form-row:last-of-type { grid-column: 1 / -1; }
.wiplo-track-order-page .track_order .button {
  min-width: 170px;
  min-height: 50px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.wiplo-track-order-page .track_order::after {
  content: "Your order details are checked securely and are not stored in this form.";
  grid-column: 1 / -1;
  color: #8a747d;
  font-size: .74rem;
  line-height: 1.5;
}
/* Laptop: preserve multi-column layouts, but reduce visual bulk. */
@media (min-width: 901px) and (max-width: 1280px) {
  .section-container,
  .nature-inner,
  .footer-inner,
  .footer-bottom-inner { padding-inline: 4vw; }

  .nature-section { padding-block: 72px !important; }
  .nature-header { margin-bottom: 42px !important; }
  .nature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 24px !important;
  }
  .nature-card { display: grid !important; grid-template-columns: minmax(180px, .8fr) minmax(0, 1.2fr); }
  .nature-img-wrap { height: 100%; aspect-ratio: auto !important; min-height: 260px; }
  .nature-content { justify-content: center; padding: 26px !important; }
  .nature-content h3 { font-size: 1.3rem !important; }
  .nature-content p { font-size: .94rem !important; }

  .pediatrician-layout { gap: 28px; padding: 28px; }
  .pediatrician-main-heading { font-size: clamp(2rem, 3.2vw, 2.45rem); }
  .pediatrician-content { gap: 14px; }
  .pediatrician-bullets { gap: 12px; }

  .wiplo-post-grid { gap: 22px; }
  .wiplo-post-card__body { padding: 22px; }
  .wiplo-post-card__body h2 { font-size: 1.4rem; }
  .cert-safety-layout,
  .cert-process-grid { gap: 20px; }
}

/* Common 1177–1200px laptop viewport: keep the feature panel within one view. */
@media (min-width: 1100px) and (max-width: 1240px) {
  .pediatrician-section { padding-block: 28px; }
  .pediatrician-section .section-container { max-width: 1100px; }
  .pediatrician-layout {
    grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr);
    gap: 34px;
    padding: 20px 18px 34px;
  }
  .pediatrician-image-wrap {
    width: min(100%, 470px);
    margin: 0;
    justify-self: end;
    border-radius: 18px;
  }
  .pediatrician-content {
    gap: 11px;
    padding-right: 0;
  }
  .pediatrician-main-heading {
    max-width: 520px;
    font-size: 2.15rem;
    line-height: 1.12;
  }
  .pediatrician-sub-heading {
    max-width: 520px;
    margin-bottom: 8px;
    font-size: .84rem;
    line-height: 1.55;
  }
  .pediatrician-bullets {
    gap: 10px;
    margin-bottom: 14px;
  }
  .pediatrician-bullets li {
    padding-left: 18px;
    font-size: .91rem;
    line-height: 1.5;
  }
  .pediatrician-action-area { margin-bottom: 14px; }
  .pediatrician-action-area .btn-navy { padding: 11px 24px; }
  .delivery-note { margin-top: 6px; font-size: .74rem; }
  .pediatrician-icons-grid { gap: 14px 24px; }
  .pediatrician-icon-item { gap: 10px; }
  .pediatrician-icon-item svg { width: 27px; height: 27px; }
  .pediatrician-icon-item span { font-size: .79rem; }
}

/* Tablet: balanced two-column cards, comfortable reading widths. */
@media (min-width: 641px) and (max-width: 900px) {
  body h1 { font-size: clamp(2.25rem, 6vw, 3.35rem); }
  body h2 { font-size: clamp(1.8rem, 4.5vw, 2.55rem); }

  .section-container,
  .nature-inner,
  .footer-inner,
  .footer-bottom-inner { padding-inline: 32px; }

  .nature-section { padding-block: 64px !important; }
  .nature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 22px !important;
  }
  .nature-img-wrap { aspect-ratio: 4 / 3 !important; }
  .nature-content { padding: 22px !important; }
  .nature-content h3 { font-size: 1.3rem !important; }
  .nature-content p { font-size: .94rem !important; }

  .pediatrician-layout { padding: 24px; gap: 30px; }
  .pediatrician-image-wrap { width: min(100%, 620px); margin: 0 auto; }
  .pediatrician-content { width: min(100%, 620px); margin-inline: auto; }
  .pediatrician-icons-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .wiplo-post-grid,
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cert-feature-card { padding: 24px 20px; }
  .footer-links-row { gap: 34px; }
}

/* Phone: single-column flow, compact cards, touch-friendly controls. */
@media (max-width: 640px) {
  :root { --wiplo-section-space: 52px; }
  html { font-size: 15px; }
  body h1 { font-size: clamp(2rem, 10vw, 2.75rem); line-height: 1.08; }
  body h2 { font-size: clamp(1.65rem, 8vw, 2.2rem); line-height: 1.12; }
  body h3 { font-size: clamp(1.2rem, 5.8vw, 1.5rem); }
  p, li { line-height: 1.65; }

  .section-container,
  .nature-inner,
  .footer-inner,
  .footer-bottom-inner { padding-inline: 18px; }

  .nature-section { padding-block: 52px !important; }
  .nature-header { margin-bottom: 28px !important; }
  .nature-header p { font-size: .95rem !important; }
  .nature-grid { grid-template-columns: 1fr !important; gap: 18px !important; }
  .nature-card { border-radius: 20px !important; }
  .nature-img-wrap { aspect-ratio: 16 / 10 !important; }
  .nature-content { padding: 20px !important; }
  .nature-content h3 { margin-bottom: 8px !important; font-size: 1.28rem !important; }
  .nature-content p { margin-bottom: 0; font-size: .92rem !important; }

  .pediatrician-section { padding-block: 36px; }
  .pediatrician-layout { padding: 0; gap: 26px; }
  .pediatrician-image-wrap { margin: 0; border-radius: 18px; }
  .pediatrician-main-heading { font-size: clamp(1.8rem, 8vw, 2.25rem); }
  .pediatrician-sub-heading { font-size: .82rem; }
  .pediatrician-bullets li { font-size: .94rem; }
  .pediatrician-icons-grid { grid-template-columns: 1fr; gap: 14px; }

  .wiplo-post-grid,
  .post-grid,
  .cert-process-grid,
  .cert-safety-grid { grid-template-columns: 1fr !important; }
  .wiplo-post-card,
  .post-card,
  .cert-feature-card,
  .cert-process-card { border-radius: 20px; }
  .wiplo-post-card__body,
  .post-card__body { padding: 20px; }
  .wiplo-post-card__body h2,
  .post-card__body h2 { font-size: 1.35rem !important; }

  .button,
  .wp-element-button,
  .woocommerce a.button,
  .woocommerce button.button { min-height: 46px; }
  .footer-main { padding-top: 48px; }
  .footer-links-row { gap: 28px; }

  .original-brand-page .brand-copy h1,
  .original-brand-page .brand-copy h2,
  .original-brand-page .brand-range h2,
  .original-brand-page .brand-values-intro h2 {
    font-size: clamp(1.85rem, 8vw, 2.1rem) !important;
  }
  .original-brand-page .brand-statements h2 {
    font-size: clamp(1.65rem, 7vw, 1.9rem) !important;
  }

  .wiplo-track-order-page .content-layout {
    width: min(calc(100% - 28px), 920px);
    padding-block: 52px 72px;
  }
  .wiplo-track-order-page .page-hero { margin-bottom: 28px; }
  .wiplo-track-order-page .page-hero h1 { font-size: clamp(2rem, 10vw, 2.55rem) !important; }
  .wiplo-track-order-page .wiplo-public-tracking > p:first-child { margin-bottom: 18px; }
  .wiplo-track-order-page .track_order {
    grid-template-columns: 1fr;
    gap: 17px;
    padding: 24px 20px !important;
    border-radius: 22px !important;
  }
  .wiplo-track-order-page .track_order > p:first-child,
  .wiplo-track-order-page .track_order .form-row:last-of-type,
  .wiplo-track-order-page .track_order::after { grid-column: 1; }
  .wiplo-track-order-page .track_order .button { width: 100%; }
}

@media (max-width: 900px) {
  body .menu-toggle {
    order: 1 !important;
    margin-left: auto !important;
  }
  body .header-actions {
    order: 2 !important;
    margin-left: 0 !important;
  }
  body .header-actions > .wiplo-mobile-account {
    display: inline-flex !important;
  }
}

/* Very small phones: prevent horizontal pressure from actions and metadata. */
@media (max-width: 380px) {
  .section-container,
  .nature-inner,
  .footer-inner,
  .footer-bottom-inner { padding-inline: 15px; }
  .pediatrician-icons-grid { grid-template-columns: 1fr; }
  .pediatrician-icon-item span { white-space: normal; }
  .woocommerce div.product form.cart,
  .wiplo-product-card__actions { flex-direction: column; }
}
