/* ---------- Storefront · light theme ---------- */
:root {
    --bg: #fbf8f3;
    --surface: #ffffff;
    --ink: #1d1a16;
    --muted: #6f675d;
    --line: #ece5da;
    --accent: #ff6a3d;
    --accent-dark: #e8501f;
    --accent-soft: #fff0e9;
    --sun: #ffd166;
    --mint: #b8ead2;
    --radius: 20px;
    --shadow: 0 1px 2px rgba(40, 28, 10, .05), 0 8px 24px -12px rgba(40, 28, 10, .18);
    --shadow-lift: 0 2px 4px rgba(40, 28, 10, .06), 0 22px 40px -18px rgba(232, 80, 31, .38);
    --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    overflow: hidden;
    padding: clamp(56px, 12vw, 120px) 16px clamp(40px, 8vw, 72px);
    text-align: center;
    isolation: isolate;
}
.hero-inner { position: relative; max-width: 720px; margin: 0 auto; }

.blob {
    position: absolute; z-index: -1;
    border-radius: 50%;
    filter: blur(50px);
    opacity: .6;
    animation: drift 16s ease-in-out infinite alternate;
}
.b1 { width: 340px; height: 340px; background: #ffc9b3; top: -120px; left: -90px; }
.b2 { width: 300px; height: 300px; background: var(--sun); top: -60px; right: -110px; animation-duration: 20s; animation-delay: -6s; }
.b3 { width: 260px; height: 260px; background: var(--mint); bottom: -150px; left: 38%; animation-duration: 24s; animation-delay: -11s; }
@keyframes drift {
    to { transform: translate3d(40px, 30px, 0) scale(1.15); }
}

.pill {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, .75);
    backdrop-filter: blur(8px);
    font-size: 13px; font-weight: 600; color: var(--muted);
    animation: rise .7s var(--ease) both;
}
.pill i {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 0 rgba(255, 106, 61, .6);
    animation: ping 2s infinite;
}
@keyframes ping { 70%, 100% { box-shadow: 0 0 0 9px rgba(255, 106, 61, 0); } }

.shop-name {
    margin: 18px 0 10px;
    font-family: "Bricolage Grotesque", "Plus Jakarta Sans", sans-serif;
    font-weight: 800;
    font-size: clamp(42px, 11vw, 92px);
    line-height: .98;
    letter-spacing: -.035em;
    text-wrap: balance;
    overflow-wrap: anywhere;
    background: linear-gradient(100deg, var(--ink) 20%, var(--accent) 50%, var(--ink) 80%);
    background-size: 220% 100%;
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
    animation: rise .8s .08s var(--ease) both, sheen 7s 1s ease-in-out infinite;
}
@keyframes sheen { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0 0; } }

.tagline {
    margin: 0 auto;
    max-width: 30em;
    color: var(--muted);
    font-size: clamp(15px, 3.8vw, 19px);
    text-wrap: balance;
    animation: rise .8s .16s var(--ease) both;
}

/* ---------- Search ---------- */
.search {
    position: relative;
    display: flex; align-items: center;
    max-width: 560px;
    margin: 28px auto 0;
    padding: 6px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: var(--shadow);
    transition: box-shadow .3s var(--ease), border-color .3s, transform .3s var(--ease);
    animation: rise .8s .24s var(--ease) both;
}
.search:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 5px rgba(255, 106, 61, .16), var(--shadow);
    transform: translateY(-2px);
}
.search-icon { flex: none; margin-left: 14px; color: var(--muted); }
.search input {
    flex: 1; min-width: 0;
    padding: 12px 10px;
    border: 0; outline: 0; background: transparent;
    font: inherit; color: var(--ink);
}
.search input::placeholder { color: #a79f94; }
.search input::-webkit-search-cancel-button { cursor: pointer; }
.search button {
    flex: none;
    padding: 12px 22px;
    border: 0; border-radius: 999px;
    background: var(--ink); color: #fff;
    font: inherit; font-weight: 700; font-size: 15px;
    cursor: pointer;
    transition: background .25s, transform .15s;
}
.search button:hover { background: var(--accent-dark); }
.search button:active { transform: scale(.96); }
.search.loading .search-icon { animation: spin .8s linear infinite; color: var(--accent); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Products ---------- */
.wrap { max-width: 880px; margin: 0 auto; padding: 0 16px 56px; }

.bar { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.bar h2 {
    margin: 0;
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: clamp(22px, 5vw, 30px);
    letter-spacing: -.02em;
}
.count { color: var(--muted); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }

.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));   /* 2 products per row — change the 2 to show more */
    gap: clamp(12px, 3vw, 24px);
    transition: opacity .2s;
}
.grid.fading { opacity: .35; }

.card {
    display: flex; flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(26px) scale(.97);
    transition: opacity .6s var(--ease), transform .6s var(--ease), box-shadow .35s var(--ease), border-color .35s;
    transition-delay: calc(var(--i, 0) * 55ms), calc(var(--i, 0) * 55ms), 0s, 0s;
    -webkit-tap-highlight-color: transparent;
}
.card.in { opacity: 1; transform: none; }
.card.in:hover, .card.in:focus-visible {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lift);
    border-color: #ffd3c2;
    transition-delay: 0s;
    outline: 0;
}
.card.in:active { transform: translateY(-2px) scale(.985); }

.card-media {
    position: relative;
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, #f6f0e7, #fdfbf8);
    overflow: hidden;
}
.card-media img {
    width: 100%; height: 100%;
    object-fit: contain;
    padding: 8%;
    transition: transform .7s var(--ease);
    mix-blend-mode: multiply;
}
.card:hover .card-media img { transform: scale(1.08) rotate(-1deg); }
.card-media.no-img::after {
    content: "No image";
    position: absolute; inset: 0;
    display: grid; place-items: center;
    color: #b6ad9f; font-size: 13px; font-weight: 600;
}

.card-body { display: flex; flex-direction: column; gap: 8px; flex: 1; padding: clamp(12px, 3vw, 18px); }
.card-title {
    margin: 0;
    font-size: clamp(14px, 3.5vw, 17px);
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
    overflow: hidden;
    min-height: 2.7em;
}
.card-price { font-weight: 700; font-size: clamp(14px, 3.6vw, 17px); color: var(--accent-dark); }

.buy {
    position: relative; overflow: hidden;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    margin-top: auto;
    padding: 11px 10px;
    border-radius: 12px;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    font-size: clamp(13px, 3.4vw, 15px);
    white-space: nowrap;
    transition: background .25s;
}
.buy svg { transition: transform .3s var(--ease); flex: none; }
.buy::before {
    content: "";
    position: absolute; top: 0; bottom: 0; left: -60%;
    width: 40%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent);
    transform: skewX(-20deg);
}
.card:hover .buy { background: var(--accent-dark); }
.card:hover .buy svg { transform: translate(3px, -3px); }
.card:hover .buy::before { animation: shine .8s var(--ease); }
@keyframes shine { to { left: 130%; } }

/* ---------- Empty state ---------- */
.empty {
    grid-column: 1 / -1;
    padding: 56px 20px;
    text-align: center;
    border: 1.5px dashed var(--line);
    border-radius: var(--radius);
    color: var(--muted);
    animation: rise .5s var(--ease) both;
}
.empty-icon {
    width: 64px; height: 64px; margin: 0 auto 14px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: var(--accent-soft); color: var(--accent-dark);
}
.empty h3 { margin: 0 0 4px; color: var(--ink); font-size: 18px; overflow-wrap: anywhere; }
.empty p { margin: 0; font-size: 14px; }

/* ---------- Footer ---------- */
.foot {
    border-top: 1px solid var(--line);
    padding: 26px 16px 34px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}
.foot p { margin: 0 auto 6px; max-width: 520px; }

@keyframes rise {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: none; }
}

@media (max-width: 420px) {
    .search button { padding: 12px 16px; }
    .buy svg { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .card { opacity: 1; transform: none; }
}
