.barik-search {
    /* Brand-ish (adjust if you already have them) */
    --maroon-600: #a11414;
    --maroon-700: #7b0f0f;
    /* Neutrals */
    --ink-900: #0b1220;
    --ink-800: #111827;
    --ink-700: #374151;
    --ink-600: #4b5563;
    --ink-500: #6b7280;
    --bg: #f3f4f6;
    --card: #ffffff;
    --soft: #f9fafb;
    --border: #e5e7eb;
    --border2: #d1d5db;
    --r12: 12px;
    --r16: 16px;
    --r20: 20px;
    --shadow: 0 10px 30px rgba(15, 23, 42, .10);
    --shadow2: 0 6px 18px rgba(15, 23, 42, .08);
    --focus: 0 0 0 4px rgba(161, 20, 20, .15);
}
.page {
    padding: 0;
    max-width: var(--container);
    margin: 20px auto;
}
/* Header */

.barik-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin: 8px 0 14px;
}
.barik-head h1 {
    margin: 0;
    font-size: 18px;
    line-height: 1.2;
    letter-spacing: .2px;
}
.barik-head p {
    margin: 6px 0 0;
    color: var(--ink-600);
    font-size: 13px;
    line-height: 1.4;
}
.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, .7);
    backdrop-filter: blur(6px);
    box-shadow: var(--shadow2);
    color: var(--ink-700);
    font-size: 12px;
    white-space: nowrap;
}
.dot {
    width: 9px;
    height: 9px;
    border-radius: 99px;
    background: linear-gradient(180deg, var(--maroon-600), var(--maroon-700));
    box-shadow: 0 0 0 3px rgba(161, 20, 20, .14);
}
/* Card */

.barik-search {
    background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, .92));
    border: 1px solid var(--border);
    border-radius: var(--r20);
    box-shadow: var(--shadow);
    overflow: hidden;
}
/* Top ribbon */

.ribbon {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(90deg, rgba(161, 20, 20, .10), rgba(255, 255, 255, 0) 45%), var(--soft);
}
.ribbon .left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, var(--maroon-600), var(--maroon-700));
    color: #fff;
    box-shadow: 0 10px 18px rgba(161, 20, 20, .22);
    flex: 0 0 auto;
    font-weight: 900;
    letter-spacing: .5px;
    user-select: none;
}
.ribbon .title {
    min-width: 0;
}
.ribbon .title strong {
    display: block;
    font-size: 14px;
    line-height: 1.2;
    color: var(--ink-900);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ribbon .title span {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    color: var(--ink-600);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ribbon .right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}
.hint {
    font-size: 12px;
    color: var(--ink-600);
    display: none;
}
/* Grid */

.search-grid {
    padding: 16px;
    display: grid;
    grid-template-columns: 1.2fr 1.1fr;
    gap: 14px;
}
.field {
    min-width: 0;
}
.field label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--ink-700);
    margin: 0 0 8px;
    font-weight: 700;
    letter-spacing: .2px;
}
.field-options {
    display: flex;
    align-items: center;
    gap: 18px;
}
.field-options .opt {
    flex: 0 0 auto;
}
/* Inputs */

.control {
    position: relative;
}
.barik-search .form-control {
    width: 100%;
    appearance: none;
    border: 1px solid var(--border2);
    background: #fff;
    color: var(--ink-900);
    border-radius: 14px;
    padding: 12px 12px;
    font-size: 14px;
    line-height: 1.2;
    outline: none;
    transition: box-shadow .15s ease, border-color .15s ease, transform .12s ease;
    box-shadow: 0 1px 0 rgba(15, 23, 42, .02);
    height: auto;
}
.form-control::placeholder {
    color: rgba(75, 85, 99, .7);
}
.form-control:focus {
    border-color: rgba(161, 20, 20, .55);
    box-shadow: var(--focus);
}
/* Search input icon + clear */

.field-search .form-control {
    padding-left: 42px;
    padding-right: 40px;
}
.icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--ink-500);
    pointer-events: none;
}
.btn-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    display: grid;
    place-items: center;
    cursor: pointer;
    color: var(--ink-600);
    opacity: .0;
    transition: opacity .12s ease, background .12s ease, border-color .12s ease;
}
.btn-clear:hover {
    background: var(--soft);
    border-color: var(--border);
}
.btn-clear:active {
    transform: translateY(-50%) scale(.98);
}
.btn-clear.is-show {
    opacity: 1;
}
/* Select caret */

.field-category .form-control {
    padding-right: 42px;
    background-image: linear-gradient(45deg, transparent 50%, var(--ink-500) 50%), linear-gradient(135deg, var(--ink-500) 50%, transparent 50%);
    background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}
/* Options block */

.field-options {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    padding: 12px;
    border: 1px dashed rgba(209, 213, 219, .9);
    border-radius: var(--r16);
    background: linear-gradient(180deg, rgba(249, 250, 251, .9), rgba(249, 250, 251, .65));
    align-items: center;
}
.field-options .opt {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, .7);
    cursor: pointer;
    user-select: none;
    transition: border-color .12s ease, transform .12s ease, background .12s ease;
    width: auto;
    justify-content: flex-start;
}
.opt:hover {
    border-color: var(--border);
    background: #fff;
}
.opt:active {
    transform: scale(.99);
}
/* Custom checkbox */

.opt input {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 6px;
    border: 1.5px solid var(--border2);
    background: #fff;
    display: inline-grid;
    place-items: center;
    margin: 0;
    outline: none;
    box-shadow: 0 1px 0 rgba(15, 23, 42, .02);
}
.opt input:focus {
    box-shadow: var(--focus);
    border-color: rgba(161, 20, 20, .55);
}
.opt input::after {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 4px;
    transform: scale(0);
    transition: transform .12s ease;
    background: linear-gradient(180deg, var(--maroon-600), var(--maroon-700));
}
.opt input:checked {
    border-color: rgba(161, 20, 20, .55);
}
.opt input:checked::after {
    transform: scale(1);
}
.opt span {
    font-size: 13px;
    color: var(--ink-700);
    line-height: 1.2;
    font-weight: 650;
}
/* Actions row */

.search-actions {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 2px;
}
.meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--ink-600);
    font-size: 12px;
}
.kbd {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #fff;
    box-shadow: 0 1px 0 rgba(15, 23, 42, .03);
    color: var(--ink-700);
}
.btn-search {
    border: 0;
    cursor: pointer;
    border-radius: 14px;
    padding: 12px 16px;
    min-width: 140px;
    font-weight: 900;
    letter-spacing: .2px;
    font-size: 14px;
    color: #fff;
    background: linear-gradient(180deg, var(--maroon-600), var(--maroon-700));
    box-shadow: 0 12px 20px rgba(161, 20, 20, .22);
    transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    white-space: nowrap;
}
.btn-search:hover {
    filter: saturate(1.05);
    box-shadow: 0 14px 24px rgba(161, 20, 20, .26);
    transform: translateY(-1px);
}
.btn-search:active {
    transform: translateY(0);
}
.btn-search:disabled {
    opacity: .55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
/* Footer title */

.full {
    grid-column: 1 / -1;
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}
.search-title {
    margin: 0;
    font-size: 14px;
    color: var(--ink-800);
    letter-spacing: .2px;
}
.subtext {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--ink-600);
}
/* Responsive */

@media (max-width: 860px) {
    .hint {
        display: inline;
    }
    .search-grid {
        grid-template-columns: 1fr;
    }
    .btn-search {
        width: 100%;
        min-width: 0;
    }
    .search-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .meta-row {
        justify-content: space-between;
    }
}
/* Small polish */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.barik-search label {
    width: 100%;
    margin-bottom: 6px;
}
.barik-search .field-options label {
    margin: 0;
}
.barik-search input[type="checkbox"] {
    position: relative;
}
#product-search .barik-search .search-grid {
    grid-template-columns: 1.2fr 1.1fr;
}