/* GS Product Search — header trigger + full-screen live search */

.gs-ps-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 50%;
    background: rgba(255, 255, 255, .06);
    color: #fff;
    cursor: pointer;
    overflow: visible;          /* the theme sets overflow:hidden on every <button> */
    line-height: 0;
    flex: 0 0 auto;
    transition: background .25s ease, border-color .25s ease, transform .25s ease;
}

.gs-ps-trigger:hover,
.gs-ps-trigger:focus-visible {
    background: #2e4b46;
    border-color: #2e4b46;
    color: #fff;
    transform: translateY(-1px);
}

.gs-ps-trigger svg { display: block; }

.gs-ps-trigger--desktop { margin-left: 26px; }

.gs-ps-trigger--mobile {
    width: 40px;
    height: 40px;
    margin: 0;
}

/* the burger sits in an absolutely positioned box anchored to right:15px —
   turning it into a flex row lets the search button grow leftwards from it */
#pxl-header-mobile #pxl-nav-mobile {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 18px;
    width: auto;
}

/* ---------- overlay ---------- */

.gs-ps-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.gs-ps-overlay[hidden] { display: none; }

.gs-ps-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 10, 10, .93);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity .3s ease;
}

.gs-ps-overlay.is-open .gs-ps-backdrop { opacity: 1; }

.gs-ps-panel {
    position: relative;
    width: min(1140px, 100%);
    max-height: 100%;
    padding: 90px 30px 40px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    opacity: 0;
    transform: translateY(-18px);
    transition: opacity .3s ease .05s, transform .3s ease .05s;
}

.gs-ps-overlay.is-open .gs-ps-panel { opacity: 1; transform: none; }

.gs-ps-close {
    position: absolute;
    top: 26px;
    right: 26px;
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 50%;
    background: transparent;
    color: #fff;
    cursor: pointer;
    overflow: visible;
    line-height: 0;
    transition: background .25s ease, border-color .25s ease;
}

.gs-ps-close:hover { background: #2e4b46; border-color: #2e4b46; }

.gs-ps-form {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, .25);
    padding-bottom: 14px;
}

.gs-ps-form-icon { color: rgba(255, 255, 255, .5); flex: 0 0 auto; }

/* the theme styles input[type=search] globally (black pill, 60px tall) —
   attribute selectors outrank a bare class, so these need !important */
.gs-ps-overlay .gs-ps-form input.gs-ps-input {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    height: auto !important;
    padding: 6px 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    color: #fff !important;
    font-size: 26px;
    line-height: 1.4;
    text-align: left;
    outline: none;
}

.gs-ps-input::placeholder { color: rgba(255, 255, 255, .38); }
.gs-ps-input::-webkit-search-cancel-button { display: none; }

.gs-ps-spinner {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    border: 2px solid rgba(255, 255, 255, .2);
    border-top-color: #fff;
    border-radius: 50%;
    opacity: 0;
    transition: opacity .2s ease;
}

.gs-ps-overlay.is-loading .gs-ps-spinner {
    opacity: 1;
    animation: gs-ps-spin .7s linear infinite;
}

@keyframes gs-ps-spin { to { transform: rotate(360deg); } }

.gs-ps-status {
    margin: 18px 0 0;
    color: rgba(255, 255, 255, .55);
    font-size: 15px;
    min-height: 22px;
}

.gs-ps-status a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

.gs-ps-results {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 26px;
    margin-top: 26px;
    padding-bottom: 30px;
}

.gs-ps-card {
    display: block;
    color: #fff;
    text-decoration: none;
    opacity: 0;
    transform: translateY(12px);
    animation: gs-ps-in .35s ease forwards;
}

@keyframes gs-ps-in { to { opacity: 1; transform: none; } }

.gs-ps-card-thumb {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    border-radius: 14px;
    overflow: hidden;
    background: #1b1d1d;
}

.gs-ps-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
}

.gs-ps-card:hover .gs-ps-card-thumb img { transform: scale(1.06); }

.gs-ps-card-title {
    display: block;
    margin: 14px 0 0;
    font-size: 17px;
    line-height: 1.35;
    color: #fff;
}

.gs-ps-card-meta {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: rgba(255, 255, 255, .5);
}

@media (max-width: 1024px) {
    .gs-ps-results { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
}

@media (max-width: 767px) {
    .gs-ps-panel { padding: 76px 18px 30px; }
    .gs-ps-close { top: 18px; right: 16px; width: 40px; height: 40px; }
    .gs-ps-overlay .gs-ps-form input.gs-ps-input { font-size: 19px; }
    .gs-ps-results { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
    .gs-ps-card-title { font-size: 15px; }
}
