/* Public pages only. Desktop and admin layouts do not use these overrides. */
@media (max-width: 760px) {
  :root {
    --mobile-copy-size: 16px;
    --mobile-label-size: 14px;
  }

  :root body {
    font-size: var(--mobile-copy-size);
  }

  :root body h1,
  :root body .hero-title {
    font-size: clamp(26px, 7vw, 30px);
    line-height: 1.2;
    white-space: normal;
    overflow-wrap: break-word;
  }

  :root body h2,
  :root body .section-title,
  :root body .hero-proof-grid > .hero-proof-card:first-child h2 {
    font-size: 22px;
    line-height: 1.3;
  }

  :root body h3 {
    font-size: 20px;
    line-height: 1.3;
  }

  :root body p:not(.name):not(.sub),
  :root body :is(.lead, .section-sub, .hero-copy, .product-summary, .product-copy-body,
    .spec-value, .home-step-list li, .home-focus-item, .home-detail-copy,
    .contact-list li, .hours-list li, .result-list, .auth-copy) {
    font-size: var(--mobile-copy-size);
    line-height: 1.65;
    overflow-wrap: break-word;
  }

  :root body :is(label, small, .note, .price-note, .stock-note, .filter-meta,
    .price-check-note, .price-subline, .price-result-next, .spec-label, .spec-note,
    .product-config-note, .repair-logistics-auth-hint, .special-repair-note,
    .estimate-sub, .photo-note, .home-service-sub, .home-category-copy,
    .checkout-entry-copy, .checkout-account-hint, .cookie-banner__option-text) {
    font-size: var(--mobile-label-size);
    line-height: 1.5;
  }

  :root body :is(.quick-points, .price-help-list, .price-result-list,
    .repair-logistics-points, .special-repair-list, .mini-step,
    .home-video-points, .home-focus-item, .home-detail-list) :is(span, strong),
  :root body .hero-rating-inline span {
    font-size: 14px;
    line-height: 1.5;
  }

  :root body .hero-proof-list li {
    display: block;
    position: relative;
    padding-inline-start: 24px;
    font-size: 16px;
    line-height: 1.55;
  }

  :root body .hero-proof-list li::before {
    position: absolute;
    inset-inline-start: 0;
    top: 4px;
  }

  :root body .hero-proof-list li span {
    display: inline;
  }

  /* Native Safari selects otherwise ignore padding and remain about 24px tall. */
  :root body :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea) {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    min-height: 48px;
    font-size: 16px;
    line-height: 1.4;
    border-radius: 14px;
  }

  :root body select:not([multiple]):not([size]) {
    -webkit-appearance: none;
    appearance: none;
    padding: 12px 42px 12px 14px;
    background-image: linear-gradient(45deg, transparent 50%, #657480 50%), linear-gradient(135deg, #657480 50%, transparent 50%);
    background-position: calc(100% - 22px) 50%, calc(100% - 17px) 50%;
    background-size: 5px 5px;
    background-repeat: no-repeat;
  }

  :root[dir="rtl"] body select:not([multiple]):not([size]) {
    padding: 12px 14px 12px 42px;
    background-position: 17px 50%, 22px 50%;
  }

  :root body :is(.primary-btn, .secondary-btn, .submit-btn, .buy-btn, .add-btn,
    .price-brand-btn, .special-repair-btn, .hero-action, .home-panel-action,
    .home-energy-button, .checkout-choice-btn, .auth-submit-btn, .contact-link,
    .back-link, .modal-close, .auth-password-toggle, .cookie-banner__button,
    .cookie-banner__link, .qty-btn, .topbar-category-toggle) {
    min-height: 44px;
    font-size: 15px;
    line-height: 1.4;
  }

  :root body :is(.hero-action, .primary-btn, .secondary-btn, .submit-btn, .buy-btn, .add-btn) {
    min-height: 48px;
  }

  :root body .qty-btn {
    min-width: 44px;
  }

  :root body :is(.modal-close, .energy-fab__close) {
    min-width: 44px;
    min-height: 44px;
    font-size: 22px;
  }

  :root body .filter-pill {
    min-height: 44px;
    padding: 10px 13px;
    font-size: 14px;
    line-height: 1.4;
  }

  :root body .filter-pill-search-input {
    width: 100%;
    min-height: 0;
    padding: 0;
    transform: none;
    font-size: 16px;
    line-height: 1.4;
  }

  :root body .filter-pill-search {
    min-height: 48px;
    height: auto;
    align-items: center;
  }

  :root body .repair-check-option {
    min-width: 0;
    min-height: 60px;
    font-size: 14px;
    line-height: 1.4;
    letter-spacing: 0;
    hyphens: auto;
  }

  :root body .repair-check-option span {
    min-width: 0;
    font-size: inherit;
    line-height: inherit;
    overflow-wrap: anywhere;
  }

  :root body :is(.price-check-card, .price-result-card) {
    padding: 20px 16px;
  }

  :root body .price-brand-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  :root body .price-brand-request {
    grid-column: 1 / -1;
  }

  :root body :is(.shop-products-title-row, .hero-offer-head) {
    flex-wrap: wrap;
    align-items: center;
  }

  :root body .shop-products-count {
    font-size: 14px;
  }

  :root body .hero-offer-card-inline {
    height: auto;
    min-height: 0;
    max-height: none;
    grid-template-rows: auto;
    gap: 14px;
    padding-bottom: 16px;
  }

  :root body .hero-offer-card-inline .hero-offer-copy h2 {
    font-size: 20px;
    line-height: 1.35;
  }

  :root body .hero-offer-card-inline .hero-offer-link {
    min-height: 44px;
    margin-inline-end: 48px;
    font-size: 14px;
    line-height: 1.5;
  }

  :root body .hero-offer-close {
    width: 44px;
    height: 44px;
    right: 10px;
    bottom: 16px;
  }

  :root body .product-card h3 {
    font-size: 18px;
    line-height: 1.4;
  }

  :root body .product-category {
    font-size: 12px;
  }

  :root body .topbar-inner {
    width: calc(100% - 24px);
    min-height: 60px;
    gap: 8px;
  }

  :root body .topbar .brand {
    flex: 1 1 auto;
    min-width: 0;
    gap: 8px;
  }

  :root body .topbar .brand-icon {
    width: 34px;
    height: 38px;
    flex: 0 0 34px;
  }

  :root body .topbar .brand .name {
    font-size: clamp(14px, 4vw, 18px);
    letter-spacing: 0;
    white-space: nowrap;
  }

  :root body .hamburger {
    flex: 0 0 44px;
    width: 44px;
    min-height: 44px;
    margin-inline-start: auto;
    padding: 8px;
  }

  :root body .main-nav a {
    min-height: 44px;
    font-size: 16px;
    line-height: 1.4;
  }

  :root body .main-nav.open {
    top: 100%;
    max-height: calc(100dvh - 76px);
    overflow-y: auto;
  }

  /* Keep the cart in the header, not floating over offers or products. */
  :root body:has(.shop-cart-dock) .topbar .brand .name {
    font-size: clamp(12px, 3.3vw, 16px);
  }

  :root body:has(.shop-cart-dock) .hamburger {
    margin-inline-start: 52px;
  }

  :root body .shop-cart-dock {
    top: 8px;
    /* Overrides the older !important positioning injected by cookie-banner.js. */
    right: 64px !important;
    left: auto;
    width: 44px;
    z-index: 121;
  }

  :root body .shop-cart-dock .shop-cart-dock-shell {
    display: flex;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    border-radius: 14px;
    background: #eef7f5;
    box-shadow: none;
  }

  :root body .shop-cart-dock .shop-cart-dock-panel {
    display: none;
  }

  :root body .shop-cart-dock .shop-cart-dock-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  :root body .shop-cart-dock .shop-cart-dock-icon svg {
    width: 26px !important;
    height: 26px !important;
  }

  :root body .shop-cart-dock .cart-count {
    top: 0;
    left: auto;
    right: -4px;
    transform: none;
    min-width: 20px;
    width: auto;
    height: 20px;
    padding: 0 4px;
    font-size: 11px;
  }

  :root[dir="rtl"] body .shop-cart-dock {
    right: auto !important;
    left: 64px;
  }

  :root body .energy-fab {
    top: auto;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    left: 12px;
    transform: none;
  }

  :root body:has(.energy-fab) {
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }

  :root body .energy-fab__panel {
    top: auto;
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    left: 12px;
    width: calc(100vw - 24px);
    transform: translateY(8px);
  }

  :root body .energy-fab.is-open .energy-fab__panel {
    transform: none;
  }

  :root body footer {
    font-size: 14px;
    line-height: 1.6;
  }

  :root body footer :is(.legal-links a, .footer-language-switcher a, .social-link) {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    min-width: 44px;
    font-size: 14px;
  }

  :root body footer :is(.social-label, .footer-credit, .footer-language-switcher__label, .payment-footer-label) {
    font-size: 13px;
    white-space: normal;
  }

  :root body .cookie-banner__title {
    font-size: 18px;
    line-height: 1.4;
  }

  :root body .cookie-banner__card {
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

@media (max-width: 360px) {
  :root body .repair-check-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
