/* JC Theme v220 - Homepage search bar hard layout fix.
   Loaded only on the front page after main.css/shop.css to prevent split-CSS/global button rules from breaking the search form. */

.jc-home .jc-home-search,
.jc-home-search {
    box-sizing: border-box !important;
    position: relative !important;
    z-index: 2 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    width: min(680px, calc(100% - 24px)) !important;
    max-width: 680px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-bottom: 18px !important;
    padding: 8px !important;
    border: 1px solid rgba(72, 48, 40, 0.12) !important;
    border-radius: 999px !important;
    background: linear-gradient(135deg, rgba(255, 250, 240, 0.78), rgba(255, 255, 255, 0.44)) !important;
    box-shadow: 0 18px 55px rgba(35, 24, 20, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.56) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.jc-home .jc-home-search *,
.jc-home-search * {
    box-sizing: border-box !important;
}

.jc-home .jc-home-search > label,
.jc-home .jc-home-search > .screen-reader-text,
.jc-home-search > label,
.jc-home-search > .screen-reader-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.jc-home .jc-home-search > input[type=hidden],
.jc-home-search > input[type=hidden] {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
}

.jc-home .jc-home-search::before,
.jc-home-search::before {
    content: "" !important;
    position: absolute !important;
    left: 18px !important;
    top: 50% !important;
    width: 15px !important;
    height: 15px !important;
    border: 2px solid color-mix(in srgb, var(--jc-ink) 42%, transparent) !important;
    border-radius: 999px !important;
    transform: translateY(-58%) !important;
    pointer-events: none !important;
}

.jc-home .jc-home-search::after,
.jc-home-search::after {
    content: "" !important;
    position: absolute !important;
    left: 31px !important;
    top: calc(50% + 8px) !important;
    width: 8px !important;
    height: 2px !important;
    border-radius: 999px !important;
    background: color-mix(in srgb, var(--jc-ink) 42%, transparent) !important;
    transform: rotate(45deg) !important;
    transform-origin: left center !important;
    pointer-events: none !important;
}

.jc-home .jc-home-search > input[type=search],
.jc-home-search > input[type=search] {
    display: block !important;
    flex: 1 1 auto !important;
    order: 1 !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 46px !important;
    height: 46px !important;
    padding: 0 18px 0 42px !important;
    margin: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    border-radius: 999px !important;
    background: transparent !important;
    color: var(--jc-ink) !important;
    font: inherit !important;
    font-size: 15px !important;
    font-weight: 720 !important;
    letter-spacing: -0.01em !important;
    line-height: 46px !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.jc-home .jc-home-search > input[type=search]::placeholder,
.jc-home-search > input[type=search]::placeholder {
    color: color-mix(in srgb, var(--jc-ink) 46%, var(--jc-muted) 54%) !important;
    opacity: 1 !important;
}

.jc-home .jc-home-search > button,
.jc-home .jc-home-search > button[type=submit],
.jc-home-search > button,
.jc-home-search > button[type=submit] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
    order: 2 !important;
    width: auto !important;
    min-width: 96px !important;
    max-width: none !important;
    min-height: 46px !important;
    height: 46px !important;
    padding: 0 22px !important;
    margin: 0 !important;
    border: 1px solid rgba(72, 48, 40, 0.12) !important;
    border-radius: 999px !important;
    background: #d3c0b9 !important;
    color: #241714 !important;
    cursor: pointer !important;
    font: inherit !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    letter-spacing: 0.02em !important;
    text-decoration: none !important;
    text-transform: none !important;
    white-space: nowrap !important;
    box-shadow: 0 12px 28px rgba(72, 48, 40, 0.12) !important;
}

html[data-theme=dark] .jc-home .jc-home-search,
html[data-theme=dark] .jc-home-search {
    border-color: rgba(239, 231, 221, 0.12) !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)) !important;
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

html[data-theme=dark] .jc-home .jc-home-search > input[type=search],
html[data-theme=dark] .jc-home-search > input[type=search] {
    color: rgba(246, 239, 227, 0.92) !important;
}

html[data-theme=dark] .jc-home .jc-home-search > button,
html[data-theme=dark] .jc-home-search > button {
    border-color: rgba(211, 192, 185, 0.24) !important;
    background: #d3c0b9 !important;
    color: #241714 !important;
}

.jc-home-search--above-buttons {
    margin-top: clamp(16px, 2vw, 22px) !important;
    margin-bottom: clamp(12px, 2vw, 18px) !important;
}

.jc-home-search--below-buttons {
    margin-top: clamp(16px, 2vw, 24px) !important;
}

.jc-home-search-wrap--above-latest-fonts {
    margin-top: clamp(20px, 4vw, 46px) !important;
    margin-bottom: 0 !important;
}

@media (max-width: 640px) {
    .jc-home .jc-home-search,
    .jc-home-search {
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
        max-width: 440px !important;
        border-radius: 28px !important;
        padding: 10px !important;
        gap: 8px !important;
    }

    .jc-home .jc-home-search::before,
    .jc-home-search::before {
        top: 32px !important;
        transform: translateY(-50%) !important;
    }

    .jc-home .jc-home-search::after,
    .jc-home-search::after {
        top: 39px !important;
    }

    .jc-home .jc-home-search > input[type=search],
    .jc-home-search > input[type=search],
    .jc-home .jc-home-search > button,
    .jc-home-search > button {
        width: 100% !important;
        min-width: 0 !important;
        height: 44px !important;
        min-height: 44px !important;
    }
}
