/*
  VIVIDEAR Responsive Overrides
  Shared viewport adjustments loaded after all base, component, global, and page styles.
*/

/* Desktop and laptop */
@media (max-width: 1200px) {
  .container {
    width: min(100% - 80px, var(--container));
  }

  .header__bottom,
  form.search--desktop,
  .phone-block--desktop,
  .desktop-nav {
    display: none;
  }

  .header__top {
    border-bottom: 0;
  }

  .header__top-inner {
    min-height: 82px;
  }

  .header-actions {
    margin-inline-start: auto;
  }

  .mobile-toggle {
    display: inline-flex;
  }

  .hero__grid {
    grid-template-columns: 1fr;
    gap: 40px;
    min-height: auto;
  }

  .hero__visual {
    min-height: 620px;
  }

  .category-grid,
  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .trust__panel {
    grid-template-columns: repeat(3, 1fr);
  }

  .brand-panel,
  .tracking__grid,
  .guidance__grid,
  .newsletter__panel {
    grid-template-columns: 1fr;
  }

  .article-grid {
    grid-template-columns: 1fr 1fr;
  }

  .article-card--featured {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .testimonial-track {
    grid-template-columns: 1fr;
  }

  .footer__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  body {
    font-size: 17px;
    line-height: 1.62;
  }

  .container {
    width: calc(100% - 40px);
  }

  .section {
    padding: var(--section-space-mobile) 0;
  }

  .section-tight {
    padding: 48px 0;
  }

  h1 {
    font-size: 52px;
    line-height: 1.08;
  }

  h2 {
    font-size: 38px;
    line-height: 1.15;
  }

  .announcement__inner {
    justify-content: start;
    overflow-x: auto;
    gap: 24px;
    white-space: nowrap;
    scrollbar-width: none;
  }

  .announcement__inner::-webkit-scrollbar {
    display: none;
  }

  .header__top-inner {
    min-height: 76px;
    gap: 12px;
  }

  .brand {
    font-size: 21px;
  }

  .brand__mark {
    width: 40px;
    height: 40px;
  }

  .header-actions {
    gap: 8px;
  }

  .icon-action,
  .mobile-toggle {
    width: 44px;
    height: 44px;
    border-radius: 16px;
  }

  .hero {
    min-height: auto;
    padding-top: 48px;
  }

  .hero__content p,
  .section-heading p,
  .tracking p {
    font-size: 19px;
    line-height: 31px;
  }

  .hero__actions,
  .newsletter__form {
    flex-direction: column;
  }

  .btn,
  .newsletter__form input {
    width: 100%;
  }

  .hero__visual {
    min-height: 560px;
  }

  .hero__visual::before {
    inset: 42px 0 0 20px;
  }

  .hero__visual img {
    inset: 0 20px 80px 0;
    width: calc(100% - 20px);
    height: calc(100% - 80px);
    border-width: 8px;
  }

  .float-card {
    padding: 12px;
  }

  .float-card--top {
    top: 26px;
    left: 4px;
  }

  .float-card--mid {
    top: 168px;
    right: -2px;
  }

  .float-card--bottom {
    right: 12px;
    bottom: 104px;
  }

  .product-float {
    left: 8px;
    width: calc(100% - 16px);
  }

  .trust__panel,
  .category-grid,
  .brand-strip,
  .need-grid,
  .article-grid,
  .why-grid {
    grid-template-columns: 1fr;
  }

  .trust__panel {
    border-radius: var(--radius-xl);
  }

  .section-heading,
  .section-heading--left {
    margin-bottom: 36px;
    text-align: start;
  }

  .section-row {
    align-items: start;
    flex-direction: column;
  }

  .category-card {
    min-height: 300px;
  }

  .brand-panel,
  .guidance__panel,
  .newsletter__panel {
    padding: 28px;
    border-radius: var(--radius-xl);
  }

  .product-track {
    grid-auto-columns: minmax(286px, 88vw);
  }

  .product-card h3 {
    min-height: auto;
  }

  .need-card {
    min-height: 260px;
  }

  .tracking {
    width: calc(100% - 20px);
    border-radius: var(--radius-xl);
  }

  .tracking__grid {
    gap: 40px;
  }

  .tracking__panel {
    padding: 12px;
    border-radius: var(--radius-lg);
  }

  .tracking-card {
    padding: 20px;
    border-radius: var(--radius-lg);
  }

  .tracking-card__top {
    grid-template-columns: 60px 1fr;
  }

  .tracking-card__top span {
    grid-column: 1 / -1;
  }

  .article-card--featured .article-card__image {
    height: 260px;
  }

  .related-products article {
    grid-template-columns: 78px 1fr;
  }

  .related-products a {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .mini-product {
    width: 78px;
    height: 78px;
  }

  .compare .section-row .btn {
    width: auto;
  }

  .newsletter__form input {
    width: 100%;
  }

  .footer {
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    padding-top: 52px;
  }

  .footer__bottom {
    flex-direction: column;
  }

  .testimonial-track {
    grid-auto-flow: column;
    grid-auto-columns: minmax(286px, 88vw);
    grid-template-columns: none;
    overflow-x: auto;
    padding-bottom: 16px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
  }

  .testimonial-card {
    scroll-snap-align: start;
  }
}

@media (max-width: 520px) {
  .mobile-menu {
    width: calc(100vw - 20px);
    padding: 20px;
    border-start-start-radius: var(--radius-lg);
    border-start-end-radius: 0;
    border-end-end-radius: 0;
    border-end-start-radius: var(--radius-lg);
  }

  .mobile-menu__header .brand {
    font-size: 19px;
  }

  .mobile-menu__header .brand__mark {
    width: 38px;
    height: 38px;
  }

  h1 {
    font-size: 42px;
    line-height: 1.12;
  }

  h2 {
    font-size: 34px;
  }

  .hero__visual {
    min-height: 520px;
  }

  .float-card--mid {
    top: 155px;
  }

  .float-card--bottom {
    bottom: 116px;
  }

  .float-card strong,
  .product-float strong {
    font-size: var(--font-size-sm);
  }

  .product-float__image {
    flex-basis: 68px;
    width: 68px;
    height: 68px;
  }
}
