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

.search-page-body {
    min-height: 100vh;
    padding-bottom: 110px;
}


/* =========================================================
   ICON
========================================================= */

.ui-icon {
    width: 20px;
    height: 20px;

    display: block;

    fill: none;
    stroke: currentColor;

    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;

    flex-shrink: 0;
}


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

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-button {
    position: relative;

    width: 42px;
    height: 42px;

    display: grid;
    place-items: center;

    border: 1px solid rgba(255,255,255,.8);
    border-radius: 14px;

    background: rgba(255,255,255,.55);

    color: var(--text);

    text-decoration: none;

    cursor: pointer;

    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);

    transition:
        transform .25s ease,
        background .25s ease,
        box-shadow .25s ease;
}

.icon-button:hover {
    transform: translateY(-2px);

    background: rgba(255,255,255,.85);

    box-shadow:
        0 10px 28px rgba(70,45,60,.12);
}

.header-cart .cart-count {
    position: absolute;

    top: -5px;
    right: -5px;

    min-width: 18px;
    height: 18px;

    padding: 0 4px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    background: #d9789b;
    color: #fff;

    border: 2px solid #fff;

    font-size: 9px;
    font-weight: 900;
}


/* =========================================================
   MAIN
========================================================= */

.search-main {
    width: min(1180px, calc(100% - 32px));

    margin: 0 auto;

    padding:
        28px
        0
        80px;
}


/* =========================================================
   BACK
========================================================= */

.back-to-store {
    width: fit-content;

    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 11px 17px;

    margin-bottom: 25px;

    border: 1px solid rgba(255,255,255,.85);
    border-radius: 16px;

    background: rgba(255,255,255,.58);

    color: var(--text);

    text-decoration: none;

    font-size: 13px;
    font-weight: 800;

    backdrop-filter: blur(16px);

    box-shadow:
        0 12px 35px rgba(80,55,70,.08);

    transition: .25s ease;
}

.back-to-store:hover {
    transform: translateX(4px);
}

.back-to-store .ui-icon {
    width: 18px;
    height: 18px;
}


/* =========================================================
   HERO
========================================================= */

.search-hero {
    position: relative;

    padding: 48px 25px;

    margin-bottom: 25px;

    overflow: hidden;

    text-align: center;

    border: 1px solid rgba(255,255,255,.9);
    border-radius: 30px;

    background:
        radial-gradient(
            circle at 20% 20%,
            rgba(240,182,200,.24),
            transparent 30%
        ),
        radial-gradient(
            circle at 80% 80%,
            rgba(201,164,93,.12),
            transparent 32%
        ),
        rgba(255,255,255,.55);

    box-shadow:
        0 22px 65px rgba(80,50,65,.09);

    backdrop-filter: blur(22px);
}

.hero-icon {
    width: 64px;
    height: 64px;

    display: grid;
    place-items: center;

    margin: 0 auto 15px;

    border-radius: 20px;

    background: rgba(217,120,155,.1);

    color: #c87593;
}

.hero-icon .ui-icon {
    width: 29px;
    height: 29px;

    stroke-width: 1.7;
}

.hero-kicker {
    display: block;

    margin-bottom: 8px;

    color: #b98552;

    font-size: 10px;
    font-weight: 900;

    letter-spacing: 2px;
}

.search-hero h1 {
    margin: 0 0 10px;

    color: var(--text);

    font-size: clamp(27px, 5vw, 43px);

    font-weight: 950;
}

.search-hero p {
    margin: 0;

    color: var(--muted);

    font-size: 13px;

    line-height: 2;
}


/* =========================================================
   SEARCH BOX
========================================================= */

.search-box-section {
    margin-bottom: 45px;
}

.search-box {
    display: flex;
    align-items: center;

    min-height: 66px;

    padding: 7px;

    border: 1px solid rgba(255,255,255,.92);
    border-radius: 21px;

    background: rgba(255,255,255,.68);

    box-shadow:
        0 17px 50px rgba(80,55,70,.1),
        inset 0 1px 0 rgba(255,255,255,.9);

    backdrop-filter: blur(20px);

    transition:
        box-shadow .25s ease,
        border-color .25s ease;
}

.search-box:focus-within {
    border-color: rgba(217,120,155,.3);

    box-shadow:
        0 20px 55px rgba(217,120,155,.13);
}

.search-field-icon {
    width: 48px;
    height: 48px;

    display: grid;
    place-items: center;

    flex-shrink: 0;

    color: #c77593;
}

.search-field-icon .ui-icon {
    width: 21px;
    height: 21px;
}

.search-box input {
    min-width: 0;
    flex: 1;

    height: 50px;

    border: 0;
    outline: 0;

    background: transparent;

    color: var(--text);

    font-family: inherit;

    font-size: 14px;
    font-weight: 700;
}

.search-box input::placeholder {
    color: var(--muted);
    opacity: .7;
}

.clear-search {
    width: 40px;
    height: 40px;

    display: grid;
    place-items: center;

    flex-shrink: 0;

    border: 0;
    border-radius: 12px;

    background: transparent;

    color: var(--muted);

    cursor: pointer;

    opacity: 0;

    pointer-events: none;

    transition: .2s ease;
}

.clear-search.visible {
    opacity: 1;

    pointer-events: auto;
}

.clear-search:hover {
    background: rgba(217,120,155,.1);

    color: #c77593;
}

.clear-search .ui-icon {
    width: 17px;
    height: 17px;
}

.search-submit {
    min-width: 105px;
    height: 50px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    border: 0;
    border-radius: 15px;

    background:
        linear-gradient(
            135deg,
            #d9789b,
            #c989a1
        );

    color: #fff;

    font-family: inherit;

    font-size: 12px;
    font-weight: 900;

    cursor: pointer;

    box-shadow:
        0 9px 25px rgba(217,120,155,.2);

    transition: .25s ease;
}

.search-submit:hover {
    transform: translateY(-2px);

    box-shadow:
        0 13px 30px rgba(217,120,155,.28);
}

.search-submit .ui-icon {
    width: 17px;
    height: 17px;
}


/* =========================================================
   SUGGESTIONS
========================================================= */

.search-suggestions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 7px;

    margin-top: 12px;

    padding: 0 7px;
}

.search-suggestions > span {
    color: var(--muted);

    font-size: 10px;
    font-weight: 700;
}

.search-suggestions button {
    padding: 7px 11px;

    border: 1px solid rgba(255,255,255,.8);
    border-radius: 10px;

    background: rgba(255,255,255,.48);

    color: var(--text);

    font-family: inherit;

    font-size: 10px;
    font-weight: 800;

    cursor: pointer;

    transition: .2s ease;
}

.search-suggestions button:hover {
    transform: translateY(-1px);

    background: rgba(217,120,155,.1);

    color: #c77593;
}


/* =========================================================
   RESULTS HEADER
========================================================= */

.results-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 20px;
}

.results-kicker {
    display: block;

    margin-bottom: 5px;

    color: #c07892;

    font-size: 10px;
    font-weight: 900;
}

.results-header h2 {
    margin: 0;

    color: var(--text);

    font-size: 25px;
    font-weight: 950;
}

.results-count {
    display: flex;
    align-items: center;
    gap: 5px;

    padding: 9px 13px;

    border: 1px solid rgba(255,255,255,.85);
    border-radius: 13px;

    background: rgba(255,255,255,.5);

    color: var(--muted);

    font-size: 10px;
    font-weight: 800;
}

.results-count span:first-child {
    color: #c77593;

    font-size: 15px;
    font-weight: 950;
}


/* =========================================================
   RESULTS GRID
========================================================= */

.search-results-grid {
    display: grid;

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

    gap: 17px;
}


/* =========================================================
   PRODUCT CARD
========================================================= */

.search-product-card {
    position: relative;

    display: flex;
    flex-direction: column;

    min-width: 0;

    padding: 12px;

    border: 1px solid rgba(255,255,255,.88);
    border-radius: 22px;

    background: rgba(255,255,255,.57);

    color: var(--text);

    text-decoration: none;

    box-shadow:
        0 15px 40px rgba(80,55,70,.07);

    overflow: hidden;

    backdrop-filter: blur(15px);

    transition:
        transform .3s ease,
        box-shadow .3s ease;
}

.search-product-card:hover {
    transform: translateY(-6px);

    box-shadow:
        0 23px 50px rgba(80,55,70,.13);
}


/* =========================================================
   PRODUCT VISUAL
========================================================= */

.search-product-image {
    position: relative;

    aspect-ratio: 1 / 1;

    display: grid;
    place-items: center;

    margin-bottom: 13px;

    border-radius: 17px;

    overflow: hidden;

    background:
        radial-gradient(
            circle at 30% 25%,
            rgba(255,255,255,.95),
            transparent 30%
        ),
        radial-gradient(
            circle at 80% 80%,
            rgba(240,182,200,.22),
            transparent 45%
        ),
        linear-gradient(
            145deg,
            rgba(255,255,255,.9),
            rgba(248,231,238,.6)
        );
}

.search-product-image .ui-icon {
    width: 43px;
    height: 43px;

    color: rgba(195,123,150,.48);
}

.product-category-badge {
    position: absolute;

    top: 9px;
    right: 9px;

    padding: 5px 8px;

    border-radius: 8px;

    background: rgba(255,255,255,.72);

    color: #b97891;

    font-size: 8px;
    font-weight: 900;

    backdrop-filter: blur(8px);
}


/* =========================================================
   PRODUCT CONTENT
========================================================= */

.search-product-content {
    display: flex;
    flex-direction: column;

    flex: 1;
}

.search-product-content h3 {
    margin: 0 0 8px;

    color: var(--text);

    font-size: 13px;

    line-height: 1.8;

    font-weight: 900;
}

.search-product-description {
    min-height: 39px;

    margin: 0 0 12px;

    color: var(--muted);

    font-size: 9px;

    line-height: 1.9;
}

.search-product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 8px;

    margin-top: auto;
}

.search-product-price {
    color: #bd708e;

    font-size: 12px;
    font-weight: 950;
}

.product-view {
    width: 30px;
    height: 30px;

    display: grid;
    place-items: center;

    border-radius: 10px;

    background: rgba(217,120,155,.1);

    color: #c77593;
}

.product-view .ui-icon {
    width: 15px;
    height: 15px;
}


/* =========================================================
   EMPTY
========================================================= */

.search-empty {
    padding: 70px 20px;

    text-align: center;

    border: 1px solid rgba(255,255,255,.82);
    border-radius: 26px;

    background: rgba(255,255,255,.48);

    box-shadow:
        0 18px 50px rgba(80,55,70,.06);

    backdrop-filter: blur(15px);
}

.empty-icon {
    width: 70px;
    height: 70px;

    display: grid;
    place-items: center;

    margin: 0 auto 17px;

    border-radius: 22px;

    background: rgba(217,120,155,.09);

    color: #c77593;
}

.empty-icon .ui-icon {
    width: 29px;
    height: 29px;
}

.search-empty h3 {
    margin: 0 0 8px;

    color: var(--text);

    font-size: 20px;
    font-weight: 950;
}

.search-empty p {
    margin: 0 auto 20px;

    max-width: 420px;

    color: var(--muted);

    font-size: 12px;

    line-height: 2;
}

.search-empty button {
    padding: 11px 18px;

    border: 0;
    border-radius: 13px;

    background:
        linear-gradient(
            135deg,
            #d9789b,
            #c989a1
        );

    color: #fff;

    font-family: inherit;

    font-size: 11px;
    font-weight: 900;

    cursor: pointer;
}


/* =========================================================
   BOTTOM CONTROL BAR
========================================================= */

.bottom-control-bar {
    position: fixed;

    left: 50%;
    bottom: 12px;

    transform: translateX(-50%);

    width: min(94%, 620px);
    height: 70px;

    display: grid;

    grid-template-columns:
        repeat(5, 1fr);

    align-items: center;

    padding: 7px;

    border: 1px solid rgba(255,255,255,.92);
    border-radius: 25px;

    background: rgba(255,255,255,.76);

    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);

    box-shadow:
        0 18px 55px rgba(70,45,60,.16),
        inset 0 1px 0 rgba(255,255,255,.95);

    z-index: 9990;
}

.bottom-control-item {
    position: relative;

    height: 56px;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 3px;

    border-radius: 19px;

    color: var(--muted);

    text-decoration: none;

    font-size: 9px;
    font-weight: 800;

    transition: .25s ease;
}

.bottom-control-item:hover {
    color: var(--text);
}

.bottom-control-item.active {
    color: #c96f8f;

    background: rgba(217,120,155,.09);
}

.bottom-control-icon {
    width: 24px;
    height: 24px;

    display: grid;
    place-items: center;

    transition: transform .25s ease;
}

.bottom-control-item.active .bottom-control-icon,
.bottom-control-item:hover .bottom-control-icon {
    transform: translateY(-2px);
}

.bottom-control-item.active .ui-icon {
    stroke-width: 2;
}

.bottom-cart-count {
    position: absolute;

    top: 5px;
    right: calc(50% - 21px);

    min-width: 16px;
    height: 16px;

    display: grid;
    place-items: center;

    padding: 0 3px;

    border-radius: 50%;

    background: #d9789b;

    color: #fff;

    border: 2px solid rgba(255,255,255,.9);

    font-size: 8px;
    font-weight: 900;
}


/* =========================================================
   DARK MODE
========================================================= */

body.dark-mode .icon-button,
body.dark-mode .back-to-store,
body.dark-mode .search-hero,
body.dark-mode .search-box,
body.dark-mode .search-product-card,
body.dark-mode .search-empty,
body.dark-mode .results-count,
body.dark-mode .search-suggestions button,
body.dark-mode .bottom-control-bar {
    border-color: rgba(255,255,255,.08);

    background: rgba(35,31,36,.78);
}

body.dark-mode .search-product-image {
    background:
        radial-gradient(
            circle,
            rgba(70,61,68,.95),
            rgba(43,38,42,.85)
        );
}

body.dark-mode .product-category-badge {
    background: rgba(35,31,36,.82);

    border: 1px solid rgba(255,255,255,.06);
}

body.dark-mode .bottom-control-bar {
    box-shadow:
        0 18px 55px rgba(0,0,0,.35);
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1000px) {

    .search-results-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }
}


@media (max-width: 720px) {

    .search-main {
        width: calc(100% - 20px);

        padding-top: 18px;
    }

    .search-hero {
        padding: 38px 18px;
    }

    .search-results-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 12px;
    }

    .search-product-card {
        padding: 9px;

        border-radius: 18px;
    }

    .search-product-image {
        border-radius: 14px;
    }

    .search-product-content h3 {
        font-size: 11px;
    }

    .search-product-price {
        font-size: 10px;
    }

    .product-view {
        width: 27px;
        height: 27px;
    }

    .bottom-control-bar {
        bottom: 8px;

        width: calc(100% - 14px);

        height: 66px;

        border-radius: 22px;
    }

    .bottom-control-item {
        height: 52px;
    }

    .bottom-control-item > span:last-of-type {
        font-size: 8px;
    }
}


@media (max-width: 500px) {

    .search-box {
        min-height: 58px;
    }

    .search-field-icon {
        width: 39px;
    }

    .search-box input {
        font-size: 12px;
    }

    .search-submit {
        min-width: 47px;

        width: 47px;

        padding: 0;
    }

    .search-submit span {
        display: none;
    }

    .search-submit .ui-icon {
        width: 18px;
        height: 18px;
    }

    .clear-search {
        width: 32px;
    }

    .results-header h2 {
        font-size: 20px;
    }

    .results-count {
        padding: 7px 9px;
    }

    .search-suggestions {
        gap: 5px;
    }

    .search-suggestions > span {
        width: 100%;
        margin-bottom: 2px;
    }
}


@media (max-width: 380px) {

    .brand-text small {
        display: none;
    }

    .brand-text strong {
        font-size: 12px;
    }

    .brand-icon {
        width: 35px;
        height: 35px;
    }

    .icon-button {
        width: 38px;
        height: 38px;
    }

    .search-results-grid {
        gap: 9px;
    }

    .search-product-description {
        display: none;
    }
}