/* Kikapu & Co. — playful craft shop: Syne, blush & coral, kitenge yellow (concept) */
@font-face { font-family: "Syne"; src: url("../shared/fonts/syne.woff2") format("woff2"); font-weight: 500 800; font-display: swap; }

:root {
  --rv-dur: 340ms; --rv-y: 14px; --rv-s: .97; --rv-ease: cubic-bezier(.2, .8, .3, 1.15);
  --bg: #FFF7F3; --surface: #fff; --blush: #F6D9D3; --blush-2: #FBE9E4; --ink: #1B1B1B; --muted: #66524D;
  --accent: #C23B25; --accent-ink: #fff; --coral: #E2553F; --kitenge: #F2B630;
  --line: rgba(27, 27, 27, .12); --line-strong: rgba(27, 27, 27, .28); --ring: rgba(194, 59, 37, .25);
  --font-display: "Syne", system-ui, sans-serif; --r-btn: 999px; --r-input: 14px; --nav-bg: var(--bg);
}
h1, h2, h3, .logo, .p-card__price, .product__price { font-family: var(--font-display); font-weight: 800; letter-spacing: -.02em; line-height: 1.02; }
h2 { font-size: clamp(1.8rem, 1.3rem + 2.4vw, 3rem); }
.muted { color: var(--muted); }
.section { padding-block: clamp(3.5rem, 2.5rem + 5vw, 6rem); }
.section--blush { background: var(--blush); }
.btn { font-weight: 700; }
.sec-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .5rem 2rem; margin-bottom: 1.5rem; }
.sec-title { margin-bottom: 1.5rem; }
.link-arrow { font-weight: 700; color: var(--accent); text-decoration: none; }

/* Header */
.c-header { background: var(--bg); border-bottom: 1.5px solid var(--ink); }
.logo { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; font-size: 1.5rem; color: var(--ink); white-space: nowrap; }
.logo-mark { width: 36px; height: 32px; }
.logo em { font-style: normal; font-weight: 600; font-size: .62em; margin-left: .25rem; color: var(--accent); }
.c-nav a { font-weight: 700; }
.c-nav a[aria-current="page"] { color: var(--accent); }
.basket-btn { position: relative; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--surface); display: grid; place-items: center; }
.basket-btn svg { width: 22px; height: 22px; }
.basket-btn__n { position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #fff; font-size: .72rem; font-weight: 800; display: grid; place-items: center; }
.basket-btn { transition: scale .15s; }
.basket-btn:active { scale: .92; }
.basket-btn__n.is-bump { animation: bump .5s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes bump { 0% { transform: scale(1); } 30% { transform: translateY(-4px) scale(1.5); } 60% { transform: scale(.9); } 100% { transform: scale(1); } }
.motion .basket-btn.is-shake { animation: shake .5s ease-in-out; }
@keyframes shake { 20% { rotate: -12deg; } 45% { rotate: 9deg; } 70% { rotate: -5deg; } 100% { rotate: 0deg; } }
/* "+1" that floats up from the button you pressed */
.plus-one { position: absolute; z-index: 5; pointer-events: none; font: 800 .95rem/1 var(--font-display); color: var(--accent); animation: plus-one .7s ease-out forwards; }
@keyframes plus-one { from { opacity: 1; transform: translate3d(-50%, 0, 0); } to { opacity: 0; transform: translate3d(-50%, -34px, 0) scale(1.2); } }

/* Home */
.hero { display: grid; gap: 1.75rem; padding-block: 2rem 3rem; align-items: center; }
.tag { display: inline-block; background: var(--blush); padding: .35rem .8rem; border-radius: 999px; font-weight: 700; font-size: .82rem; margin-bottom: 1rem; }
.hero > * { min-width: 0; }
.hero__text { container-type: inline-size; }
/* sized to its own column (cqi), so the longest word always fits; Kiswahili words are longer */
.hero h1 { font-size: clamp(1.6rem, 10.5cqi, 4rem); line-height: 1; letter-spacing: -.03em; }
/* "Imetengenezwa" is 12.6em wide in Syne 800 → at most 7.9cqi; "Handmade" is 9em → at most 11cqi */
:lang(sw) .hero h1 { font-size: clamp(1.4rem, 7.6cqi, 3.4rem); }
.hero h1 span { color: var(--accent); }
.hero__lead { margin-top: 1.1rem; font-size: 1.1rem; max-width: 46ch; color: var(--muted); }
.hero__cta { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.6rem; }
.hero__img img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; border-radius: 30px; border: 1.5px solid var(--ink); }

.cats { display: flex; gap: .6rem; overflow-x: auto; padding-bottom: .4rem; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cat { flex: none; padding: .9rem 1.3rem; border-radius: 18px; border: 1.5px solid var(--ink); text-decoration: none; font-family: var(--font-display); font-weight: 700; background: var(--surface); }
.cat--bags { background: var(--kitenge); } .cat--fabrics { background: var(--blush); } .cat--coffee { background: #D9B99B; } .cat--jewellery { background: #BFD7F2; } .cat--home { background: #CDE5C8; }
.cat { transition: transform .25s cubic-bezier(.34, 1.56, .64, 1); }
.cat:hover { transform: rotate(-2deg) translateY(-2px); }
.cat:active { transform: scale(.95); }

/* Product cards */
.p-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem .9rem; }
.p-card { position: relative; display: grid; gap: .35rem; align-content: start; }
.p-card__img { display: block; border-radius: 22px; overflow: hidden; background: var(--blush); }
.p-card__img img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .35s cubic-bezier(.2, .8, .3, 1); }
@media (hover: hover) { .p-card:hover .p-card__img img { transform: scale(1.09) rotate(-1deg); } }
.p-card__name { font-family: var(--font-body, system-ui), sans-serif; font-weight: 700; font-size: .98rem; letter-spacing: 0; line-height: 1.3; margin-top: .4rem; }
.p-card__name a { text-decoration: none; }
.p-card__name a:hover { text-decoration: underline; }
.p-card__price { font-size: 1.05rem; }
.p-card__add { position: absolute; top: .6rem; right: .6rem; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--surface); font-size: 1.5rem; font-weight: 700; line-height: 1; display: grid; place-items: center; transition: background-color .15s, rotate .25s cubic-bezier(.34, 1.56, .64, 1), scale .12s; }
.p-card__add:hover { background: var(--kitenge); rotate: 90deg; }
.p-card__add:active { scale: .88; }
/* Add-to-cart bounce (rotate/scale are separate properties, so hover and bounce don't fight) */
.motion .is-pop { animation: pop .45s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes pop { 0% { scale: 1; } 35% { scale: .82; } 70% { scale: 1.14; } 100% { scale: 1; } }
/* Catalogue filter: the cards that stay or appear pop back in, one after another */
.motion .p-card.is-enter { animation: card-in .38s cubic-bezier(.2, .8, .3, 1.1) both; }
@keyframes card-in { from { opacity: 0; transform: translate3d(0, 12px, 0) scale(.96); } }

.how { display: grid; gap: 2rem; align-items: center; }
.how__img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 26px; border: 1.5px solid var(--ink); }
.how__steps { counter-reset: h; display: grid; gap: 1.1rem; margin: 1.5rem 0; }
.how__steps li { counter-increment: h; display: grid; grid-template-columns: 3rem 1fr; column-gap: .75rem; }
.how__steps li::before { content: counter(h); grid-row: span 2; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; }
.how__steps h3 { font-size: 1.25rem; }
.how__steps p { color: var(--muted); }

/* Catalogue */
.page-head { padding-block: 2.25rem 1rem; }
.page-head h1 { font-size: clamp(2.1rem, 1.4rem + 4vw, 4.2rem); }
.page-head .muted { margin-top: .5rem; }
.shop { padding-bottom: 4rem; }
.shop__bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1rem; }
.shop__sort { width: 100%; max-width: 230px; }
.shop .chip span, .shop button.chip { border-color: var(--ink); }

/* Product page */
.crumbs { padding-top: 1.25rem; font-size: .9rem; color: var(--muted); }
.crumbs a { font-weight: 700; color: var(--ink); }
.product { display: grid; gap: 2rem; padding-block: 1.25rem 2rem; }
.pg__stage { border-radius: 26px; overflow: hidden; background: var(--blush); border: 1.5px solid var(--ink); }
.pg__slide img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .45s cubic-bezier(.2, .8, .3, 1); }
@media (hover: hover) and (pointer: fine) { .pg__stage:hover .pg__slide img { transform: scale(1.06); } }
.motion .pg__slide:not([hidden]) { animation: fade-in .3s ease-out; }
@keyframes fade-in { from { opacity: 0; } }
.pg__thumbs { display: flex; gap: .5rem; margin-top: .6rem; }
.pg__thumb { width: 76px; height: 76px; padding: 0; border-radius: 16px; overflow: hidden; border: 2px solid transparent; background: var(--blush); }
.pg__thumb[aria-pressed="true"] { border-color: var(--ink); }
.pg__thumb img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1; }
.product__info { display: grid; gap: 1.1rem; align-content: start; }
.product__info { min-width: 0; }
.product__info h1 { font-size: clamp(1.7rem, 1.3rem + 2.4vw, 3rem); overflow-wrap: break-word; }
.product__price { font-size: 1.7rem; color: var(--accent); }
.product__desc { font-size: 1.05rem; color: var(--muted); }
.product .chip span { border-color: var(--ink); }
.qty { display: inline-flex; align-items: stretch; border: 1.5px solid var(--ink); border-radius: 999px; overflow: hidden; width: max-content; }
.qty button { width: 48px; border: 0; background: var(--surface); font-size: 1.3rem; font-weight: 700; }
.qty button:hover { background: var(--blush); }
.qty input { width: 64px; text-align: center; border: 0; border-radius: 0; min-height: 48px; padding: 0; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.product__cta { display: grid; gap: .6rem; }
.product__facts { display: grid; gap: .1rem; font-size: .92rem; }
.product__facts li { padding-block: .6rem; border-top: 1px solid var(--line); }
.p-grid--3 .p-card:nth-child(n+3) { display: none; }

/* Basket drawer */
.basket { margin: 0 0 0 auto; height: 100%; max-height: 100%; width: min(440px, 100%); max-width: 100%; border: 0; border-left: 1.5px solid var(--ink); padding: 1.25rem 1.25rem 1.5rem; background: var(--bg); color: var(--ink); }
.basket[open] { display: flex; flex-direction: column; gap: 1rem; animation: slide-in .3s ease-out; }
@keyframes slide-in { from { transform: translateX(40px); opacity: 0; } }
.basket::backdrop { background: rgba(27, 27, 27, .45); }
.basket__head { display: flex; justify-content: space-between; align-items: center; }
.basket__head h2 { font-size: 1.6rem; }
.basket__x { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--surface); font-size: 1.1rem; }
.basket__items { display: grid; gap: .75rem; overflow-y: auto; }
.b-item { display: grid; grid-template-columns: 1fr auto; gap: .35rem .75rem; padding: .9rem; background: var(--surface); border-radius: 16px; border: 1px solid var(--line); }
.b-item__name { font-weight: 700; line-height: 1.3; }
.b-item__var { font-size: .82rem; color: var(--muted); }
.b-item__price { font-family: var(--font-display); font-weight: 800; text-align: right; }
.b-item__row { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; }
.b-item .qty button { width: 40px; font-size: 1.1rem; }
.b-item .qty span { min-width: 2.2rem; display: grid; place-items: center; font-weight: 700; }
.b-item__rm { border: 0; background: none; color: var(--accent); font-weight: 700; text-decoration: underline; min-height: 40px; }
.basket__empty { color: var(--muted); padding: 1rem 0; }
.basket__foot { margin-top: auto; display: grid; gap: .65rem; padding-top: 1rem; border-top: 1.5px solid var(--ink); }
.basket__total { display: flex; justify-content: space-between; font-size: 1.1rem; }
.basket__total b { font-family: var(--font-display); font-size: 1.4rem; }
.basket__note { font-size: .85rem; color: var(--muted); }

/* Footer */
.foot { background: var(--kitenge); color: var(--ink); padding-top: 3rem; border-top: 1.5px solid var(--ink); }
.foot .logo em { color: var(--ink); }
.foot__grid { display: grid; gap: 2rem; }
.foot__tag { margin-top: .8rem; max-width: 36ch; }
.foot__h { font-size: 1.1rem; margin-bottom: .75rem; }
.foot ul { display: grid; gap: .45rem; }
.foot a { text-decoration: none; font-weight: 600; }
.foot a:hover { text-decoration: underline; }
.foot .wa-ico { display: inline-block; vertical-align: -.2em; }
.foot__base { margin-top: 2.5rem; padding-block: 1.5rem; border-top: 1.5px solid rgba(27, 27, 27, .25); }

@media (max-width: 440px) {
  .logo { font-size: 1.15rem; gap: .35rem; }
  .logo-mark { width: 28px; height: 26px; }
  .c-tools { gap: .35rem; }
  .lang-sw button { min-width: 32px; }
  h2 { font-size: 1.7rem; }
}
@media (min-width: 640px) {
  .p-grid { grid-template-columns: repeat(3, 1fr); }
  .p-grid--3 .p-card:nth-child(n+3) { display: grid; }
  .foot__grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .hero { grid-template-columns: 1.15fr 1fr; gap: 3rem; padding-block: 3rem 4rem; }
  .p-grid { grid-template-columns: repeat(4, 1fr); gap: 2rem 1.25rem; }
  .p-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .how { grid-template-columns: 1fr 1fr; gap: 4rem; }
  .product { grid-template-columns: 1.1fr 1fr; gap: 3.5rem; }
  .pg { position: sticky; top: 90px; align-self: start; }
  .foot__grid { grid-template-columns: 1.6fr 1fr 1fr; }
}
