/* Search, inquiry drawer and mobile product toolbar. */
.site-dialog { padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); box-shadow: 0 24px 90px rgb(20 32 23 / 18%); }
.site-dialog::backdrop { background: rgb(27 37 29 / 45%); backdrop-filter: blur(4px); }
html:has(.site-dialog[open]) { overflow: hidden; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 28px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 0; font-size: clamp(1.6rem, 3.2vw, 2.25rem); }
.dialog-close { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: transparent; font: 300 1.6rem/1 var(--font-sans); }
.dialog-close:hover { background: var(--soft); border-color: #a7b39f; }
.site-search { width: min(720px, calc(100% - 32px)); max-height: 85dvh; }
.site-search-body { padding: 24px 28px 28px; }
.site-search-body label { margin-bottom: 12px; color: var(--muted); font-size: .84rem; font-weight: 400; }
#global-search { min-height: 52px; background: var(--surface); }
#global-results { display: grid; list-style: none; margin: 18px 0 0; padding: 0; }
#global-results a { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
#global-results a:hover { background: var(--soft); }
#global-results img { width: 64px; height: 64px; object-fit: contain; }
#global-results small { display: block; margin-top: 3px; font-size: .72rem; }
#global-empty { padding-block: 20px; color: var(--muted); text-align: center; }
.inquiry-drawer { inset: 0 0 0 auto; width: min(520px, 100%); height: 100%; height: 100dvh; max-width: 100%; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; }
.inquiry-drawer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; animation: drawer-open .25s ease-out; }
@keyframes drawer-open { from { transform: translateX(100%); } to { transform: translateX(0); } }
.drawer-body { overflow: auto; padding: 20px 28px; font-size: .9rem; }
.drawer-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; border-top: 1px solid var(--line); padding: 24px 28px max(24px, env(safe-area-inset-bottom)); background: var(--surface); }
.inquiry-drawer .selection-row { grid-template-columns: minmax(0, 1fr) 72px auto; align-items: center; gap: 12px; }
.inquiry-drawer .selection-row button { grid-column: auto; }
.drawer-design { display: flex; align-items: center; gap: 12px; }
.drawer-design img { flex: 0 0 60px; width: 60px; height: 60px; object-fit: contain; }
.drawer-design span { min-width: 0; overflow-wrap: anywhere; font-size: .85rem; }
.drawer-design small { display: block; margin-top: 4px; font-size: .67rem; }
.drawer-undo { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 15px; background: var(--soft); font-size: .82rem; }
.drawer-undo button { padding: 4px; border: 0; background: none; color: var(--olive); font: inherit; text-decoration: underline; text-underline-offset: .3em; }
.basket-feedback button { display: block; padding: 5px 0 0; border: 0; background: none; color: var(--olive); font: 600 .82rem/1.5 var(--font-sans); }
.mobile-product-actions { display: none; }
.buying-faq details { scroll-margin-top: 108px; }
@media (max-width: 760px) {
  .mobile-product-actions { position: fixed; inset: auto 0 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 20px max(12px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--paper); box-shadow: 0 -4px 24px rgb(30 40 30 / 5%); }
  .mobile-product-actions .plain { min-height: 44px; padding: 0; border: 0; background: none; }
  body:has(.mobile-product-actions) { padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
  body:has(.mobile-product-actions) .basket-feedback { bottom: calc(92px + env(safe-area-inset-bottom)); }
}
@media (max-width: 480px) {
  .dialog-head { padding: 18px 20px; gap: 12px; }
  .dialog-head h2 { font-size: 1.55rem; }
  .site-search-body, .drawer-body { padding: 18px 20px; }
  .drawer-foot { padding: 20px 20px max(20px, env(safe-area-inset-bottom)); }
  .inquiry-drawer .selection-row { grid-template-columns: minmax(0, 1fr) 64px auto; gap: 8px; }
  .inquiry-drawer .selection-row input { padding-inline: 8px; }
  .inquiry-drawer .selection-row button { padding-inline: 7px; }
  .drawer-design { gap: 8px; }
  .drawer-design img { flex-basis: 40px; width: 40px; height: 40px; }
  #global-results a { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; }
  #global-results img { width: 48px; height: 48px; }
}
