/* =========================================
   FANTOUKIS - shop page extras
   -----------------------------------------
   The search box, the "Sort by" menu, the category groups on the
   "All" tab and the "nothing found" message. (shop.js fills them in.)
   The rest of the shop design is in style.css.
   ========================================= */

/* ----- Things shop.js hides ----- */
.shop-tools[hidden],
.shop-groups[hidden],
.shop-grid[hidden],
.shop-no-results[hidden],
.shop-search-clear[hidden],
#search-all[hidden] {
    display: none !important;
}

/* ----- Search box ----- */
.shop-tools {
    margin-bottom: 20px;
}

.shop-search {
    position: relative;
    max-width: 520px;
    margin: 0 auto 22px;
}

.shop-search > svg {
    position: absolute;
    left: 18px;
    top: 50%;
    width: 20px;
    height: 20px;
    transform: translateY(-50%);
    fill: none;
    stroke: var(--muted);
    stroke-width: 2;
    stroke-linecap: round;
    pointer-events: none;
}

.shop-search input {
    width: 100%;
    font-family: var(--font-body);
    font-size: 16px;            /* 16px stops iPhones zooming in */
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 13px 48px 13px 48px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    -webkit-appearance: none;
    appearance: none;
}

.shop-search input::placeholder {
    color: var(--muted);
    opacity: 0.8;
}

.shop-search input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(217, 70, 122, 0.12);
}

/* Hide the browser's own little "x" (we have our own) */
.shop-search input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    display: none;
}

.shop-search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    background: var(--cream);
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

.shop-search-clear:hover {
    background: var(--pink);
}

.shop-search-clear svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: var(--ink);
    stroke-width: 2.2;
    stroke-linecap: round;
}

/* ----- Product count + Sort by, in one row ----- */
.shop-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.shop-meta .product-count {
    margin-bottom: 0;
}

.shop-sort {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 15px;
    min-width: 0;
}

.shop-sort select {
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
    color: var(--ink);
    background-color: var(--white);
    /* a small arrow drawn in the brand ink color */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m7 10 5 5 5-5' fill='none' stroke='%232B2230' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 36px 8px 16px;
    cursor: pointer;
    max-width: 100%;
    -webkit-appearance: none;
    appearance: none;
}

.shop-sort select:hover,
.shop-sort select:focus {
    border-color: var(--ink);
    outline: none;
}

/* ----- Category groups on the "All" tab ----- */
.shop-group + .shop-group {
    margin-top: 48px;
}

.shop-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.shop-group-head h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 26px;
    min-width: 0;
}

.shop-group-dot {
    flex: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(43, 34, 48, 0.12);
}

/* ----- "Bestseller" sticker (top 2 sellers of each category) ----- */
.bestseller-sticker {
    position: absolute;
    z-index: 2;
    top: 12px;
    right: 12px;
    padding: 5px 11px;
    border: 2px solid #FFFFFF;
    border-radius: 999px;
    background: var(--yellow);
    color: #6A5310;
    font-family: var(--font-logo);
    font-weight: 600;
    font-size: 13px;
    line-height: 1.2;
    letter-spacing: 0.01em;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(43, 34, 48, 0.12);
    transform: rotate(4deg);
    pointer-events: none;
}

/* ----- Nothing found ----- */
.shop-no-results {
    text-align: center;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 40px 24px;
    max-width: 560px;
    margin: 10px auto 0;
    color: var(--muted);
}

.shop-no-results-title {
    font-family: var(--font-heading);
    font-size: 22px;
    color: var(--ink);
    margin-bottom: 6px;
}

.shop-no-results .btn {
    margin-top: 18px;
}

/* ----- "See all N …" (All tab) and "Show 24 more" (category tab) ----- */
.shop-more {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    margin-top: 26px;
}

.shop-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    min-height: 54px;
    padding: 14px 30px;
    border: none;
    border-radius: 999px;
    background: var(--accent, #D9467A);
    color: #FFFFFF;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 19px;
    cursor: pointer;
    box-shadow: 0 6px 0 #8A2C6E, 0 10px 24px rgba(138, 44, 110, 0.25);
    transition: transform 0.12s, box-shadow 0.12s;
}

.shop-more-btn:hover {
    transform: translateY(-2px);
}

.shop-more-btn:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 #8A2C6E, 0 4px 10px rgba(138, 44, 110, 0.2);
}

.shop-more-left {
    font-weight: 500;
    font-size: 15px;
    opacity: 0.9;
}

/* ----- Series filter chips (on a category tab) ----- */
.series-bar {
    margin: -6px 0 22px;
}

.series-title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 16px;
    color: var(--ink);
    margin-bottom: 10px;
}

.series-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.series-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--white);
    color: var(--ink);
    font-size: 15px;
    cursor: pointer;
}

.series-chip:hover {
    border-color: var(--ink);
}

.series-chip.active {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--white);
}

.series-count {
    min-width: 24px;
    padding: 1px 7px;
    border-radius: 999px;
    background: #F7E1E8;
    color: #8A2C6E;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

.series-chip.active .series-count {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
}

/* ----- Phones ----- */
@media (max-width: 600px) {
    .shop-search {
        margin-bottom: 16px;
    }

    .shop-sort > span {
        display: none;   /* the menu itself says how it's sorted */
    }

    .shop-sort select {
        font-size: 14px;
        padding: 7px 32px 7px 14px;
    }

    .shop-group + .shop-group {
        margin-top: 36px;
    }

    .shop-group-head h2 {
        font-size: 21px;
    }

    .shop-more-btn {
        width: 100%;
        font-size: 17px;
    }

    .series-chips {
        flex-wrap: nowrap;
        overflow-x: auto;
        margin: 0 -20px;
        padding: 0 20px 6px;
        scrollbar-width: none;
    }

    .series-chips::-webkit-scrollbar {
        display: none;
    }

    .series-chip {
        flex: none;
        font-size: 14px;
    }

    .bestseller-sticker {
        top: 8px;
        right: 8px;
        font-size: 11px;
        padding: 4px 8px;
    }
}
