.search-autocomplete-root{position:relative}.search-suggestions{position:absolute;z-index:180;top:calc(100% + 8px);right:0;left:0;max-height:min(480px,70vh);overflow-y:auto;padding:8px;border:1px solid var(--line,#e5e7eb);border-radius:18px;background:var(--surface,#fff);box-shadow:0 22px 60px rgba(15,23,42,.18)}.search-suggestions[hidden]{display:none!important}.suggestion-caption{padding:7px 10px;color:var(--muted,#6b7280);font-size:13px;font-weight:900}.suggestion-item{width:100%;min-height:58px;display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:10px;padding:8px 10px;border:0;border-radius:13px;background:transparent;color:var(--text,#111827);text-align:right}.suggestion-item:hover,.suggestion-item.is-active{background:var(--red-50,#fff1f2)}.suggestion-icon{width:42px;height:42px;border-radius:13px;display:grid;place-items:center;background:var(--surface-3,#f3f4f6);font-size:20px}.suggestion-copy{min-width:0}.suggestion-copy strong,.suggestion-copy small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.suggestion-copy small{color:var(--muted,#6b7280);margin-top:2px}.suggestion-arrow{color:var(--muted,#6b7280)}.suggestion-all{min-height:42px;margin-top:5px;border-radius:12px;display:grid;place-items:center;background:var(--red-50,#fff1f2);color:var(--red-800,#991b1b);font-weight:900}.suggestion-empty{padding:18px 12px;text-align:center}.suggestion-empty strong,.suggestion-empty span{display:block}.suggestion-empty span{margin-top:4px;color:var(--muted,#6b7280)}
.search-page-header-form button{border:0;background:transparent;color:var(--red-800,#991b1b);font-weight:900}.search-hero{padding:44px 0 34px;background:radial-gradient(circle at 85% 25%,rgba(189,31,37,.1),transparent 28%),linear-gradient(180deg,var(--surface-2,#f9fafb),transparent)}.search-hero h1{margin:7px 0;font-size:clamp(34px,5vw,58px);line-height:1.16}.search-hero p{margin:0;color:var(--muted,#6b7280)}.hero-global-search{position:relative;width:min(100%,820px);min-height:64px;margin-top:20px;padding:7px 8px 7px 16px;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;border:1px solid var(--line,#e5e7eb);border-radius:20px;background:var(--surface,#fff);box-shadow:0 14px 45px rgba(15,23,42,.08)}.hero-global-search>span{font-size:24px;color:var(--muted,#6b7280)}.hero-global-search input{width:100%;border:0;outline:0;background:transparent;color:var(--text,#111827);font:inherit;font-size:17px}.search-tabs-shell{position:sticky;top:78px;z-index:35;padding-top:14px}.search-type-tabs{display:flex;gap:8px;overflow-x:auto;padding:9px;border:1px solid var(--line,#e5e7eb);border-radius:18px;background:var(--surface,#fff);box-shadow:0 10px 35px rgba(15,23,42,.06)}.search-type-tabs button{flex:0 0 auto;min-height:42px;padding:0 14px;border:1px solid transparent;border-radius:999px;background:transparent;color:var(--text,#111827);font-weight:900}.search-type-tabs button b{display:inline-grid;place-items:center;min-width:25px;min-height:25px;margin-right:5px;border-radius:999px;background:var(--surface-3,#f3f4f6);font-size:12px}.search-type-tabs button.is-active{background:var(--red-50,#fff1f2);color:var(--red-800,#991b1b);border-color:rgba(189,31,37,.18)}
.search-layout{display:grid;grid-template-columns:280px minmax(0,1fr);gap:20px;align-items:start;padding-top:22px;padding-bottom:48px}.search-filter-panel{position:sticky;top:154px;padding:18px;border:1px solid var(--line,#e5e7eb);border-radius:22px;background:var(--surface,#fff);box-shadow:0 10px 35px rgba(15,23,42,.05)}.filter-panel-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;padding-bottom:14px;border-bottom:1px solid var(--line,#e5e7eb)}.filter-panel-head strong,.filter-panel-head small{display:block}.filter-panel-head small{margin-top:3px;color:var(--muted,#6b7280)}.filter-panel-head button{border:0;background:transparent;color:var(--red-800,#991b1b)}.search-filter-field,.search-filter-group{display:grid;gap:7px;margin-top:15px}.search-filter-field>span,.search-filter-group>span{font-weight:900}.search-filter-field select,.price-filter-grid input,.search-toolbar select{width:100%;min-height:46px;padding:0 11px;border:1px solid var(--line,#e5e7eb);border-radius:13px;background:var(--surface-2,#f9fafb);color:var(--text,#111827);font:inherit}.price-filter-grid{display:grid;gap:7px}.search-check-row{margin-top:14px;display:grid;grid-template-columns:auto minmax(0,1fr);gap:9px;align-items:start}.search-check-row input{margin-top:5px}.search-check-row strong,.search-check-row small{display:block}.search-check-row small{color:var(--muted,#6b7280)}.search-filter-panel>.full{margin-top:18px}
.search-toolbar{min-height:70px;padding:13px 15px;border:1px solid var(--line,#e5e7eb);border-radius:18px;background:var(--surface,#fff);display:flex;align-items:center;justify-content:space-between;gap:14px}.search-toolbar strong,.search-toolbar span{display:block}.search-toolbar span{margin-top:3px;color:var(--muted,#6b7280)}.search-toolbar-actions{display:flex;align-items:end;gap:10px}.search-toolbar-actions label{display:grid;gap:4px}.filter-mobile-btn{display:none;min-height:46px;border:1px solid var(--line,#e5e7eb);border-radius:13px;background:var(--surface-2,#f9fafb);color:var(--text,#111827);padding:0 14px}.active-filter-chips{margin-top:12px;display:flex;flex-wrap:wrap;gap:7px}.active-filter-chips button{min-height:34px;border:1px solid rgba(189,31,37,.15);border-radius:999px;background:var(--red-50,#fff1f2);color:var(--red-800,#991b1b);padding:0 10px}.search-results-grid{display:grid;gap:13px;margin-top:14px}.search-result-card{display:grid;grid-template-columns:150px minmax(0,1fr) auto;gap:16px;min-height:170px;padding:14px;border:1px solid var(--line,#e5e7eb);border-radius:22px;background:var(--surface,#fff);transition:.18s}.search-result-card:hover{transform:translateY(-2px);border-color:rgba(189,31,37,.2);box-shadow:0 18px 45px rgba(15,23,42,.09)}.result-visual{border-radius:18px;min-height:140px;display:grid;place-items:center;position:relative;overflow:hidden;background:linear-gradient(135deg,rgba(189,31,37,.1),rgba(37,99,235,.1));font-size:47px}.result-type-label{position:absolute;top:9px;right:9px;min-height:28px;padding:0 9px;display:inline-flex;align-items:center;border-radius:999px;background:rgba(255,255,255,.9);color:#111827;font-size:12px;font-weight:900}.result-copy{min-width:0;padding-block:3px}.result-title-row{display:flex;align-items:flex-start;gap:8px;flex-wrap:wrap}.result-copy h2{margin:0;font-size:24px;line-height:1.35}.result-badge{min-height:27px;display:inline-flex;align-items:center;padding:0 8px;border-radius:999px;background:var(--red-50,#fff1f2);color:var(--red-800,#991b1b);font-size:12px;font-weight:900}.result-copy p{margin:8px 0;color:var(--muted,#6b7280);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.result-meta{display:flex;gap:12px;flex-wrap:wrap;color:var(--muted,#6b7280);font-size:14px}.result-tags{margin-top:10px;display:flex;gap:6px;flex-wrap:wrap}.result-tags span{padding:4px 8px;border-radius:999px;background:var(--surface-3,#f3f4f6);color:var(--muted,#6b7280);font-size:12px}.result-side{min-width:155px;display:flex;flex-direction:column;align-items:flex-end;justify-content:space-between;gap:12px}.result-price{color:var(--red-800,#991b1b);font-size:20px;font-weight:950;text-align:left}.result-view-link{min-height:42px;padding:0 13px;border-radius:13px;display:inline-flex;align-items:center;background:var(--red-700,#bd1f25);color:#fff;font-weight:900}
.search-empty-state{margin-top:14px;padding:52px 18px;border:1px solid var(--line,#e5e7eb);border-radius:22px;background:var(--surface,#fff);text-align:center}.search-empty-state>div{font-size:62px;color:var(--red-700,#bd1f25)}.search-empty-state h2{margin:8px 0 4px}.search-empty-state p{margin:0 0 16px;color:var(--muted,#6b7280)}.search-loading{display:grid;gap:12px;margin-top:14px}.search-skeleton{height:170px;border-radius:22px;background:linear-gradient(90deg,var(--surface-2,#f9fafb),var(--surface-3,#f3f4f6),var(--surface-2,#f9fafb));background-size:200% 100%;animation:search-shimmer 1.1s linear infinite}@keyframes search-shimmer{to{background-position:-200% 0}}.search-pagination{margin-top:18px;display:flex;justify-content:center;gap:7px;flex-wrap:wrap}.search-pagination button{min-width:42px;min-height:42px;border:1px solid var(--line,#e5e7eb);border-radius:12px;background:var(--surface,#fff);color:var(--text,#111827)}.search-pagination button.is-active{background:var(--red-700,#bd1f25);color:#fff}.recent-search-section{padding-bottom:50px}.recent-search-grid{display:flex;flex-wrap:wrap;gap:9px}.recent-search-grid a{min-height:42px;padding:0 14px;border:1px solid var(--line,#e5e7eb);border-radius:999px;background:var(--surface,#fff);color:var(--text,#111827);display:inline-flex;align-items:center}.filter-mobile-backdrop{position:fixed;inset:0;z-index:215;background:rgba(15,23,42,.45)}body.search-filter-open{overflow:hidden}
@media(max-width:1060px){.search-layout{grid-template-columns:1fr}.search-filter-panel{position:fixed;z-index:220;top:0;bottom:0;right:0;width:min(88vw,340px);max-height:100dvh;overflow-y:auto;border-radius:0;transform:translateX(105%);transition:transform .22s ease}body.search-filter-open .search-filter-panel{transform:translateX(0)}.filter-mobile-btn{display:inline-flex;align-items:center}}
@media(max-width:760px){.search-tabs-shell{top:68px}.search-result-card{grid-template-columns:105px minmax(0,1fr);min-height:0}.result-visual{min-height:120px}.result-side{grid-column:1/-1;min-width:0;flex-direction:row;align-items:center}.result-copy h2{font-size:20px}.search-toolbar{align-items:flex-start;flex-direction:column}.search-toolbar-actions{width:100%;justify-content:space-between}.hero-global-search{grid-template-columns:auto minmax(0,1fr);padding:10px 14px}.hero-global-search .primary-btn{grid-column:1/-1;width:100%}}
@media(max-width:520px){.search-result-card{grid-template-columns:1fr}.result-visual{min-height:150px}.result-side{grid-column:auto}.search-type-tabs{border-radius:14px}}


/* V42 — reliable search controls and full responsive results */
html,
body {
  max-width: 100%;
  overflow-x: clip;
}

.header-search-icon {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--muted, #6b7280);
  font-size: 21px;
  cursor: pointer;
}

.header-search-icon:hover,
.header-search-icon:focus-visible {
  background: var(--red-50, #fff1f2);
  color: var(--red-800, #991b1b);
}

.public-header-search,
.search-page-header-form,
.category-public-search {
  min-width: 0;
}

.public-header-search input,
.search-page-header-form input,
.category-public-search input {
  min-width: 0;
}

.search-page-header-form > span {
  display: none;
}

.search-page-header-form button[type="submit"] {
  min-width: 54px;
  min-height: 36px;
  border-radius: 11px;
  background: var(--red-50, #fff1f2);
  padding-inline: 11px;
}

.filter-head-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.filter-panel-close {
  display: none;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line, #e5e7eb) !important;
  border-radius: 11px;
  background: var(--surface-2, #f9fafb) !important;
  color: var(--text, #111827) !important;
  font-size: 22px;
}

.search-results-column,
.search-result-card,
.result-copy,
.result-title-row {
  min-width: 0;
}

.result-copy h2,
.result-copy h2 a,
.result-price {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.search-type-tabs {
  scrollbar-width: thin;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.search-filter-panel {
  scrollbar-width: thin;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 1180px) {
  .search-site-header .header-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand actions"
      "search search";
    gap: 9px 12px;
  }

  .search-site-header .header-start {
    grid-area: brand;
    min-width: 0;
  }

  .search-site-header .header-actions {
    grid-area: actions;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
  }

  .search-site-header .header-search {
    grid-area: search;
    width: 100%;
    max-width: none;
  }

  .search-site-header .menu-toggle {
    display: inline-flex !important;
  }

  .search-layout {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .search-result-card {
    grid-template-columns: 130px minmax(0, 1fr) 145px;
  }
}

@media (max-width: 1060px) {
  .search-tabs-shell {
    position: static;
  }

  .search-layout {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .search-filter-panel {
    position: fixed !important;
    z-index: 240;
    top: 0 !important;
    right: 0;
    bottom: 0;
    width: min(90vw, 360px);
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    padding: 18px;
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
    border-radius: 0;
    overflow-y: auto;
    transform: translateX(105%);
    transition: transform .22s ease;
    box-shadow: -20px 0 55px rgba(15, 23, 42, .22);
  }

  body.search-filter-open .search-filter-panel {
    transform: translateX(0);
  }

  .filter-panel-close {
    display: grid;
    place-items: center;
  }

  .filter-mobile-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .filter-mobile-backdrop {
    z-index: 230;
  }
}

@media (max-width: 920px) {
  .search-site-header {
    position: sticky;
    top: 0;
    z-index: 160;
  }

  .search-site-header .header-inner {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas:
      "brand theme post"
      "search search search";
    padding-block: 8px;
  }

  .search-site-header .header-start {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .search-site-header .menu-toggle {
    width: 40px;
    min-width: 40px;
    height: 40px;
  }

  .search-site-header .brand small {
    display: none;
  }

  .search-site-header .theme-toggle {
    grid-area: theme;
    width: 40px;
    min-width: 40px;
    height: 40px;
    padding: 0;
  }

  .search-site-header .theme-toggle .theme-text {
    display: none;
  }

  .search-site-header .auth-actions {
    display: none !important;
  }

  .search-site-header .header-actions .primary-btn {
    grid-area: post;
    width: 40px;
    min-width: 40px;
    height: 40px;
    padding: 0;
    font-size: 0;
  }

  .search-site-header .header-actions .primary-btn::after {
    content: "+";
    font-size: 25px;
    line-height: 1;
  }

  .search-site-header .header-search {
    min-height: 46px;
    margin: 0;
    border-radius: 15px;
  }

  .search-page-header-form button[type="submit"] {
    min-width: 46px;
    font-size: 0;
  }

  .search-page-header-form button[type="submit"]::after {
    content: "⌕";
    font-size: 21px;
  }

  .search-hero {
    padding: 28px 0 22px;
  }

  .search-hero h1 {
    font-size: clamp(29px, 8vw, 43px);
  }

  .hero-global-search {
    width: 100%;
  }

  .search-type-tabs {
    border-radius: 15px;
    padding: 7px;
  }

  .search-type-tabs button {
    min-height: 40px;
    padding-inline: 12px;
  }
}

@media (max-width: 760px) {
  .search-layout {
    padding-top: 14px;
    padding-bottom: 34px;
  }

  .search-toolbar {
    padding: 12px;
    gap: 12px;
    flex-direction: column;
    align-items: stretch;
  }

  .search-toolbar-actions {
    width: 100%;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: end;
  }

  .search-toolbar-actions label {
    min-width: 0;
  }

  .search-result-card {
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 12px;
    padding: 11px;
    min-height: 0;
    border-radius: 18px;
  }

  .result-visual {
    min-height: 118px;
    border-radius: 15px;
  }

  .result-copy h2 {
    font-size: 19px;
  }

  .result-copy p {
    -webkit-line-clamp: 2;
    font-size: 14px;
    margin-block: 6px;
  }

  .result-meta {
    gap: 6px 10px;
    font-size: 13px;
  }

  .result-tags {
    display: none;
  }

  .result-side {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    padding-top: 10px;
    border-top: 1px solid var(--line, #e5e7eb);
    flex-direction: row;
    align-items: center;
  }

  .result-price {
    font-size: 18px;
    text-align: right;
  }

  .result-view-link {
    min-height: 39px;
  }

  .search-skeleton {
    height: 190px;
  }

  .search-pagination {
    gap: 5px;
  }

  .search-pagination button {
    min-width: 38px;
    min-height: 38px;
  }
}

@media (max-width: 560px) {
  .search-site-header .header-inner {
    grid-template-columns: minmax(0, 1fr) 38px 38px;
  }

  .search-site-header .brand strong {
    max-width: 124px;
    font-size: 17px;
  }

  .search-site-header .brand-mark {
    width: 38px;
    height: 38px;
  }

  .search-site-header .menu-toggle {
    width: 38px;
    min-width: 38px;
    height: 38px;
  }

  .search-site-header .theme-toggle,
  .search-site-header .header-actions .primary-btn {
    width: 38px;
    min-width: 38px;
    height: 38px;
  }

  .search-hero {
    padding-top: 20px;
  }

  .breadcrumb {
    flex-wrap: wrap;
  }

  .hero-global-search {
    min-height: 0;
    padding: 9px;
    grid-template-columns: auto minmax(0, 1fr);
    border-radius: 17px;
  }

  .hero-global-search .primary-btn {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 44px;
  }

  .search-tabs-shell {
    padding-inline: 10px;
  }

  .search-layout,
  .recent-search-section {
    padding-inline: 10px;
  }

  .search-result-card {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .result-visual {
    min-height: 105px;
    font-size: 38px;
  }

  .result-type-label {
    top: 6px;
    right: 6px;
    max-width: calc(100% - 12px);
    min-height: 24px;
    padding-inline: 7px;
    font-size: 10px;
  }

  .result-copy h2 {
    font-size: 17px;
  }

  .result-meta span:nth-child(2),
  .result-meta span:nth-child(3) {
    display: none;
  }

  .result-side {
    align-items: stretch;
    flex-direction: column;
  }

  .result-view-link {
    justify-content: center;
    width: 100%;
  }

  .search-toolbar-actions {
    grid-template-columns: 1fr;
  }

  .filter-mobile-btn {
    width: 100%;
  }

  .search-suggestions {
    position: fixed;
    z-index: 300;
    top: auto;
    right: 10px;
    left: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    max-height: min(68dvh, 520px);
    border-radius: 20px;
  }
}

@media (max-width: 380px) {
  .search-result-card {
    grid-template-columns: 1fr;
  }

  .result-visual {
    aspect-ratio: 16 / 8;
    min-height: 125px;
  }

  .result-side {
    grid-column: auto;
  }

  .search-type-tabs button {
    padding-inline: 10px;
    font-size: 13px;
  }
}

/* V52 — search page mobile order, dark results visibility, and collision-free responsive panels */
.search-site-header .header-inner {
  grid-template-columns: auto minmax(280px, 1fr) auto;
}

.search-site-header .search-category-btn {
  display: inline-flex !important;
}

.search-results-column,
.search-results-grid,
.search-result-card,
.search-toolbar,
.search-type-tabs,
.search-filter-panel {
  min-width: 0;
  max-width: 100%;
}

.search-results-grid:not([hidden]) {
  display: grid !important;
  visibility: visible;
  opacity: 1;
}

html[data-theme="dark"] .search-hero {
  background:
    radial-gradient(circle at 85% 25%, rgba(220, 38, 38, .18), transparent 30%),
    linear-gradient(180deg, rgba(15, 23, 42, .96), transparent);
}

html[data-theme="dark"] .search-type-tabs,
html[data-theme="dark"] .search-filter-panel,
html[data-theme="dark"] .search-toolbar,
html[data-theme="dark"] .search-result-card,
html[data-theme="dark"] .search-empty-state,
html[data-theme="dark"] .recent-search-grid a,
html[data-theme="dark"] .search-pagination button,
html[data-theme="dark"] .search-suggestions,
html[data-theme="dark"] .hero-global-search {
  background: rgba(18, 26, 42, .97);
  border-color: rgba(148, 163, 184, .24);
  color: #f8fafc;
}

html[data-theme="dark"] .search-result-card {
  box-shadow: 0 12px 34px rgba(0, 0, 0, .18);
}

html[data-theme="dark"] .search-result-card:hover {
  border-color: rgba(248, 113, 113, .38);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .34);
}

html[data-theme="dark"] .result-copy h2,
html[data-theme="dark"] .result-copy h2 a,
html[data-theme="dark"] .search-toolbar strong,
html[data-theme="dark"] .search-empty-state h2,
html[data-theme="dark"] .search-type-tabs button,
html[data-theme="dark"] .recent-search-grid a {
  color: #f8fafc;
}

html[data-theme="dark"] .result-visual {
  background: linear-gradient(135deg, rgba(220, 38, 38, .22), rgba(37, 99, 235, .20));
  border: 1px solid rgba(148, 163, 184, .18);
}

html[data-theme="dark"] .result-type-label {
  background: rgba(15, 23, 42, .92);
  color: #f8fafc;
  border: 1px solid rgba(148, 163, 184, .22);
}

html[data-theme="dark"] .result-tags span,
html[data-theme="dark"] .search-type-tabs button b,
html[data-theme="dark"] .search-filter-field select,
html[data-theme="dark"] .price-filter-grid input,
html[data-theme="dark"] .search-toolbar select,
html[data-theme="dark"] .filter-mobile-btn {
  background: rgba(15, 23, 42, .92);
  border-color: rgba(148, 163, 184, .22);
  color: #dbe4f0;
}

html[data-theme="dark"] .search-type-tabs button.is-active,
html[data-theme="dark"] .active-filter-chips button {
  background: rgba(220, 38, 38, .20);
  border-color: rgba(248, 113, 113, .35);
  color: #fecaca;
}

html[data-theme="dark"] .result-price {
  color: #fecaca;
}

@media (max-width: 920px) {
  .search-site-header .header-inner {
    direction: ltr;
    grid-template-columns: minmax(0, 1fr) 42px 42px !important;
    grid-template-areas:
      "brand theme category"
      "search search search" !important;
    gap: 9px;
    padding-block: 8px;
  }

  .search-site-header .header-start {
    grid-area: brand;
    direction: rtl;
    justify-self: start;
    min-width: 0;
  }

  .search-site-header .header-start .brand {
    direction: rtl;
  }

  .search-site-header .theme-toggle {
    grid-area: theme;
    justify-self: center;
  }

  .search-site-header .search-category-btn {
    grid-area: category;
    justify-self: end;
    width: 42px;
    min-width: 42px;
    height: 42px;
    min-height: 42px;
    padding: 0;
  }

  .search-site-header .search-category-btn > span:last-child {
    display: none;
  }

  .search-site-header .header-search {
    grid-area: search;
    direction: rtl;
    width: 100%;
    margin: 0 0 2px;
  }

  .search-site-header .auth-actions,
  .search-site-header .header-actions > .primary-btn,
  .search-site-header .menu-toggle {
    display: none !important;
  }
}

@media (max-width: 760px) {
  .search-type-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
  }

  .search-type-tabs button {
    width: 100%;
    min-width: 0;
    padding-inline: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
  }

  .search-type-tabs button b {
    flex: 0 0 auto;
  }

  .search-result-card {
    overflow: hidden;
  }
}

@media (max-width: 520px) {
  .search-site-header .header-inner {
    grid-template-columns: minmax(0, 1fr) 40px 40px !important;
  }

  .search-type-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search-tabs-shell,
  .search-layout,
  .recent-search-section {
    width: min(100% - 16px, var(--container));
    padding-inline: 0;
  }

  .search-result-card,
  .search-toolbar,
  .search-empty-state {
    border-radius: 17px;
  }
}

/* V52 — keep the responsive category drawer above the sticky search header */
.search-mobile-drawer {
  z-index: 280;
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}

.search-site-header ~ .drawer-backdrop {
  z-index: 270;
}

.search-mobile-drawer .drawer-head {
  position: sticky;
  top: -18px;
  z-index: 2;
  margin: -18px -18px 0;
  padding: 18px 18px 14px;
  background: var(--surface, #fff);
}

html[data-theme="dark"] .search-mobile-drawer .drawer-head {
  background: #121a2a;
}
.search-result-card .result-visual img{width:100%;height:100%;object-fit:cover;border-radius:inherit;display:block}

/* V63 — keep autocomplete results fully inside the mobile viewport */
.search-autocomplete-root {
  min-width: 0;
  max-width: 100%;
}

.search-suggestions {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  overscroll-behavior: contain;
  direction: rtl;
}

.search-suggestions *,
.search-suggestions *::before,
.search-suggestions *::after {
  box-sizing: border-box;
}

.suggestion-item,
.suggestion-all,
.suggestion-empty,
.suggestion-caption {
  min-width: 0;
  max-width: 100%;
}

.suggestion-item {
  overflow: hidden;
}

.suggestion-copy,
.suggestion-copy strong,
.suggestion-copy small {
  min-width: 0;
  max-width: 100%;
}

.suggestion-all {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid rgba(189, 31, 37, .16);
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-align: center;
  line-height: 1.65;
}

@media (max-width: 760px) {
  .search-suggestions {
    position: fixed !important;
    inset-inline: max(8px, env(safe-area-inset-left)) max(8px, env(safe-area-inset-right));
    top: auto !important;
    bottom: max(8px, env(safe-area-inset-bottom));
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    max-height: min(68dvh, 520px);
    margin: 0 !important;
    transform: none !important;
    border-radius: 18px;
  }

  .suggestion-item {
    grid-template-columns: 38px minmax(0, 1fr) 18px;
    gap: 8px;
    padding-inline: 8px;
  }

  .suggestion-icon {
    width: 38px;
    height: 38px;
  }

  .suggestion-all {
    min-height: 46px;
    font-size: 14px;
  }
}

@media (max-width: 380px) {
  .search-suggestions {
    inset-inline: 6px;
    padding: 6px;
    border-radius: 16px;
  }

  .suggestion-item {
    grid-template-columns: 34px minmax(0, 1fr) 16px;
    min-height: 52px;
    gap: 7px;
    padding: 7px 6px;
  }

  .suggestion-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 17px;
  }

  .suggestion-all {
    padding-inline: 8px;
    font-size: 13px;
  }
}


/* V65 — recent-search history controls */
.suggestion-caption-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.suggestion-caption-row > span {
  min-width: 0;
}

.suggestion-history-clear {
  flex: 0 0 auto;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 10px;
  border: 1px solid rgba(189, 31, 37, .16);
  border-radius: 999px;
  background: var(--red-50, #fff1f2);
  color: var(--red-800, #991b1b);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}

.suggestion-history-clear:hover {
  border-color: rgba(189, 31, 37, .3);
  background: rgba(189, 31, 37, .12);
}

.suggestion-history-clear:active {
  transform: scale(.97);
}

.suggestion-history-clear:focus-visible {
  outline: 3px solid rgba(189, 31, 37, .18);
  outline-offset: 2px;
}

html[data-theme="dark"] .suggestion-history-clear {
  border-color: rgba(248, 113, 113, .24);
  background: rgba(127, 29, 29, .28);
  color: #fecaca;
}

@media (max-width: 380px) {
  .suggestion-caption-row {
    gap: 6px;
    padding-inline: 6px;
  }

  .suggestion-history-clear {
    min-height: 30px;
    padding-inline: 8px;
    font-size: 11px;
  }
}
