html {
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
  scroll-padding-top: 1rem;
}

body {
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
}

img,
video,
iframe,
svg {
  max-width: 100%;
}

img,
video {
  height: auto;
}

button,
input,
select,
textarea {
  max-width: 100%;
  touch-action: manipulation;
}

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #d86e51;
  outline-offset: 2px;
}

.site-header,
.site-footer,
main,
header,
section,
aside,
article,
nav {
  min-width: 0;
}

.section-wrap,
.product-page,
.carrier-page,
.stroller-page,
.robot-page,
.carseat-page,
.tricycle-page,
.sleep-page,
.scooter-intro,
.scooter-products,
.scooter-disclaimer {
  width: 100%;
  min-width: 0;
}

.product-grid,
.carrier-grid,
.stroller-grid,
.robot-grid,
.carseat-grid,
.tricycle-grid,
.sleep-grid,
.scooter-grid {
  min-width: 0;
}

.product-card,
.carrier-card,
.stroller-card,
.robot-card,
.carseat-card,
.tricycle-card,
.sleep-card,
.scooter-card {
  min-width: 0;
  overflow-wrap: anywhere;
}

.product-card img,
.carrier-card img,
.stroller-card img,
.robot-card img,
.carseat-card img,
.tricycle-card img,
.sleep-card img,
.scooter-card img {
  max-width: 100%;
}

.order-page,
.order-card,
.order-layout,
.admin-main,
.admin-dashboard,
.admin-orders,
.admin-thread,
.admin-order-detail {
  min-width: 0;
}

.order-summary__item,
.payment-totals span,
.tracking-route,
.bank-details,
.site-footer__main,
.admin-orders:not([hidden]) {
  min-width: 0;
}

@media (max-width: 760px) {
  .category-pill,
  .subcategory-pills button,
  .action-button,
  .cart-chat__launcher,
  .site-footer__links a,
  .site-footer__links button,
  .legal-page__back,
  .order-back,
  .admin-conversation,
  .admin-order-entry {
    min-height: 2.75rem;
  }

  .header-main {
    min-width: 0;
  }

  .site-header--legal .header-main {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.5rem;
  }

  .site-header--legal .brand {
    justify-self: start;
  }

  .site-header--legal .order-back,
  .site-header--legal .action-button {
    white-space: nowrap;
  }

  .hero {
    min-height: 0;
    height: clamp(390px, 72svh, 590px);
  }

  .hero__content {
    max-width: min(510px, calc(100% - 40px));
  }

  .hero h1 {
    font-size: clamp(2.5rem, 10vw, 3.25rem);
  }

  .section-wrap,
  .product-page,
  .carrier-page,
  .stroller-page,
  .robot-page,
  .carseat-page {
    padding-inline: clamp(1rem, 4.5vw, 1.5rem);
  }

  .tricycle-page,
  .sleep-page {
    padding-inline: clamp(0.875rem, 4vw, 1.5rem);
  }

  .product-detail {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-info {
    position: static;
  }

  .product-info h1,
  .stroller-intro h1,
  .robot-intro h1,
  .carseat-intro h1,
  .carrier-intro h1,
  .tricycle-hero h1,
  .sleep-hero h1,
  .scooter-hero h1 {
    font-size: clamp(2rem, 8vw, 2.75rem);
    overflow-wrap: anywhere;
  }

  .order-header {
    padding-inline: clamp(1rem, 4vw, 1.5rem);
  }

  .order-page {
    padding-inline: clamp(0.875rem, 4vw, 1.5rem);
  }

  .order-steps {
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: clamp(0.625rem, 2.4vw, 0.75rem);
  }

  .order-form__row,
  .order-form__row--city {
    grid-template-columns: minmax(0, 1fr);
  }

  .order-card,
  .order-summary {
    padding: clamp(1rem, 4vw, 1.5rem);
  }

  .bank-details {
    grid-template-columns: minmax(0, 1fr);
  }

  .bank-details > div:last-child {
    grid-column: auto;
  }

  .order-primary--link {
    width: 100%;
    max-width: 100%;
  }

  .payment-option {
    min-height: 3.25rem;
    grid-template-columns: 2.5rem minmax(0, 1fr) 1rem;
    padding: 0.75rem;
  }

  .admin-header {
    padding-inline: 1rem;
  }

  .admin-main {
    padding: 1rem 0.75rem;
  }

  .admin-dashboard {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .admin-thread > header,
  .admin-order-detail {
    overflow-wrap: anywhere;
  }

  .admin-messages,
  .cart-chat__messages {
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .cart-chat__window {
    right: max(0.625rem, env(safe-area-inset-right));
    bottom: max(4.5rem, env(safe-area-inset-bottom));
    width: min(30rem, calc(100vw - 1.25rem));
    height: min(34rem, calc(100dvh - 5.25rem - env(safe-area-inset-top)));
    max-height: calc(100dvh - 5.25rem - env(safe-area-inset-top));
  }
}

@media (max-width: 480px) {
  .product-grid,
  .carrier-grid,
  .stroller-grid,
  .robot-grid,
  .carseat-grid,
  .tricycle-grid,
  .sleep-grid,
  .scooter-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
  }

  .product-card__image {
    aspect-ratio: 1 / 1;
  }

  .product-card__meta {
    display: flex;
  }

  .product-card__meta h3 {
    min-height: 0;
    font-size: 1rem;
  }

  .product-price {
    margin-top: 0;
  }

  .stroller-card__footer,
  .robot-card__footer,
  .carseat-card__footer,
  .carrier-card__footer {
    align-items: center;
    flex-direction: row;
  }

  .stroller-card__add,
  .robot-card__add,
  .carseat-card__add,
  .carrier-card__add {
    width: auto;
    min-height: 2.75rem;
    padding-inline: 0.75rem;
    font-size: 0.75rem;
  }

  .stroller-card__description,
  .robot-card__description,
  .carseat-card__description,
  .carrier-card__description {
    min-height: 0;
    font-size: 0.75rem;
  }

  .tricycle-card__top {
    display: flex;
  }

  .tricycle-card__price {
    margin: 0;
  }

  .tricycle-card h3,
  .sleep-card h3,
  .scooter-card h3 {
    font-size: 1.25rem;
  }

  .tricycle-card__body,
  .sleep-card__body {
    padding: 1rem;
  }

  .tricycle-card__buy,
  .sleep-card__buy,
  .scooter-add {
    min-height: 2.75rem;
    font-size: 0.75rem;
  }

  .tricycle-section-heading,
  .sleep-section-heading,
  .scooter-section-heading,
  .carrier-section-heading,
  .stroller-section-heading,
  .robot-section-heading,
  .carseat-section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.5rem;
  }

  .closing-note {
    align-items: flex-start;
    flex-direction: column;
    padding: 1.5rem 1.25rem;
  }

  .closing-note__message {
    font-size: clamp(1.25rem, 5.5vw, 1.625rem);
  }

  .site-footer__main {
    grid-template-columns: minmax(0, 1fr);
  }

  .site-footer__about {
    grid-column: auto;
  }

  .site-footer__legal,
  .site-footer__links {
    min-width: 0;
  }

  .site-footer__bottom {
    overflow-wrap: anywhere;
  }

  .cookie-consent {
    max-height: calc(100dvh - 1.5rem - env(safe-area-inset-top));
    overflow-y: auto;
    padding: 1rem;
  }

  .cookie-consent__actions {
    flex-direction: column;
  }

  .cookie-consent__actions button {
    width: 100%;
    min-height: 2.75rem;
    font-size: 0.75rem;
  }

  .admin-dashboard {
    grid-template-columns: minmax(6.5rem, 36%) minmax(0, 1fr);
  }

  .admin-orders:not([hidden]) {
    grid-template-columns: minmax(6.5rem, 36%) minmax(0, 1fr);
  }
}

@media (max-width: 360px) {
  .header-main {
    grid-template-columns: 2.5rem minmax(0, 1fr) auto;
    padding-inline: 0.625rem;
  }

  .header-main > .brand {
    gap: 0.35rem;
  }

  .brand__mark {
    font-size: 1.75rem;
  }

  .brand__name {
    font-size: 0.75rem;
  }

  .brand__name span {
    font-size: 0.6875rem;
  }

  .header-actions {
    gap: 0.625rem;
  }

  .search-bar {
    margin-inline: 0.625rem;
    gap: 0.375rem;
    padding-inline: 0.5rem;
  }

  .search-bar button {
    padding-inline: 0.5rem;
    font-size: 0.6875rem;
  }

  .product-card__meta {
    flex-wrap: wrap;
  }

  .order-steps span {
    font-size: 0.625rem;
  }

  .payment-option {
    grid-template-columns: 2rem minmax(0, 1fr) 0.75rem;
    gap: 0.5rem;
  }

  .payment-option__icon {
    width: 2rem;
    height: 2rem;
  }

  .payment-option strong {
    font-size: 0.75rem;
  }

  .payment-option small {
    font-size: 0.6875rem;
  }

  .admin-header {
    gap: 0.5rem;
    padding-inline: 0.625rem;
  }

  .admin-brand {
    gap: 0.375rem;
    font-size: 1.125rem;
  }

  .admin-brand span {
    font-size: 0.625rem;
  }

  .admin-header button {
    padding: 0.5rem;
    font-size: 0.6875rem;
  }
}

@media (max-width: 760px) {
  input,
  select,
  textarea {
    font-size: 16px !important;
  }

  .button,
  .order-primary,
  .payment-option,
  .quick-add,
  .tricycle-carousel__controls button,
  .sleep-carousel__controls button,
  .gallery-control,
  .gallery-pause,
  .product-gallery-controls button,
  .password-toggle,
  .cart-chat__close,
  .cart-chat__form button,
  .admin-nav button,
  .admin-order-detail button,
  .admin-receipt-link {
    min-height: 2.75rem;
  }

  .quick-add {
    width: 2.75rem;
    height: 2.75rem;
  }

  .gallery-control,
  .gallery-pause,
  .product-gallery-controls button,
  .tricycle-carousel__controls button,
  .sleep-carousel__controls button {
    width: 2.75rem;
    min-width: 2.75rem;
    height: 2.75rem;
  }
}

@media (max-width: 480px) {
  .product-card__meta p,
  .product-card__meta h3,
  .product-price,
  .product-tag,
  .carrier-card__eyebrow,
  .stroller-card__eyebrow,
  .robot-card__eyebrow,
  .carseat-card__eyebrow,
  .carrier-card__brand,
  .stroller-card__age,
  .robot-card__specs,
  .carseat-card__spec,
  .tricycle-card__tag,
  .tricycle-card__features li,
  .sleep-card__tag,
  .sleep-card__features li,
  .scooter-card__index,
  .scooter-card__age {
    font-size: max(0.75rem, 12px);
  }

  .legal-page p,
  .legal-page li {
    font-size: 0.875rem;
  }
}
