/* Nadjito Storefront 2.7.0 responsive fixes. Loaded AFTER storefront.css. */
/* Item aside stops being sticky at 920px; keep its contact CTA reachable there. */
@media (min-width: 861px) and (max-width: 920px) {
  body .sf-buybar:not([hidden]) {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 70;
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-2) var(--space-4);
    padding-bottom: max(var(--space-2), env(safe-area-inset-bottom));
    background: var(--color-surface);
    border-top: 2px solid var(--color-divider);
    box-shadow: var(--shadow-lg);
  }
  .sf-buybar__price { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .sf-buybar__amount { color: var(--color-accent-ink); font-size: 18px; font-weight: 800; }
  .sf-buybar__title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (max-width: 480px) {
  .sf-hero__title { font-size: clamp(32px, 9vw, 42px); }
}
/* Two catalog cards at small-phone widths where content fits; one at 320px. */
@media (min-width: 375px) and (max-width: 620px) {
  body:not(.sf-list) .sf-cards:not(.sf-related .sf-cards) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
  .sf-card__pricerow { flex-wrap: wrap; }
  .sf-card__price { white-space: normal; overflow-wrap: anywhere; }
  .sf-card__meta { flex-wrap: wrap; }
}
@media (pointer: coarse) {
  .sf-viewbtn, .sf .oe-menu > summary { min-width: 44px; min-height: 44px; }
}

/* Keep the expanded mobile navigation inside the visual viewport. */
@media (max-width: 860px) {
  .sf-nav.is-open { max-height: calc(100dvh - var(--sf-header-h)); }
}
.sf-header--collapsed .sf-nav.is-open { max-height: calc(100dvh - var(--sf-header-h)); }
/* Legal service forms, without altering text or validation rules. */
.nadjito-illegal-report, .nadjito-privacy-page { min-width: 0; overflow-wrap: anywhere; }
.nadjito-illegal-report :is(input:not([type="hidden"]), select, textarea),
.nadjito-privacy-page :is(input:not([type="hidden"]), select, textarea) {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-block: 6px 12px;
  font: inherit;
}
.nadjito-illegal-report textarea, .nadjito-privacy-page textarea { resize: vertical; }
.nadjito-illegal-report button[type="submit"], .nadjito-privacy-page button[type="submit"] {
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  background: var(--color-accent-fill);
  color: var(--color-fixed-light);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
@media (max-width: 480px) {
  .nadjito-illegal-report button[type="submit"],
  .nadjito-privacy-page button[type="submit"] { width: 100%; }
}
/* iOS/Android safe-area padding for the message composer. */
@media (max-width: 899px) {
  .sf .oe-messenger.is-chat .oe-compose { padding-bottom: max(14px, env(safe-area-inset-bottom)); }
}

/* 375–599px: categories use two columns instead of eight full-width rows. */
@media (min-width: 375px) and (max-width: 599px) {
  .sf-catgrid > li { flex: 1 1 50%; min-width: 0; }
  .sf-catgrid__item { min-width: 0; min-height: 98px; padding: var(--space-3); }
  .sf-catgrid__name { font-size: clamp(14px, 3.8vw, 17px); overflow-wrap: anywhere; }
}
