/* Kahilifestyle 3.7. Scoped storefront refinements; existing brand retained. */
.kahi-bag-icon { display: none; }
@media (max-width: 900px) {
  html { scroll-padding-top: 96px; }
  #site-header { background: #fbfaf7; backdrop-filter: none; -webkit-backdrop-filter: none; }
  #site-header .menu-toggle { width: 44px; height: 44px; flex-shrink: 0; }
  #open-cart { position: relative; min-width: 48px; min-height: 44px; padding: 8px; gap: 0; border-radius: 50%; }
  #open-cart .kahi-bag-icon { display: block; width: 24px; height: 24px; }
  #open-cart #cart-count { position: absolute; top: -3px; right: -5px; min-width: 20px; height: 20px; padding: 0 4px; font-size: 11px; border: 2px solid #fbfaf7; }
  #site-header nav { overflow-y: auto; overscroll-behavior: contain; min-height: 0; padding-bottom: max(24px, env(safe-area-inset-bottom)); }
  #site-header nav a { padding: 14px 0; min-height: 48px; font-size: 1.6rem; }
  body.menu-open #toast, body:has(dialog[open]) #toast { display: none; }
  .offer-floating-wrap { display: none !important; }
  #floating-whatsapp { width: 52px; min-width: 52px; height: 52px; min-height: 52px; padding: 0; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); border: 0; gap: 0; border-radius: 50%; box-shadow: 0 4px 16px rgba(31,45,27,.16); transform: none; }
  #floating-whatsapp .wa-icon-wrap { width: 52px; height: 52px; flex-basis: 52px; box-shadow: none; background: #197a42; }
  #floating-whatsapp .wa-bubble-copy, #floating-whatsapp::before, #floating-whatsapp::after, #floating-whatsapp .wa-icon-wrap::before { display: none; }
  body.menu-open #floating-whatsapp, body:has(dialog[open]) #floating-whatsapp,
  body.kahi-catalog-in-view #floating-whatsapp,
  body:has(:focus-visible) #floating-whatsapp { visibility: hidden; pointer-events: none; }
  #site-header :is(a,button):focus-visible, #catalogo :is(a,button):focus-visible { outline: 3px solid var(--green-900); outline-offset: 4px; }
  #catalogo .card-image .card-media-link img { width: 100%; height: 100%; object-fit: contain; object-position: center; padding: 12px; box-sizing: border-box; transform: none; }
  #catalogo .filters { flex-wrap: wrap; overflow: visible; gap: 8px; }
  #catalogo .filters button { min-height: 44px; padding: 10px 14px; font-size: .875rem; }
  #catalogo .catalog-heading > p { display: none; }
  #catalog-note { font-size: .875rem; line-height: 1.5; margin: 12px 0 0; }
}
@media (max-width: 640px) {
  #site-header { gap: 8px; padding-left: 5%; padding-right: 5%; }
  #site-header .brand { width: clamp(130px, 39vw, 175px); }
  #catalogo { padding-top: 28px; }
  #catalogo .catalog-heading { margin-bottom: 16px; }
  #catalogo .catalog-heading h2 { font-size: clamp(1.9rem, 8vw, 2.5rem); }
  #catalogo .catalog-toolbar { padding-bottom: 16px; margin-bottom: 20px; }
  #catalogo .product-grid { grid-template-columns: minmax(0,1fr); gap: 24px; }
  #catalogo .card { padding-bottom: 20px; }
  #catalogo .card-image { height: clamp(220px, 64vw, 280px); aspect-ratio: auto; border-radius: 14px; }
  #catalogo .card-image .card-media-link { display: block; width: 100%; height: 100%; }
  #catalogo .card-image .card-media-link img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; padding: 12px; box-sizing: border-box; transform: none; }
  #catalogo .card-meta { margin-top: 12px; margin-bottom: 8px; }
  #catalogo .card h3 { font-size: 1.35rem; line-height: 1.25; margin-top: 0; margin-bottom: 8px; overflow-wrap: anywhere; }
  #catalogo .card > p { margin-top: 0; font-size: 1rem; line-height: 1.5; }
  #catalogo .card-stock { margin-top: 8px; font-size: .8rem; }
  #catalogo .card-bottom { margin-top: 12px; padding-top: 12px; gap: 12px; }
  #catalogo .card-price, #catalogo .card-price strong { font-size: 1.1rem; }
  #catalogo .card-button { min-height: 48px; font-size: .9rem; border-radius: 12px; }
  #catalogo .card-button:not(:disabled) { color: #fff; background: var(--green-900); border-color: var(--green-900); }
  #catalogo .card-button:not(:disabled):active { opacity: .85; }
  #catalogo .card-button:disabled { color: #666; background: #efede9; border-color: #d8d5ce; }
  #catalogo .services-heading { gap: 12px; margin-bottom: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  #floating-whatsapp, #site-header nav { transition: none; }
}
