/** DeliSecret — динамический поиск. */
.desktop-search-panel {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    z-index: 55;
    padding: 1rem max(1rem, calc((100vw - 1200px) / 2));
    border-top: 1px solid #f3f4f6;
    background: #fff;
    box-shadow: 0 24px 50px rgba(31, 41, 55, 0.16);
}
.desktop-search-close { position: absolute; top: 1.5rem; right: max(1rem, calc((100vw - 1200px) / 2)); z-index: 2; border: 0; color: #9ca3af; background: transparent; }
.quick-search { width: 100%; max-width: 1200px; margin: 0 auto; }
.quick-search-form { min-height: 52px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.7rem; padding: 0 0.35rem 0 1rem; border: 2px solid #f4a9bc; border-radius: 1rem; background: #fff; box-shadow: 0 8px 24px rgba(204, 45, 90, 0.08); }
.desktop-search-panel .quick-search-form { margin-right: 3.5rem; }
.quick-search-form > .material-icons { color: #cc2d5a; }
.quick-search-form input { min-width: 0; width: 100%; border: 0; outline: 0; color: #111827; background: transparent; font: inherit; }
.quick-search-form button { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 0.75rem; color: #fff; background: #cc2d5a; cursor: pointer; }
.quick-search-body { display: grid; grid-template-columns: minmax(220px, 0.32fr) minmax(0, 1fr); gap: 1.5rem; min-height: 240px; max-height: min(560px, calc(100vh - 180px)); margin-top: 1rem; overflow: auto; }
.quick-search-sidebar { padding-right: 1.25rem; border-right: 1px solid #f3f4f6; }
.quick-search-sidebar section + section { margin-top: 1.25rem; }
.quick-search-section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.65rem; color: #111827; font-size: 0.84rem; }
.quick-search-section-title button { border: 0; color: #9ca3af; background: transparent; font-size: 0.7rem; cursor: pointer; }
.quick-search-list { display: grid; gap: 0.35rem; }
.quick-search-history-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0.25rem; }
.quick-search-history-row > button:first-child, .quick-search-suggestions button, .quick-search-categories button { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.42rem 0; border: 0; color: #4b5563; background: transparent; text-align: left; cursor: pointer; }
.quick-search-history-row small, .quick-search-suggestions small, .quick-search-categories small { color: #9ca3af; font-size: 0.66rem; }
.quick-search-remove { border: 0; color: #9ca3af; background: transparent; font-size: 1.1rem; cursor: pointer; }
.quick-search-tags { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.quick-search-tags button { display: inline-flex; gap: 0.35rem; padding: 0.42rem 0.7rem; border: 0; border-radius: 999px; color: #7a1c3b; background: #fdf2f4; font-size: 0.72rem; cursor: pointer; }
.quick-search-results { min-width: 0; padding: 0.25rem 0; }
.quick-search-welcome { min-height: 220px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #9ca3af; text-align: center; }
.quick-search-welcome .material-icons { margin-bottom: 0.5rem; color: #f4a9bc; font-size: 48px; }
.quick-search-welcome strong { color: #4b5563; }
.quick-search-welcome p { margin-top: 0.35rem; font-size: 0.75rem; }
.quick-search-muted { color: #9ca3af; font-size: 0.76rem; }
.quick-search-correction { margin-bottom: 0.8rem; padding: 0.7rem 0.85rem; border-radius: 0.75rem; color: #6b7280; background: #fdf2f4; font-size: 0.8rem; }
.quick-search-correction button { border: 0; color: #cc2d5a; background: transparent; font-weight: 700; cursor: pointer; }
.quick-search-suggestions, .quick-search-categories { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.7rem; margin-bottom: 0.8rem; }
.quick-search-suggestions > strong, .quick-search-categories > strong { flex-basis: 100%; font-size: 0.78rem; }
.quick-search-suggestions button, .quick-search-categories button { padding: 0.35rem 0.6rem; border-radius: 999px; background: #f9fafb; font-size: 0.72rem; }
.quick-search-products { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.7rem; }
.quick-search-product { min-width: 0; display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 0.65rem; padding: 0.5rem; border: 1px solid #f3f4f6; border-radius: 0.8rem; color: inherit; background: #fff; text-decoration: none; }
.quick-search-product:hover { border-color: #f4a9bc; box-shadow: 0 6px 20px rgba(31, 41, 55, 0.06); }
.quick-search-product > img, .quick-search-product-placeholder { width: 64px; height: 82px; border-radius: 0.55rem; object-fit: cover; background: #fdf2f4; }
.quick-search-product-placeholder { display: flex; align-items: center; justify-content: center; color: #f4a9bc; }
.quick-search-product > span:last-child { min-width: 0; display: grid; gap: 0.35rem; }
.quick-search-product strong { display: -webkit-box; overflow: hidden; color: #374151; font-size: 0.74rem; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.quick-search-product small { color: #cc2d5a; font-size: 0.76rem; font-weight: 700; }
.quick-search-all { display: inline-flex; margin-top: 1rem; color: #cc2d5a; font-size: 0.8rem; font-weight: 700; }

.search-page-wrap { padding: 2rem 0 4rem; }
.search-page-header { display: grid; grid-template-columns: minmax(240px, 0.65fr) minmax(360px, 1fr); align-items: end; gap: 2rem; margin-bottom: 2rem; padding: 1.5rem; border-radius: 1.25rem; background: linear-gradient(135deg, #fdf2f4, #fff 65%); }
.search-page-header p { margin-bottom: 0.25rem; color: #cc2d5a; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.search-page-header h1 { color: #111827; font-size: clamp(1.45rem, 3vw, 2.2rem); font-weight: 700; line-height: 1.15; }
.search-page-form { min-height: 56px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.65rem; padding-left: 1rem; border: 2px solid #f4a9bc; border-radius: 1rem; background: #fff; box-shadow: 0 9px 28px rgba(204, 45, 90, 0.1); }
.search-page-form > .material-icons { color: #cc2d5a; }
.search-page-form input { min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; }
.search-page-form button { align-self: stretch; padding: 0 1.3rem; border: 0; border-radius: 0 0.85rem 0.85rem 0; color: #fff; background: #cc2d5a; font-weight: 700; cursor: pointer; }
#searchResults { min-height: 240px; transition: opacity 0.18s ease; }
#searchResults.is-loading { opacity: 0.45; pointer-events: none; }
.search-notice { display: flex; align-items: center; gap: 0.65rem; margin-bottom: 1rem; padding: 0.8rem 1rem; border: 1px solid #f9d0db; border-radius: 0.8rem; color: #7a1c3b; background: #fdf2f4; font-size: 0.8rem; }
.search-notice-warning { border-color: #fde68a; color: #92400e; background: #fffbeb; }
.search-correction { border: 0; color: #cc2d5a; background: transparent; font: inherit; font-weight: 700; cursor: pointer; }
.search-summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.search-summary span { color: #9ca3af; font-size: 0.82rem; }
.search-share, .search-mobile-filters { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.5rem 0.75rem; border: 1px solid #f4a9bc; border-radius: 0.65rem; color: #cc2d5a; background: #fff; font-size: 0.76rem; cursor: pointer; }
.search-share .material-icons, .search-mobile-filters .material-icons { font-size: 18px; }
.search-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 1.5rem; }
.search-filters { align-self: start; padding: 1rem; border: 1px solid #f3f4f6; border-radius: 1rem; background: #fff; }
.search-filters-heading { display: flex; justify-content: space-between; margin-bottom: 0.9rem; }
.search-filters-heading button { border: 0; color: #9ca3af; background: transparent; font-size: 0.7rem; cursor: pointer; }
.search-facet { padding: 0.9rem 0; border: 0; border-top: 1px solid #f3f4f6; }
.search-facet legend { margin-bottom: 0.6rem; color: #374151; font-size: 0.76rem; font-weight: 700; }
.search-facet label { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.5rem; margin: 0.4rem 0; color: #4b5563; font-size: 0.74rem; cursor: pointer; }
.search-facet input[type="checkbox"], .search-sale-filter input { accent-color: #cc2d5a; }
.search-facet small { color: #9ca3af; }
.search-price-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 0.45rem; }
.search-price-inputs input { min-width: 0; width: 100%; padding: 0.5rem; border: 1px solid #e5e7eb; border-radius: 0.5rem; font-size: 0.72rem; }
.search-sale-filter { display: flex; align-items: center; gap: 0.5rem; padding-top: 0.8rem; border-top: 1px solid #f3f4f6; color: #4b5563; font-size: 0.74rem; cursor: pointer; }
.search-toolbar { display: flex; justify-content: flex-end; margin-bottom: 0.8rem; }
.search-toolbar label { display: flex; align-items: center; gap: 0.45rem; color: #6b7280; font-size: 0.74rem; }
.search-toolbar select { padding: 0.45rem 1.8rem 0.45rem 0.6rem; border: 1px solid #e5e7eb; border-radius: 0.55rem; background: #fff; font-size: 0.74rem; }
.search-mobile-filters { display: none; }
.search-pagination { display: flex; justify-content: center; gap: 0.4rem; margin-top: 1.7rem; }
.search-pagination a { min-width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #e5e7eb; border-radius: 0.55rem; color: #4b5563; text-decoration: none; }
.search-pagination a.active { border-color: #cc2d5a; color: #fff; background: #cc2d5a; }
.search-empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-top: 1rem; }
.search-empty-actions button { padding: 0.45rem 0.75rem; border: 0; border-radius: 999px; color: #7a1c3b; background: #fdf2f4; cursor: pointer; }

@media (max-width: 1023px) {
    .mobile-search-content { overflow: auto; }
    .mobile-search-content .quick-search-body { display: block; max-height: none; overflow: visible; }
    .mobile-search-content .quick-search-sidebar { padding: 0 0 1rem; border: 0; border-bottom: 1px solid #f3f4f6; }
    .mobile-search-content .quick-search-results { padding-top: 1rem; }
    .quick-search-products { grid-template-columns: 1fr 1fr; }
    .search-page-header { grid-template-columns: 1fr; gap: 1rem; }
    .search-layout { grid-template-columns: 1fr; }
    .search-filters { display: none; }
    .search-filters.is-open { display: block; }
    .search-toolbar { justify-content: space-between; }
    .search-mobile-filters { display: inline-flex; }
}

@media (max-width: 640px) {
    .quick-search-products { grid-template-columns: 1fr; }
    .search-page-wrap { padding-top: 1rem; }
    .search-page-header { margin-bottom: 1.25rem; padding: 1rem; }
    .search-page-form { grid-template-columns: auto 1fr; }
    .search-page-form button { grid-column: 1 / -1; min-height: 44px; border-radius: 0 0 0.85rem 0.85rem; }
    .search-summary { align-items: flex-start; }
    .search-summary span { display: block; margin-top: 0.2rem; }
    .search-share { font-size: 0; }
    .search-share .material-icons { font-size: 20px; }
}