/* rx-wishlist.css — the shop's wishlist (owner 2026-11-17).
 *
 *  A heart on every product card and on the product page, a small count on the
 *  header button, and a sheet that lists what was saved. Colours come from the
 *  store's own theme variables (--acc-fill, --card, --line, --ink…), so every
 *  store — mirlaki, smartify, or one opened later — gets its own look.
 *
 *  Nothing of the app's layout is rewritten: the heart sits on the card's
 *  picture corner (the card is made position:relative here) and the sheet is
 *  its own layer above the header and the phone tab bar, below the cart drawer
 *  (900).
 */

/* ---------------- the heart on a grid card ---------------- */

.sf-card {
    position: relative;
}

.rx-wl-h {
    position: absolute;
    top: 8px;
    inset-inline-end: 8px;
    z-index: 3;
    width: 34px;
    height: 34px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .9);
    color: #4a3a3d;
    box-shadow: 0 2px 8px rgba(20, 12, 14, .16);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform .15s ease, background .15s ease, color .15s ease;
}

/* its own hit area, a little bigger than the circle it draws */
.rx-wl-h::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
}

.rx-wl-h svg {
    width: 18px;
    height: 18px;
    display: block;
    overflow: visible;
}

.rx-wl-h svg path {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.rx-wl-h:hover {
    background: #fff;
}

.rx-wl-h:active {
    transform: scale(.9);
}

.rx-wl-h.is-on {
    background: var(--acc-fill, #b76e79);
    color: #fff;
}

.rx-wl-h.is-on svg path {
    fill: currentColor;
    stroke: currentColor;
}

/* in the card's own row, right beside the "+" (the card's row is the flex
   container the app already draws): a smaller, flatter button that matches the
   round + next to it */
.sf-prow {
    flex-wrap: nowrap;
}

/* the price keeps the room it had; the two small buttons sit together at the
   end of the row, the heart just before the "+" */
.sf-prow .sf-price {
    flex: 1 1 auto;
}

.sf-prow .rx-wl-h {
    position: static;
    top: auto;
    inset-inline-end: auto;
    order: 1;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    margin: 0;
    background: var(--acc-soft, rgba(183, 110, 121, .12));
    color: var(--acc-text, #8d4c56);
    box-shadow: none;
}

/* the "+" shrinks with it, so the two small buttons read as one pair
   (his message, 2026-11-17) */
.sf-prow .sf-add {
    order: 2;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    font-size: 16px;
}

.sf-prow .rx-wl-h::after {
    inset: -8px;
}

.sf-prow .rx-wl-h svg {
    width: 15px;
    height: 15px;
}

.sf-prow .rx-wl-h.is-on {
    background: var(--acc-fill, #b76e79);
    color: #fff;
}

/* the little pop when it is saved from a card */
.rx-wl-h.is-pop {
    animation: rx-wl-pop .32s ease;
}

@keyframes rx-wl-pop {
    0% { transform: scale(1); }
    45% { transform: scale(1.22); }
    100% { transform: scale(1); }
}

/* ---------------- the heart on the product page ---------------- */

.rx-wl-big {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 18px;
    border: 1px solid var(--line, #e0d7d6);
    border-radius: 999px;
    background: var(--card, #fff);
    color: var(--ink, #2b1a1d);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.rx-wl-big svg {
    width: 18px;
    height: 18px;
    display: block;
}

.rx-wl-big svg path {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.rx-wl-big:hover {
    border-color: var(--acc-fill, #b76e79);
    color: var(--acc-fill, #b76e79);
}

.rx-wl-big.is-on {
    border-color: var(--acc-fill, #b76e79);
    background: var(--acc-soft, rgba(183, 110, 121, .08));
    color: var(--acc-fill, #b76e79);
}

.rx-wl-big.is-on svg path {
    fill: currentColor;
    stroke: currentColor;
}

/* ---------------- the button in the header ---------------- */

.rx-wl-top {
    position: relative;
}

.rx-wl-top svg {
    width: 19px;
    height: 19px;
    display: block;
}

.rx-wl-top svg path {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.rx-wl-top.is-on svg path {
    fill: currentColor;
    stroke: currentColor;
}

.rx-wl-top .rx-wl-count {
    position: absolute;
    top: -4px;
    inset-inline-end: -4px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--acc-fill, #b76e79);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 19px;
    text-align: center;
    display: none;
}

.rx-wl-top.has-count .rx-wl-count {
    display: block;
}

/* ---------------- the sheet ---------------- */

.rx-wl {
    position: fixed;
    inset: 0;
    z-index: 870;
    display: none;
}

.rx-wl.is-open {
    display: block;
}

.rx-wl-back {
    position: absolute;
    inset: 0;
    background: rgba(18, 11, 13, .45);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    animation: rx-wl-fade .18s ease;
}

.rx-wl-panel {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    max-height: 86vh;
    display: flex;
    flex-direction: column;
    background: var(--card, #fff);
    color: var(--ink, #2b1a1d);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -14px 40px rgba(20, 12, 14, .22);
    animation: rx-wl-up .24s cubic-bezier(.22, .8, .3, 1);
    font-family: inherit;
}

@keyframes rx-wl-up {
    from { transform: translateY(22px); opacity: .6; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes rx-wl-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.rx-wl-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px 16px 11px;
    border-bottom: 1px solid var(--line, #e0d7d6);
    flex: 0 0 auto;
}

.rx-wl-t {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -.01em;
}

.rx-wl-n {
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--acc-soft, rgba(183, 110, 121, .08));
    color: var(--acc-text, #b76e79);
    font-size: 12px;
    font-weight: 700;
    line-height: 22px;
    text-align: center;
}

.rx-wl-x {
    margin-inline-start: auto;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--line-2, #f2eceb);
    color: var(--ink-2, #5c4a4d);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.rx-wl-x svg {
    width: 16px;
    height: 16px;
}

.rx-wl-x svg path {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.rx-wl-b {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding: 14px 14px calc(18px + env(safe-area-inset-bottom, 0px));
    flex: 1 1 auto;
}

.rx-wl-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
}

.rx-wl-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--card, #fff);
    border: 1px solid var(--line, #e0d7d6);
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

.rx-wl-img {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    background: var(--line-2, #f2eceb);
    overflow: hidden;
}

.rx-wl-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rx-wl-rm {
    position: absolute;
    top: 5px;
    inset-inline-end: 5px;
    z-index: 2;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--acc-fill, #b76e79);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(20, 12, 14, .2);
    -webkit-tap-highlight-color: transparent;
}

.rx-wl-rm svg {
    width: 13px;
    height: 13px;
}

.rx-wl-rm svg path {
    fill: currentColor;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linejoin: round;
}

.rx-wl-b2 {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 7px 7px 8px;
}

.rx-wl-name {
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rx-wl-price {
    font-size: 12px;
    font-weight: 700;
    color: var(--acc-text, #b76e79);
}

.rx-wl-price s {
    margin-inline-start: 4px;
    font-weight: 500;
    font-size: 10.5px;
    color: var(--ink-3, #8a777a);
}

.rx-wl-empty {
    padding: 26px 18px 30px;
    text-align: center;
    color: var(--ink-2, #5c4a4d);
}

.rx-wl-empty svg {
    width: 46px;
    height: 46px;
    margin: 0 auto 12px;
    display: block;
    color: var(--acc-fill, #b76e79);
}

.rx-wl-empty svg path {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linejoin: round;
}

.rx-wl-empty b {
    display: block;
    font-size: 15px;
    color: var(--ink, #2b1a1d);
    margin-bottom: 6px;
}

.rx-wl-empty p {
    margin: 0 auto 16px;
    font-size: 13px;
    line-height: 1.5;
    max-width: 30ch;
}

.rx-wl-go {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 20px;
    border-radius: 999px;
    background: var(--acc-fill, #b76e79);
    color: #fff;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
}

/* a wider panel on a computer, centred like a dialog */
@media (min-width: 900px) {
    .rx-wl-panel {
        inset: 0;
        margin: auto;
        width: min(780px, 92vw);
        height: fit-content;
        max-height: 82vh;
        border-radius: 20px;
        animation: rx-wl-in .2s ease;
    }

    @keyframes rx-wl-in {
        from { transform: translateY(10px) scale(.99); opacity: .5; }
        to { transform: none; opacity: 1; }
    }

    .rx-wl-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px;
    }

    .rx-wl-b {
        padding: 18px 18px 22px;
    }
}

html.rx-wl-lock,
html.rx-wl-lock body {
    overflow: hidden;
}

/* ---------------- the small confirmation ---------------- */

.rx-wl-toast {
    position: fixed;
    inset-inline: 0;
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    z-index: 880;
    margin: 0 auto;
    width: fit-content;
    max-width: 84vw;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(30, 20, 23, .92);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    box-shadow: 0 8px 22px rgba(20, 12, 14, .3);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .18s ease, transform .18s ease;
    pointer-events: none;
    text-align: center;
}

.rx-wl-toast.is-on {
    opacity: 1;
    transform: none;
}

@media (min-width: 900px) {
    .rx-wl-toast {
        bottom: 28px;
    }
}

/* three a row, but the text stays comfortable on a wider screen */
@media (min-width: 720px) {
    .rx-wl-rm {
        top: 6px;
        inset-inline-end: 6px;
        width: 30px;
        height: 30px;
    }

    .rx-wl-rm svg {
        width: 15px;
        height: 15px;
    }

    .rx-wl-b2 {
        gap: 4px;
        padding: 9px 10px 11px;
    }

    .rx-wl-name {
        font-size: 13px;
    }

    .rx-wl-price {
        font-size: 13px;
    }

    .rx-wl-price s {
        margin-inline-start: 6px;
        font-size: 11.5px;
    }
}
