/* ============================================================
   ChemSmog Search sidebar — clean vertical stack
   ============================================================ */

body .panel--sidebar#search-mobile {
    position: fixed !important;
    top: 0;
    right: 0;
    width: 480px !important;
    max-width: 100vw;
    height: 100vh !important;
    background: var(--cs-white) !important;
    box-shadow: -16px 0 48px rgba(11, 64, 84, 0.18) !important;
    transform: translateX(100%);
    transition: transform .35s cubic-bezier(.2, .8, .25, 1);
    z-index: 9999;
    overflow-y: auto;
    padding: 96px 36px 36px !important;
    display: block !important;
}
body .panel--sidebar#search-mobile.is-active,
body .panel--sidebar#search-mobile.active {
    transform: translateX(0);
}

/* Reset all internal containers to block (Farmart had flex weirdness) */
body .panel--sidebar#search-mobile .panel__header,
body .panel--sidebar#search-mobile .form--quick-search,
body .panel--sidebar#search-mobile .bb-form-quick-search,
body .panel--sidebar#search-mobile .search-inner-content,
body .panel--sidebar#search-mobile .text-search {
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
}

/* SEARCH title at top */
body .panel--sidebar#search-mobile::before {
    content: 'Search';
    position: absolute;
    top: 36px;
    left: 36px;
    font-family: 'Fredoka', sans-serif;
    font-weight: 500;
    font-size: 24px;
    color: var(--cs-blue);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 1;
}

/* X close: pulled out of .text-search position-absolute top-right of panel */
body .panel--sidebar#search-mobile .close-search-panel {
    position: fixed !important;
    top: 28px !important;
    right: 28px !important;
    width: 42px !important;
    height: 42px !important;
    background: var(--cs-bg) !important;
    border-radius: 9999px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--cs-blue) !important;
    text-decoration: none !important;
    transition: background .15s ease, transform .15s ease;
    border: none !important;
    z-index: 10000;
    margin: 0 !important;
}
body .panel--sidebar#search-mobile .close-search-panel:hover {
    background: var(--cs-divider) !important;
    transform: rotate(90deg);
}
body .panel--sidebar#search-mobile .close-search-panel svg {
    width: 18px !important;
    height: 18px !important;
    fill: currentColor !important;
}

/* Pill search wrapper */
body .panel--sidebar#search-mobile .search-wrapper {
    display: flex !important;
    align-items: stretch !important;
    gap: 6px !important;
    background: var(--cs-bg) !important;
    border-radius: 9999px !important;
    padding: 6px !important;
    border: 1px solid transparent;
    transition: border-color .15s ease, background .15s ease;
    margin-top: 16px !important;
    width: 100% !important;
}
body .panel--sidebar#search-mobile .search-wrapper:focus-within {
    border-color: var(--cs-teal);
    background: var(--cs-white) !important;
    box-shadow: 0 0 0 4px rgba(89, 205, 194, 0.15);
}

body .panel--sidebar#search-mobile .search-field,
body .panel--sidebar#search-mobile .input-search-product,
body .panel--sidebar#search-mobile input[type=text] {
    flex: 1 1 auto !important;
    height: 52px !important;
    padding: 0 22px !important;
    background: transparent !important;
    border: none !important;
    font-family: 'Fredoka', sans-serif !important;
    font-size: 15px !important;
    color: var(--cs-navy) !important;
    outline: none !important;
    box-shadow: none !important;
    width: auto !important;
}
body .panel--sidebar#search-mobile .search-field::placeholder,
body .panel--sidebar#search-mobile input[type=text]::placeholder {
    color: var(--cs-text-light);
    font-weight: 400;
}

/* Submit button green/teal circle */
body .panel--sidebar#search-mobile .search-wrapper button[type=submit],
body .panel--sidebar#search-mobile .search-wrapper .btn[type=submit] {
    flex: 0 0 auto !important;
    width: 52px !important;
    height: 52px !important;
    border-radius: 9999px !important;
    background: linear-gradient(90deg, var(--cs-btn-g1) 0%, var(--cs-btn-g2) 100%) !important;
    border: none !important;
    color: var(--cs-white) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: transform .15s ease, box-shadow .15s ease;
    padding: 0 !important;
    margin: 0 !important;
}
body .panel--sidebar#search-mobile .search-wrapper button[type=submit]:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 123, 169, 0.25);
}
body .panel--sidebar#search-mobile .search-wrapper button[type=submit] svg {
    width: 22px !important;
    height: 22px !important;
    fill: currentColor !important;
    color: var(--cs-white) !important;
}

/* MOST SEARCHED pills section (vertical below input) */
body .panel--sidebar#search-mobile .cs-search-suggest {
    margin-top: 28px !important;
    display: block !important;
    width: 100% !important;
}
body .panel--sidebar#search-mobile .cs-search-suggest h4 {
    font-family: 'Fredoka', sans-serif !important;
    font-weight: 500 !important;
    font-size: 13px !important;
    color: var(--cs-text-light) !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    margin: 0 0 14px !important;
}
body .panel--sidebar#search-mobile .cs-search-suggest__pills {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
}
body .panel--sidebar#search-mobile .cs-search-suggest__pills a {
    display: inline-flex !important;
    align-items: center !important;
    padding: 8px 16px !important;
    background: var(--cs-bg) !important;
    color: var(--cs-blue) !important;
    border-radius: 9999px !important;
    font-family: 'Fredoka', sans-serif !important;
    font-size: 13px !important;
    text-decoration: none !important;
    transition: background .15s ease, color .15s ease;
    margin: 0 !important;
}
body .panel--sidebar#search-mobile .cs-search-suggest__pills a:hover {
    background: linear-gradient(90deg, var(--cs-btn-g1) 0%, var(--cs-btn-g2) 100%) !important;
    color: var(--cs-white) !important;
}

@media (max-width: 575px) {
    body .panel--sidebar#search-mobile {
        width: 100vw !important;
        padding: 88px 24px 24px !important;
    }
}
