/* =========================================================
   Space Vanta — Search
   SEARCH V0.7-C
   Layout + Typography + Structure
   ========================================================= */


/* =========================================================
   PAGE
   ========================================================= */

.sv-search {
    width: 100%;
}

.sv-search__inner {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 72px 32px 100px;
    box-sizing: border-box;
}


/* =========================================================
   SEARCH HEADER
   ========================================================= */

.sv-search__header {
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
    text-align: center;
}


/* =========================================================
   SEARCH TITLE
   ========================================================= */

.sv-search__title {
    margin: 0 0 14px;

    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;

    letter-spacing: 0.18em;
    text-transform: uppercase;

    opacity: 0.62;
}


/* =========================================================
   SEARCH SUBTITLE
   ========================================================= */

.sv-search__subtitle {
    max-width: 560px;
    margin: 0 auto;

    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;

    opacity: 0.62;
}


/* =========================================================
   SEARCH FORM
   ========================================================= */

.sv-search__form {
    display: flex;
    align-items: stretch;

    width: 100%;
    max-width: 840px;
    min-height: 68px;

    margin: 32px auto 0;

    box-sizing: border-box;
}


/* =========================================================
   SEARCH INPUT
   ========================================================= */

.sv-search__input {
    flex: 1 1 auto;

    min-width: 0;
    width: 100%;
    height: 68px;

    padding: 0 24px;

    box-sizing: border-box;

    border: 1px solid rgba(0, 0, 0, 0.16);
    border-right: 0;
    border-radius: 8px 0 0 8px;

    background: transparent;
    color: inherit;

    font-size: 18px;
    font-weight: 400;
    line-height: 1.4;

    outline: none;

    transition:
        border-color 220ms ease,
        background-color 220ms ease,
        box-shadow 220ms ease;
}

.sv-search__input::placeholder {
    color: inherit;
    opacity: 0.42;
}

.sv-search__input:focus {
    border-color: rgba(0, 0, 0, 0.30);

    background-color: rgba(255, 255, 255, 0.45);

    box-shadow:
        inset 0 0 0 1px rgba(0, 0, 0, 0.025);
}


/* =========================================================
   SEARCH BUTTON
   ========================================================= */

.sv-search__button {
    flex: 0 0 auto;

    width: 76px;
    height: 68px;

    padding: 0;

    border: 1px solid rgba(0, 0, 0, 0.16);
    border-radius: 0 8px 8px 0;

    background: transparent;
    color: inherit;

    font-size: 0;

    cursor: pointer;

    transition:
        border-color 220ms ease,
        background-color 220ms ease,
        transform 220ms ease;
}

.sv-search__button::after {
    content: "→";

    display: inline-block;

    font-size: 20px;
    line-height: 1;

    transform: translateX(0);

    transition:
        transform 240ms cubic-bezier(.22, 1, .36, 1);
}

.sv-search__button:hover {
    border-color: rgba(0, 0, 0, 0.28);

    background-color: rgba(0, 0, 0, 0.025);
}

.sv-search__button:hover::after {
    transform: translateX(4px);
}


/* =========================================================
   RESULT CONTEXT
   ========================================================= */

.sv-search__result-context {
    display: flex;
    align-items: baseline;

    gap: 10px;

    width: 100%;

    margin-top: 72px;
    padding-bottom: 18px;

    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.sv-search__result-context-label {
    font-size: 11px;
    font-weight: 500;
    line-height: 1.4;

    letter-spacing: 0.16em;
    text-transform: uppercase;

    opacity: 0.48;
}

.sv-search__result-context-term {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;

    letter-spacing: -0.01em;
}


/* =========================================================
   RESULT GROUPS
   ========================================================= */

.sv-search__group {
    width: 100%;

    margin-top: 88px;
}


/* =========================================================
   GROUP HEADER
   ========================================================= */

.sv-search__group-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;

    width: 100%;

    margin-bottom: 28px;
}

.sv-search__group-title {
    margin: 0;

    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;

    letter-spacing: 0.16em;
    text-transform: uppercase;

    opacity: 0.62;
}


/* =========================================================
   RESULT GRID
   ========================================================= */

.sv-search__grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    width: 100%;
}


/* =========================================================
   COLLECTION GRID
   ========================================================= */

.sv-search__grid--collections {
    gap: 24px;
}


/* =========================================================
   PRODUCT GRID
   ========================================================= */

.sv-search__grid--products {
    gap: 40px 24px;
}


/* =========================================================
   SEARCH CARD — STRUCTURE ONLY
   ========================================================= */

.sv-search__card {
    display: block;

    width: 100%;

    color: inherit;
    text-decoration: none;
}


/* =========================================================
   CARD CONTENT
   ========================================================= */

.sv-search__card-content {
    width: 100%;

    padding-top: 16px;
}

.sv-search__card-title {
    margin: 0;

    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
}

.sv-search__card-price {
    margin-top: 6px;

    font-size: 14px;
    line-height: 1.4;

    opacity: 0.68;
}


/* =========================================================
   EMPTY STATE PLACEHOLDER
   =========================================================

   Empty State itself is handled by:
   sections/empty-state/empty-state.html

   Its original CSS remains independent.

   Search only reserves the structural container.
   ========================================================= */

.sv-search__empty {
    width: 100%;
}


/* =========================================================
   ACCESSIBILITY
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .sv-search__input,
    .sv-search__button,
    .sv-search__button::after {
        transition: none;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 749px) {

    /* -----------------------------------------
       Page
       ----------------------------------------- */

    .sv-search__inner {
        padding: 52px 20px 72px;
    }


    /* -----------------------------------------
       Header
       ----------------------------------------- */

    .sv-search__header {
        max-width: none;
    }


    /* -----------------------------------------
       Title
       ----------------------------------------- */

    .sv-search__title {
        margin-bottom: 12px;

        font-size: 11px;
        letter-spacing: 0.16em;
    }


    /* -----------------------------------------
       Subtitle
       ----------------------------------------- */

    .sv-search__subtitle {
        max-width: 340px;

        font-size: 14px;
        line-height: 1.55;
    }


    /* -----------------------------------------
       Result Context
       ----------------------------------------- */

    .sv-search__result-context {
        flex-wrap: wrap;

        gap: 6px;

        margin-top: 52px;
        padding-bottom: 14px;
    }

    .sv-search__result-context-label {
        font-size: 10px;
        letter-spacing: 0.14em;
    }

    .sv-search__result-context-term {
        font-size: 15px;
    }


    /* -----------------------------------------
       Search Form
       ----------------------------------------- */

    .sv-search__form {
        min-height: 60px;

        margin-top: 24px;
    }


    /* -----------------------------------------
       Search Input
       ----------------------------------------- */

    .sv-search__input {
        height: 60px;

        padding: 0 18px;

        font-size: 16px;

        border-radius: 7px 0 0 7px;
    }


    /* -----------------------------------------
       Search Button
       ----------------------------------------- */

    .sv-search__button {
        width: 62px;
        height: 60px;

        border-radius: 0 7px 7px 0;
    }

    .sv-search__button::after {
        font-size: 18px;
    }


    /* -----------------------------------------
       Result Groups
       ----------------------------------------- */

    .sv-search__group {
        margin-top: 64px;
    }


    /* -----------------------------------------
       Group Header
       ----------------------------------------- */

    .sv-search__group-header {
        margin-bottom: 20px;
    }

    .sv-search__group-title {
        font-size: 11px;
        letter-spacing: 0.14em;
    }


    /* -----------------------------------------
       Collection Grid
       ----------------------------------------- */

    .sv-search__grid--collections {
        gap: 16px;
    }


    /* -----------------------------------------
       Product Grid
       ----------------------------------------- */

    .sv-search__grid--products {
        gap: 28px 12px;
    }


    /* -----------------------------------------
       Card Content
       ----------------------------------------- */

    .sv-search__card-content {
        padding-top: 12px;
    }

    .sv-search__card-title {
        font-size: 14px;
    }

    .sv-search__card-price {
        margin-top: 5px;

        font-size: 13px;
    }
}