/* Pharma Clean tablet styles. Loaded after styles.css and before mobile.css. */

@media (min-width: 641px) and (max-width: 1024px) {
  :root {
    --shell: min(100vw - 44px, 880px);
  }

  body {
    overflow-x: hidden;
  }

  .topbar {
    display: none;
  }

  .topbar-inner,
  .site-header {
    padding-inline: 22px;
  }

  .topbar-inner {
    width: calc(100% - 44px);
    min-height: 38px;
    gap: 10px;
  }

  .topbar-nav,
  .top-actions {
    display: none;
  }

  .site-header {
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 56px;
    height: 56px;
    gap: 10px;
    padding: 0 22px;
    grid-template-columns: none;
  }
  /* Keep tablet header flush while scrolling. */
  .site-header.is-scrolled,
  .site-header[data-reveal],
  .site-header[data-reveal].is-visible,
  body.nav-condensed .site-header,
  body.nav-condensed .site-header[data-reveal],
  body.nav-condensed .site-header[data-reveal].is-visible,
  body.nav-idle-condensed .site-header,
  body.nav-idle-condensed .site-header[data-reveal],
  body.nav-idle-condensed .site-header[data-reveal].is-visible {
    top: 0;
  }

  .brand {
    order: 0;
    flex: 0 0 auto;
    justify-self: auto;
    display: flex;
    align-items: center;
    height: 100%;
  }

  .brand img {
    display: block;
    width: 122px;
    height: auto;
  }

  .main-nav a {
    min-height: 30px;
    padding-inline: 7px;
    font-size: 11.5px;
  }

  .main-nav {
    justify-content: flex-end;
  }

  .hero {
    min-height: 78svh;
    padding-top: 104px;
    padding-bottom: 10px;
    background-position: right top;
    background-size: cover;
  }

  .inner-hero,
  .productos-hero,
  .catalogo-hero,
  .maquila-hero,
  .solutions-hero {
    min-height: 78svh;
    display: flex;
    align-items: flex-end;
    padding-top: 112px;
    padding-bottom: 14px;
    background-position: right top;
    background-size: cover;
  }

  .inner-hero-grid {
    width: 100%;
    align-items: end;
  }

  .hero-copy,
  .inner-hero-copy,
  .productos-hero-copy,
  .catalogo-hero-copy,
  .maquila-hero-copy,
  .solutions-hero-copy {
    max-width: 600px;
  }

  .solutions-hero-copy,
  .productos-hero-copy,
  .catalogo-hero-copy,
  .maquila-hero-copy {
    padding: clamp(18px, 3vw, 30px) 0 clamp(18px, 3vw, 30px) 15px;
  }

  .hero h1,
  .inner-hero h1,
  .productos-hero h1,
  .catalogo-hero h1,
  .maquila-hero h1 {
    font-size: clamp(38px, 6.4vw, 58px);
  }

  .inner-hero .inner-lead {
    max-width: 520px;
    font-size: clamp(17px, 2vw, 21px);
  }

  .split,
  .split.reverse {
    grid-template-columns: minmax(0, 1fr);
  }

  .private-panel {
    grid-template-columns: minmax(0, 0.94fr) minmax(300px, 0.76fr);
    gap: 26px;
    padding: 34px;
  }

  .b2b .split {
    grid-template-columns: minmax(0, 0.92fr) minmax(300px, 0.78fr);
    align-items: center;
    gap: 28px;
  }

  .paths .path-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 26px;
  }

  .path-card {
    padding: 20px;
  }

  .private-action img {
    aspect-ratio: 16 / 10;
  }

  .b2b .image-stage {
    min-height: 0;
    height: clamp(260px, 34vw, 360px);
    aspect-ratio: 4 / 3;
    border-radius: 10px;
  }

  .b2b .image-stage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .b2b h2 {
    max-width: 13em;
    font-size: clamp(30px, 4.2vw, 42px);
    line-height: 1.02;
  }

  .b2b .split > div > p {
    max-width: 34em;
    margin-top: 16px;
    font-size: 16px;
    line-height: 1.55;
  }

  .b2b .pill-grid {
    gap: 8px;
    margin-top: 20px;
  }

  .b2b .pill-grid span {
    padding: 9px 11px;
    font-size: 12.5px;
    line-height: 1.15;
  }

  .product-list-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  /* Product page tablet grids. */
  .family-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
  }

  .family-card {
    padding: clamp(16px, 2.1vw, 22px);
    min-height: auto;
  }

  .family-card span {
    font-size: clamp(32px, 4vw, 48px);
  }

  .family-card h3 {
    font-size: clamp(17px, 2.1vw, 22px);
    line-height: 1.08;
  }

  .family-card p,
  .family-card strong {
    font-size: clamp(12px, 1.45vw, 14px);
    line-height: 1.45;
  }

  .product-list-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }

  .product-card {
    padding: clamp(14px, 1.8vw, 18px);
  }

  .product-card-visual {
    min-height: 0;
    height: clamp(190px, 25vw, 250px);
  }

  .product-card h3 {
    font-size: clamp(18px, 2.1vw, 22px);
  }

  .product-card p {
    font-size: clamp(13px, 1.55vw, 15px);
  }
  /* Tablet three-up grids: keep strategic 3-card sections in one row. */
  .route-grid,
  .stats-grid,
  .process-grid,
  .catalog-flow {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(14px, 2vw, 22px);
  }

  .route-card,
  .stats-grid article,
  .process-grid article,
  .catalog-flow article {
    min-height: auto;
    padding: clamp(18px, 2.6vw, 28px);
  }

  .route-card span,
  .process-grid span,
  .catalog-flow span {
    font-size: clamp(34px, 5vw, 52px);
  }

  .stats-grid strong {
    font-size: clamp(34px, 5vw, 54px);
  }

  .route-card h3,
  .process-grid h3,
  .catalog-flow h3 {
    font-size: clamp(18px, 2.4vw, 24px);
    line-height: 1.06;
  }

  .route-card p,
  .process-grid p,
  .catalog-flow p {
    font-size: clamp(13px, 1.65vw, 16px);
    line-height: 1.5;
  }
  .private-action img {
    width: 100%;
    height: clamp(230px, 30vw, 330px);
    object-fit: cover;
  }

  .logistics-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  .national-delivery,
  .delivery-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    gap: 18px;
    padding: 24px;
  }

  .national-delivery h2,
  .delivery-copy h2 {
    font-size: clamp(26px, 3.2vw, 34px);
    line-height: 1.05;
  }

  .national-delivery p:not(.eyebrow),
  .delivery-copy p:not(.eyebrow) {
    font-size: 14.5px;
    line-height: 1.48;
  }

  .national-visual img,
  .delivery-visual img {
    height: clamp(220px, 29vw, 300px);
  }
  .brand {
    order: 0;
    flex: 0 0 auto;
    justify-self: auto;
    display: flex;
    align-items: center;
    height: 100%;
  }

  .header-social-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex: 0 0 auto;
    margin-left: auto;
  }

  .header-social-links .icon-btn {
    width: 30px;
    height: 30px;
    min-width: 30px;
    color: var(--ink-soft);
    background: rgba(255, 255, 255, 0.62);
    box-shadow: inset 0 0 0 1px rgba(5, 183, 215, 0.16);
  }

  .header-social-links .icon-btn svg {
    width: 15px;
    height: 15px;
  }

  .main-nav {
    order: 0;
    grid-column: auto;
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    justify-self: auto;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 3px;
    overflow-x: auto;
    padding-bottom: 0;
    scrollbar-width: none;
  }

  .main-nav::-webkit-scrollbar {
    display: none;
  }

  .main-nav a {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 6px 7px;
    font-size: 11.8px;
    line-height: 1;
    white-space: nowrap;
  }

  .quick-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .quick-strip article {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    min-height: 126px;
    padding: 18px 12px;
    text-align: center;
  }

  .quick-strip .quick-icon {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    min-width: 0;
    margin: 0 auto;
    padding: 0;
    color: #087bb5;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0;
    box-shadow: none !important;
  }

  .quick-strip .quick-icon svg {
    display: block;
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .quick-strip .quick-icon svg circle {
    fill: currentColor;
    stroke: none;
  }

  .quick-strip strong {
    min-width: 0;
    margin-top: 12px;
    font-size: 17px;
    line-height: 1.12;
  }

  .quick-strip article > span:not(.quick-icon) {
    min-width: 0;
    max-width: 14ch;
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.38;
  }

  @media (min-width: 641px) and (max-width: 820px) {

    .private-panel,
    .logistics-panel {
      grid-template-columns: minmax(0, 1fr);
    }

    .private-action img,
    .national-visual img,
    .delivery-visual img {
      height: clamp(220px, 48vw, 300px);
    }
    .hero {
      min-height: 74svh;
      padding-top: 92px;
      padding-bottom: 10px;
    }

    .inner-hero,
    .productos-hero,
    .catalogo-hero,
    .maquila-hero,
    .solutions-hero {
      min-height: 76svh;
      padding-top: 92px;
      padding-bottom: 12px;
      background-position: right top;
    }

    .inner-hero h1,
    .productos-hero h1,
    .catalogo-hero h1,
    .maquila-hero h1,
    .solutions-hero h1 {
      font-size: clamp(34px, 6.8vw, 50px);
    }

    .solutions-hero-copy,
    .productos-hero-copy,
    .catalogo-hero-copy,
    .maquila-hero-copy {
      max-width: 540px;
      padding: 14px 0 14px 15px;
    }

    .b2b .split {
      grid-template-columns: minmax(0, 1fr);
      gap: 24px;
    }

    .b2b .image-stage {
      height: clamp(230px, 48vw, 310px);
      aspect-ratio: 16 / 10;
    }

    .paths .path-grid {
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 14px;
      margin-top: 22px;
    }

    .path-card {
      padding: 16px;
    }

    .path-card h3 {
      font-size: clamp(18px, 2.8vw, 22px);
    }

    .path-card p {
      font-size: clamp(12.5px, 1.9vw, 14px);
    }
    .site-header {
      height: 54px;
      min-height: 54px;
      gap: 8px;
      padding-inline: 12px;
    }

    .brand img {
      width: 112px;
    }

    .header-social-links {
      gap: 3px;
    }

    .header-social-links .icon-btn {
      width: 26px;
      height: 26px;
      min-width: 26px;
    }

    .header-social-links .icon-btn svg {
      width: 13px;
      height: 13px;
    }

    .main-nav a {
      min-height: 30px;
      padding-inline: 7px;
      font-size: 11.5px;
    }
  }
}