.pa-head-icon .header-actions-list {
    gap: 12px;
    margin: 0;
}

.pa-head-icon .header-actions-list > li {
    margin: 0;
}

.pa-head-icon .header-search-trigger {
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #173439;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.pa-head-icon .header-search-trigger:hover,
.pa-head-icon .header-search-trigger:focus-visible {
    background: #eaf4ee;
    color: #014940;
}

.pa-head-icon .header-search-trigger svg {
    width: 22px;
    height: 22px;
    fill: none !important;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.pa-head-icon .header-search-trigger:focus-visible {
    outline: 2px solid #86c440;
    outline-offset: 2px;
}

.header-search-open {
    overflow: hidden;
}

.header-search-overlay {
    position: fixed;
    z-index: 1000005;
    inset: 0;
    display: none;
    justify-content: center;
    align-items: flex-start;
    padding: clamp(16px, 5vh, 56px) 20px 20px;
}

.header-search-overlay.is-open {
    display: flex;
}

.header-search-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(8, 29, 23, 0.72);
    backdrop-filter: blur(5px);
    cursor: default;
}

.header-search-dialog {
    position: relative;
    z-index: 1;
    display: flex;
    width: min(100%, 1080px);
    max-height: min(88vh, 900px);
    max-height: min(88dvh, 900px);
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 24px;
    background: #fbfcf9;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.3);
    animation: header-search-enter 0.22s ease-out;
}

@keyframes header-search-enter {
    from { opacity: 0; transform: translateY(-12px) scale(0.99); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.header-search-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 28px 32px 20px;
}

.header-search-eyebrow {
    margin: 0 0 5px;
    color: #36825d;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
}

.header-search-topbar h2 {
    margin: 0;
    color: #173f34;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.35rem, 3vw, 1.9rem);
    font-weight: 700;
}

.header-search-close {
    display: inline-flex;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8e1;
    border-radius: 50%;
    background: #ffffff;
    color: #355648;
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.header-search-close:hover {
    background: #eaf4ee;
    color: #014940;
}

.header-search-form {
    display: flex;
    min-height: 62px;
    align-items: center;
    gap: 14px;
    margin: 0 32px;
    padding: 7px 8px 7px 20px;
    border: 1px solid #dfe8df;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(24, 67, 48, 0.07);
}

.header-search-form > i {
    color: #388260;
    font-size: 18px;
}

.header-search-form input {
    width: 100%;
    min-width: 0;
    padding: 8px 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #173439;
    font: inherit;
}

.header-search-form input::placeholder {
    color: #89978e;
}

.header-search-form input:focus-visible {
    outline: 0;
}

.header-search-form button {
    min-height: 46px;
    padding: 0 22px;
    border: 0;
    border-radius: 12px;
    background: #075548;
    color: #ffffff;
    cursor: pointer;
    font-weight: 700;
    transition: background-color 0.2s ease;
}

.header-search-form button:hover {
    background: #0b6a51;
}

.header-search-content {
    min-height: 130px;
    overflow-y: auto;
    padding: 22px 32px 12px;
    overscroll-behavior: contain;
}

.header-search-section-label {
    margin: 0 0 12px;
    color: #597066;
    font-size: 0.83rem;
    font-weight: 700;
}

.header-search-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.header-search-suggestions[hidden] {
    display: none;
}

.header-search-chips button {
    padding: 8px 14px;
    border: 1px solid #dce8df;
    border-radius: 999px;
    background: #ffffff;
    color: #315d49;
    cursor: pointer;
    font-size: 0.88rem;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.header-search-chips button:hover {
    border-color: #9dc5a7;
    background: #eef6ee;
}

.header-search-status {
    color: #61736a;
    font-size: 0.92rem;
}

.header-search-status:empty {
    display: none;
}

.header-search-status.is-loading::before {
    display: inline-block;
    width: 15px;
    height: 15px;
    margin-right: 9px;
    border: 2px solid #c8d8ce;
    border-top-color: #26734f;
    border-radius: 50%;
    content: "";
    vertical-align: -3px;
    animation: header-search-spin 0.7s linear infinite;
}

@keyframes header-search-spin {
    to { transform: rotate(360deg); }
}

.header-search-results:empty {
    display: none;
}

.header-search-results > .col-12 > h2 {
    margin: 0 0 8px;
    color: #173f34;
    font-size: 1.15rem;
    font-weight: 700;
}

.header-search-results > .col-12 > p {
    margin: 0 0 10px;
    color: #64746d;
}

.header-search-results .search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(147px, 1fr));
    gap: 16px;
    margin: 18px 0 8px;
}

.header-search-results .search-card {
    height: 100%;
    overflow: hidden;
    border: 1px solid #e5ebe5;
    border-radius: 15px;
    background: #ffffff;
    box-shadow: 0 5px 16px rgba(22, 56, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search-results .search-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(22, 56, 42, 0.12);
}

.header-search-results .search-card > a:first-child {
    display: block;
    background: #ffffff;
}

.header-search-results .search-card img {
    display: block;
    width: 100%;
    height: 155px;
    object-fit: contain;
}

.header-search-results .search-content {
    padding: 14px;
}

.header-search-results .search-card h6 {
    margin: 0 0 10px;
    font-size: 0.94rem;
    line-height: 1.4;
}

.header-search-results .search-card h6 a {
    color: #183c31;
    text-decoration: none;
    font-size: 11px;
}

.header-search-results .price {
    margin: 0 0 9px;
    color: #075548;
    font-size: 0.9rem;
    font-weight: 700;
}

.header-search-results .view-btn {
    display: block;
    padding: 4px;
    border-radius: 9px;
    background: #075548;
    color: #ffffff;
    text-align: center;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 600;
}

.header-search-results .pagination {
    justify-content: center;
    margin: 18px 0 6px;
}

.header-search-results .page-link {
    color: #075548;
}

.header-search-results .page-item.active .page-link {
    border-color: #075548;
    background: #075548;
    color: #ffffff;
}

.header-search-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 14px 20px 18px;
    border-top: 1px solid #e8eee8;
    color: #718078;
    font-size: 0.8rem;
}

.header-search-footer i {
    color: #438360;
}

@media (max-width: 767.98px) {
    .pa-head-icon .header-actions-list {
        gap: 4px;
    }

    .pa-head-icon .header-search-trigger {
        width: 36px;
        height: 36px;
    }

    .pa-head-icon .header-actions-list > li > a[data-side-cart-open] svg {
        width: 20px;
        height: 20px;
    }

    .header-search-overlay {
        align-items: stretch;
        padding: 0;
    }

    .header-search-dialog {
        width: 100%;
        max-height: 100vh;
        max-height: 100dvh;
        border: 0;
        border-radius: 0;
    }

    .header-search-topbar {
        padding: 20px 18px 16px;
    }

    .header-search-form {
        min-height: 56px;
        gap: 10px;
        margin: 0 16px;
        padding-left: 14px;
        border-radius: 13px;
    }

    .header-search-form input {
        font-size: 0.9rem;
    }

    .header-search-form button {
        min-height: 42px;
        padding: 0 14px;
    }

    .header-search-content {
        padding: 20px 16px 14px;
    }

    .header-search-results .search-results-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .header-search-results .search-card img {
        height: 125px;
    }

    .header-search-results .search-content {
        padding: 11px;
    }

    .header-search-results .search-card h6 {
        font-size: 0.85rem;
    }

    .header-search-results .price {
        font-size: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .header-search-dialog,
    .header-search-status.is-loading::before {
        animation: none;
    }

    .header-search-trigger,
    .header-search-close,
    .header-search-form button,
    .header-search-chips button,
    .header-search-results .search-card,
    .header-search-results .view-btn {
        transition: none;
    }
}
