/*
 * YAWNK shared styles: one set of colours, corners, shadows and photo shape.
 * Pages should use these tokens instead of hard-coding values, so the whole
 * site reads as one app. Loaded on every page from shared/base.html.
 */
:root {
    /* Colour */
    --yk-red: #D72539;          /* brand, prices on sale, primary action */
    --yk-red-dark: #b81e30;
    --yk-ink: #111111;          /* headings and main text */
    --yk-ink-2: #555555;        /* secondary text */
    --yk-muted: #8a8a8a;        /* hints, struck-through prices */
    --yk-line: #e8e8e8;         /* borders and dividers */
    --yk-soft: #f6f6f6;         /* panels, photo placeholders */
    --yk-bg: #ffffff;
    --yk-ok: #1f9d55;
    --yk-warn: #b7791f;
    --yk-info: #1565c0;

    /* Shape */
    --yk-radius-sm: 8px;        /* inputs, chips, small cards */
    --yk-radius: 12px;          /* cards and panels */
    --yk-radius-pill: 999px;
    --yk-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    --yk-shadow-lift: 0 6px 20px rgba(0, 0, 0, 0.10);

    /* Every listing photo on the site uses this shape */
    --yk-photo-ratio: 4 / 5;

    /* Spacing */
    --yk-gap: 12px;
    --yk-pad: 16px;
}

/* ── Shared building blocks ─────────────────────────────────────────────── */

.yk-panel {
    background: var(--yk-bg);
    border: 1px solid var(--yk-line);
    border-radius: var(--yk-radius);
    box-shadow: var(--yk-shadow);
    padding: var(--yk-pad);
}

.yk-h {
    color: var(--yk-ink);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.yk-price { font-weight: 700; color: var(--yk-ink); }
.yk-price.is-sale { color: var(--yk-red); }
.yk-price-was { color: var(--yk-muted); text-decoration: line-through; font-weight: 400; }

.yk-photo {
    position: relative;
    width: 100%;
    aspect-ratio: var(--yk-photo-ratio);
    overflow: hidden;
    background: var(--yk-soft);
}
.yk-photo > img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Filter chips (shop) */
.yk-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 0 10px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.yk-chips::-webkit-scrollbar { display: none; }
.yk-chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1px solid var(--yk-line);
    border-radius: var(--yk-radius-pill);
    background: var(--yk-bg);
    color: var(--yk-ink);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}
.yk-chip:hover { border-color: var(--yk-ink); color: var(--yk-ink); }
.yk-chip.is-on { background: var(--yk-ink); border-color: var(--yk-ink); color: #fff; }
.yk-chip-label { font-size: 12px; color: var(--yk-muted); align-self: center; flex: 0 0 auto; }

/* Heart on product cards */
.yk-heart {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--yk-ink);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    z-index: 3;
    padding: 0;
}
.yk-heart.is-on { color: var(--yk-red); }
.yk-heart:active { transform: scale(0.9); }

.yk-card-brand {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--yk-ink-2);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Big heart that pops when a photo is double-tapped on the product page */
.yk-like-burst {
    position: absolute;
    left: 50%;
    top: 50%;
    font-size: 90px;
    color: #fff;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    pointer-events: none;
    z-index: 5;
}
.yk-like-burst.go { animation: yk-burst 0.8s ease-out; }
@keyframes yk-burst {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    20% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
    40% { transform: translate(-50%, -50%) scale(0.95); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

/* ---- Mobile menu (offcanvas) ---- */
/* The theme paints a bright blue (--fc-light-primary) behind icon buttons on hover; on phones a
   tap leaves that "hover" stuck. Soft grey on real hover devices only, nothing on touch. */
.icon-hover:hover { background-color: transparent; }
@media (hover: hover) { .icon-hover:hover { background-color: var(--yk-soft); } }
.navbar-toggler, .icon-hover, #navbar-default a, #navbar-default button { -webkit-tap-highlight-color: transparent; }
#navbar-default .btn-close:focus { box-shadow: none; }
#navbar-default:focus, #navbar-default:focus-visible { outline: none; }
/* Long menus scroll inside the panel without dragging the page behind */
#navbar-default .offcanvas-body { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
