/* OnlyTicket (2026-11-04): smart search panel (js/smart-search.js). Desktop: centred panel over a dimmed page.
   Phones: full-screen sheet with the search box pinned on top. Scoped to .ots-*. */
.ots-root { position: fixed; inset: 0; z-index: 2000; display: none; }
.ots-root.open { display: block; }
.ots-backdrop { position: absolute; inset: 0; background: rgba(15, 20, 32, .45); backdrop-filter: blur(2px); animation: ots-fade .15s ease; }
.ots-panel {
    position: relative; margin: 8vh auto 0; width: min(760px, calc(100vw - 32px)); max-height: 82vh; display: flex; flex-direction: column;
    background: #fff; border-radius: 20px; box-shadow: 0 24px 64px rgba(15, 20, 32, .28); overflow: hidden; animation: ots-pop .18s ease;
    color: #1d2433; font-size: 14px;
}
@keyframes ots-fade { from { opacity: 0; } }
@keyframes ots-pop { from { opacity: 0; transform: translateY(-8px) scale(.98); } }

/* search box */
.ots-head { padding: 14px 14px 10px; border-bottom: 1px solid #eef0f4; }
.ots-box {
    display: flex; align-items: center; gap: 8px; height: 54px; padding: 0 6px 0 14px; border-radius: 16px;
    border: 1px solid #d0d5dd; box-shadow: none; background: #fff; transition: border-color .15s;
}
.ots-box:focus-within { border-color: #e31e24; }
.ots-box > i.ots-lead { color: #98a2b3; font-size: 16px; font-weight: 900; }
.ots-box input, .ots-box input:focus { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0 !important; outline: 0 !important; box-shadow: none !important; border-radius: 0; font-size: 16px; color: #1d2433; background: transparent; }
.ots-box input::placeholder { color: #9aa3b2; }
.ots-box input::-webkit-search-cancel-button, .ots-box input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.ots-clear, .ots-back { border: 0; background: #f2f4f7; color: #475467; width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.ots-clear[hidden] { display: none; }
.ots-go { border: 0; width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, #ff6a3d, #e31e24); color: #fff; font-size: 16px; cursor: pointer; flex-shrink: 0; }
.ots-back { display: none; background: transparent; font-size: 18px; margin-left: -6px; }

/* filters */
.ots-filters { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.ots-filters::-webkit-scrollbar { display: none; }
.ots-fchip {
    flex-shrink: 0; border: 1px solid #e5e8ee; background: #fff; color: #344054; border-radius: 50px; padding: 6px 12px; font-size: 13px;
    cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.ots-fchip.on { background: #fdecec; border-color: #f5b5b7; color: #b42318; font-weight: 600; }
.ots-fchip select { border: 0; background: transparent; font: inherit; color: inherit; outline: 0; cursor: pointer; padding: 0; }

/* body */
.ots-body { overflow-y: auto; padding: 6px 14px 16px; overscroll-behavior: contain; }
.ots-sec { padding: 12px 2px 4px; }
.ots-sec + .ots-sec { border-top: 1px solid #f0f2f5; }
.ots-sec-h { display: flex; align-items: center; justify-content: space-between; margin: 0 0 10px; }
.ots-sec-h h6 { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #667085; }
.ots-sec-h button { border: 0; background: none; color: #667085; font-size: 12px; cursor: pointer; }
.ots-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ots-chip {
    border: 1px solid #e4e7ec; background: #fff; color: #344054; border-radius: 50px; padding: 7px 13px; font-size: 13px; cursor: pointer;
    display: inline-flex; align-items: center; gap: 6px; text-decoration: none; max-width: 100%;
}
.ots-chip:hover { background: #e7eaf0; color: #1d2433; }
.ots-chip.alt { background: #f2f4f7; color: #344054; }
.ots-chip.alt:hover { background: #e7eaf0; }
.ots-chip small { color: #98a2b3; font-size: 11px; }
.ots-chip img { width: 22px; height: 22px; border-radius: 4px; object-fit: contain; background: #fff; }

/* product rows */
.ots-list { display: flex; flex-direction: column; gap: 6px; }
.ots-item {
    display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 14px; text-decoration: none; color: #1d2433;
    border: 1px solid transparent; transition: background .12s, border-color .12s;
}
.ots-item:hover, .ots-item.active { background: #fff6f4; border-color: #fbd5cf; color: #1d2433; }
.ots-thumb { width: 64px; height: 64px; border-radius: 12px; flex-shrink: 0; background: #f2f4f7 center / cover no-repeat; }
.ots-info { flex: 1; min-width: 0; }
.ots-name { font-weight: 600; font-size: 14.5px; line-height: 1.3; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ots-name mark { background: #ffe9a8; color: inherit; padding: 0 1px; border-radius: 3px; }
.ots-badge { font-size: 10.5px; font-weight: 700; border-radius: 50px; padding: 2px 8px; letter-spacing: .02em; }
.ots-badge.hot { background: #fdecec; color: #c4171e; }
.ots-badge.pop { background: #e7f8ee; color: #15803d; }
.ots-meta { color: #667085; font-size: 12.5px; margin-top: 3px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ots-meta b { color: #1d2433; }
.ots-meta .star { color: #f5a524; }
.ots-arrow { width: 32px; height: 32px; border-radius: 50%; background: #f2f4f7; color: #e31e24; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ots-more { margin: 8px auto 0; display: block; border: 1px solid #e5e8ee; background: #fff; border-radius: 50px; padding: 8px 16px; font-size: 13px; color: #344054; cursor: pointer; }
.ots-empty { text-align: center; padding: 22px 10px 8px; color: #667085; }
.ots-empty i { font-size: 30px; color: #c0c6d1; display: block; margin-bottom: 8px; }
.ots-foot { display: flex; justify-content: space-between; align-items: center; padding: 9px 16px; border-top: 1px solid #eef0f4; color: #98a2b3; font-size: 12px; }
.ots-foot kbd { background: #f2f4f7; border: 1px solid #e5e8ee; border-radius: 5px; padding: 1px 6px; font-size: 11px; color: #475467; }
.ots-foot a { color: #e31e24; font-weight: 600; text-decoration: none; }

body.ots-lock { overflow: hidden; }

/* phones: full screen */
@media (max-width: 767.98px) {
    .ots-backdrop { display: none; }
    .ots-panel { margin: 0; width: 100%; height: 100%; max-height: none; border-radius: 0; box-shadow: none; animation: ots-up .18s ease; }
    @keyframes ots-up { from { transform: translateY(16px); opacity: 0; } }
    .ots-head { padding: 10px 12px 8px; padding-top: calc(10px + env(safe-area-inset-top)); }
    .ots-box { height: 50px; border-radius: 14px; }
    .ots-back { display: inline-flex; }
    .ots-box > i.ots-lead { display: none; }
    .ots-go { width: 38px; height: 38px; }
    .ots-body { padding: 4px 12px calc(16px + env(safe-area-inset-bottom)); flex: 1; }
    .ots-thumb { width: 56px; height: 56px; }
    .ots-foot { display: none; }
}
@media (prefers-reduced-motion: reduce) { .ots-backdrop, .ots-panel { animation: none; } }
