/* Atelier Kotao — component styles. Every value comes from tokens.css (var(--…)); type classes (.h1, .lead, .price …) come from tokens.css too. */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-variant-numeric: lining-nums; background: var(--surface); color: var(--ink); font-family: var(--font-sans); font-size: 17px; line-height: 27px; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
:where(a) { color: var(--accent-text); text-underline-offset: 3px; text-decoration-thickness: 1px; }
:where(button, input, select, textarea) { font: inherit; color: inherit; }
:where(h1, h2, h3, h4, p, ul, ol, dl, dd, figure, fieldset) { margin: 0; }
:where(fieldset) { border: 0; padding: 0; min-width: 0; }
:where(a, button, input, select, textarea, [tabindex]):focus-visible { outline: 2px solid transparent; box-shadow: var(--focus-ring); }
.ak-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ak-icon { flex: none; display: inline-block; vertical-align: middle; }
.ak-overline { font-family: var(--font-sans); font-size: 13px; line-height: 16px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-text); }
.ak-overline--dot::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: var(--radius-full); background: var(--accent); margin-right: var(--space-2); vertical-align: 1px; }

/* Spinner */
.ak-spinner { width: 18px; height: 18px; border-radius: var(--radius-full); border: 2px solid currentColor; border-right-color: transparent; animation: ak-spin .8s linear infinite; flex: none; }
@keyframes ak-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ak-spinner { animation-duration: 2.4s; } }

/* ---------- Button ---------- */
.ak-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); height: var(--control-md); padding: 0 var(--space-6); border: 1px solid transparent; border-radius: var(--radius-xs); font-family: var(--font-sans); font-size: 16px; line-height: 20px; font-weight: 500; letter-spacing: 0.01em; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color .15s, border-color .15s, color .15s; }
.ak-btn--sm { height: var(--control-sm); padding: 0 var(--space-4); font-size: 15px; }
.ak-btn--lg { height: var(--control-lg); padding: 0 var(--space-8); font-size: 17px; }
.ak-btn--block { display: flex; width: 100%; }
.ak-btn--primary { background: var(--accent); color: var(--on-accent); }
.ak-btn--primary:hover { background: var(--accent-hover); }
.ak-btn--secondary { background: var(--surface-sunken); color: var(--ink); }
.ak-btn--secondary:hover { background: var(--line); }
.ak-btn--inverted { background: var(--surface-inverse); color: var(--on-inverse); }
.ak-btn--inverted:hover { opacity: .9; }
.ak-btn--outlined { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.ak-btn--outlined:hover { border-color: var(--ink); }
.ak-btn--ghost { background: transparent; color: var(--accent-text); padding: 0 var(--space-3); }
.ak-btn--ghost:hover { background: var(--accent-soft); }
.ak-btn--danger { background: var(--danger); color: var(--on-danger); }
.ak-btn:disabled, .ak-btn[aria-disabled="true"] { background: var(--surface-sunken); border-color: transparent; color: var(--ink-disabled); cursor: not-allowed; }
.ak-btn.is-loading { cursor: progress; }
.ak-btn.is-loading:disabled { background: var(--accent); color: var(--on-accent); }

/* ---------- IconButton ---------- */
.ak-iconbtn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: var(--control-md); height: var(--control-md); padding: 0; border: 1px solid transparent; border-radius: var(--radius-xs); background: transparent; color: var(--ink); cursor: pointer; flex: none; }
.ak-iconbtn--sm { width: var(--control-sm); height: var(--control-sm); }
.ak-iconbtn--lg { width: var(--control-lg); height: var(--control-lg); }
.ak-iconbtn--ghost:hover { background: var(--surface-sunken); }
.ak-iconbtn--filled { background: var(--accent); color: var(--on-accent); }
.ak-iconbtn--filled:hover { background: var(--accent-hover); }
.ak-iconbtn--sage { background: var(--sage); color: var(--on-accent); }
.ak-iconbtn--outlined { border-color: var(--line-strong); }
.ak-iconbtn--outlined:hover { border-color: var(--ink); }
.ak-iconbtn--danger { background: var(--danger); color: var(--on-danger); }
.ak-iconbtn.is-active { background: var(--accent); color: var(--on-accent); }
.ak-iconbtn:disabled { color: var(--ink-disabled); background: transparent; cursor: not-allowed; }
.ak-count { position: absolute; top: 2px; right: 0; min-width: 20px; height: 20px; padding: 0 5px; border-radius: var(--radius-full); background: var(--accent); color: var(--on-accent); font-size: 12px; line-height: 20px; font-weight: 700; text-align: center; box-shadow: 0 0 0 2px var(--surface); }

/* ---------- Link ---------- */
.ak-link { display: inline-flex; align-items: center; gap: var(--space-1); color: var(--accent-text); font-weight: 500; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.ak-link:hover { text-decoration-thickness: 2px; }
.ak-link--quiet { color: var(--ink); text-decoration-color: var(--line-strong); }

/* ---------- Fields ---------- */
.ak-field { display: flex; flex-direction: column; gap: var(--space-2); }
.ak-field__label { font-size: 15px; line-height: 20px; font-weight: 500; color: var(--ink); padding: 0; }
.ak-field__opt { font-weight: 400; color: var(--ink-muted); }
.ak-field__msg { display: flex; gap: var(--space-1); align-items: flex-start; font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.ak-field__msg--error { color: var(--danger); font-weight: 500; }
.ak-input { position: relative; display: flex; align-items: center; min-height: var(--control-md); background: var(--surface-raised); border: 1px solid var(--line-strong); border-radius: var(--radius-xs); transition: border-color .15s; }
.ak-input:hover { border-color: var(--ink-muted); }
.ak-input:focus-within { border-color: var(--focus); box-shadow: 0 0 0 1px var(--focus); }
.ak-field.has-error .ak-input { border-color: var(--danger); }
.ak-field.has-error .ak-input:focus-within { box-shadow: 0 0 0 1px var(--danger); }
.ak-field.is-disabled .ak-input { background: var(--surface-sunken); border-color: var(--line); color: var(--ink-disabled); }
.ak-input input, .ak-input textarea, .ak-input select { flex: 1; min-width: 0; height: 100%; min-height: calc(var(--control-md) - 2px); border: 0; background: transparent; padding: 0 var(--space-3); font-size: 17px; line-height: 24px; outline: none; box-shadow: none; }
.ak-input input:focus-visible, .ak-input textarea:focus-visible, .ak-input select:focus-visible { box-shadow: none; }
.ak-input input::placeholder, .ak-input textarea::placeholder { color: var(--ink-muted); opacity: 1; }
.ak-input__icon { margin-left: var(--space-3); color: var(--ink-muted); }
.ak-input__icon + input { padding-left: var(--space-2); }
.ak-input__suffix { padding-right: var(--space-3); color: var(--ink-muted); font-size: 15px; }
.ak-input--area textarea { padding: var(--space-3); resize: vertical; min-height: 112px; }
.ak-input--select select { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer; }
.ak-input__chev { position: absolute; right: var(--space-3); pointer-events: none; color: var(--ink-muted); }

/* Checkbox & Radio */
.ak-check { position: relative; display: flex; gap: var(--space-3); align-items: flex-start; cursor: pointer; padding: 2px 0; }
.ak-check__input { position: absolute; opacity: 0; width: 22px; height: 22px; margin: 0; }
.ak-check__box { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin-top: 2px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-xs); background: var(--surface-raised); color: transparent; transition: background-color .15s, border-color .15s; }
.ak-check:hover .ak-check__box { border-color: var(--ink-muted); }
.ak-check__input:checked + .ak-check__box { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.ak-check__input:focus-visible + .ak-check__box { box-shadow: var(--focus-ring); }
.ak-check--radio .ak-check__box { border-radius: var(--radius-full); }
.ak-check--radio .ak-check__input:checked + .ak-check__box { background: var(--surface-raised); box-shadow: inset 0 0 0 5px var(--accent); }
.ak-check--radio .ak-check__input:checked:focus-visible + .ak-check__box { box-shadow: inset 0 0 0 5px var(--accent), var(--focus-ring); }
.ak-check.has-error .ak-check__box { border-color: var(--danger); }
.ak-check__text { display: flex; flex-direction: column; gap: 2px; }
.ak-check__label { font-size: 17px; line-height: 26px; }
.ak-check__desc { font-size: 15px; line-height: 22px; color: var(--ink-muted); }
.ak-check.is-disabled { cursor: not-allowed; color: var(--ink-disabled); }
.ak-check.is-disabled .ak-check__box { background: var(--surface-sunken); border-color: var(--line); }
.ak-radios { display: flex; flex-direction: column; gap: var(--space-2); }
.ak-radios > legend { margin-bottom: var(--space-2); }

/* Switch */
.ak-switch { position: relative; display: inline-flex; align-items: center; gap: var(--space-3); cursor: pointer; }
.ak-switch__input { position: absolute; opacity: 0; width: 44px; height: 26px; margin: 0; }
.ak-switch__track { position: relative; width: 44px; height: 26px; border-radius: var(--radius-full); background: var(--surface-sunken); border: 1.5px solid var(--line-strong); transition: background-color .15s, border-color .15s; flex: none; }
.ak-switch__thumb { position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: var(--radius-full); background: var(--ink-muted); transition: transform .15s, background-color .15s; }
.ak-switch__input:checked + .ak-switch__track { background: var(--accent); border-color: var(--accent); }
.ak-switch__input:checked + .ak-switch__track .ak-switch__thumb { transform: translateX(18px); background: var(--on-accent); }
.ak-switch__input:focus-visible + .ak-switch__track { box-shadow: var(--focus-ring); }
.ak-switch.is-disabled { opacity: .5; cursor: not-allowed; }

/* Search (image-1 reference: sunken field, hairline border, square corners) */
.ak-search { display: flex; align-items: center; gap: var(--space-2); height: var(--control-md); padding: 0 var(--space-2) 0 var(--space-4); background: var(--surface-sunken); border: 1px solid var(--line-strong); border-radius: var(--radius-xs); }
.ak-search:focus-within { border-color: var(--focus); box-shadow: 0 0 0 1px var(--focus); }
.ak-search__icon { color: var(--ink-muted); }
.ak-search__input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; font-size: 17px; outline: none; }
.ak-search__input:focus-visible { box-shadow: none; }
.ak-search__input::placeholder { color: var(--ink-muted); opacity: 1; }
.ak-search__input::-webkit-search-cancel-button { display: none; }
.ak-search__clear { display: inline-flex; border: 0; background: transparent; color: var(--ink-muted); padding: var(--space-1); cursor: pointer; border-radius: var(--radius-xs); }

/* Quantity */
.ak-stepper { display: inline-flex; align-items: center; height: var(--control-md); border: 1px solid var(--line-strong); border-radius: var(--radius-xs); background: var(--surface-raised); }
.ak-stepper button { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 100%; border: 0; background: transparent; color: var(--ink); cursor: pointer; border-radius: var(--radius-xs); }
.ak-stepper button:hover:not(:disabled) { background: var(--surface-sunken); }
.ak-stepper button:disabled { color: var(--ink-disabled); cursor: not-allowed; }
.ak-stepper output { min-width: 32px; text-align: center; font-size: 17px; font-weight: 500; font-variant-numeric: tabular-nums; }
.ak-stepper--sm { height: var(--control-sm); }
.ak-stepper--sm button { width: 34px; }

/* ---------- Wordmark ---------- */
.ak-wordmark { display: inline-flex; flex-direction: column; line-height: 1; font-family: var(--font-serif); color: var(--ink); }
.ak-wordmark__atelier { font-style: italic; font-weight: 400; font-size: 15px; line-height: 15px; color: var(--accent-text); margin-left: 1px; }
.ak-wordmark__kotao { font-weight: 700; font-size: 28px; line-height: 26px; letter-spacing: -0.01em; }
.ak-wordmark--lg .ak-wordmark__atelier { font-size: 28px; line-height: 30px; color: var(--bakar); }
.ak-wordmark--lg .ak-wordmark__kotao { font-size: 64px; line-height: 60px; }
[data-theme="dark"] .ak-wordmark--lg .ak-wordmark__atelier { color: var(--accent-text); }

/* ---------- Header ---------- */
.ak-header { container-type: inline-size; background: var(--surface); border-bottom: 1px solid var(--line); }
.ak-header.is-sticky { position: sticky; top: 0; z-index: var(--z-header); }
.ak-header__inner { display: flex; align-items: center; gap: var(--space-4); height: var(--header-height); max-width: var(--container); margin: 0 auto; padding: 0 var(--space-4); }
.ak-header__brand { display: inline-flex; align-items: center; gap: var(--space-2); text-decoration: none; border-radius: var(--radius-xs); }
.ak-header__mark { width: 48px; height: 44px; object-fit: contain; }
.ak-header__nav { display: none; gap: var(--space-1); margin-left: var(--space-6); }
.ak-header__link { position: relative; display: inline-flex; align-items: center; height: var(--control-md); padding: 0 var(--space-3); font-size: 16px; font-weight: 500; color: var(--ink); text-decoration: none; border-radius: var(--radius-xs); }
.ak-header__link:hover { color: var(--accent-text); }
.ak-header__link.is-active { color: var(--accent-text); }
.ak-header__link.is-active::after { content: ""; position: absolute; left: var(--space-3); right: var(--space-3); bottom: 6px; height: 2px; background: var(--accent); }
.ak-header__actions { display: flex; gap: var(--space-1); margin-left: auto; }
@container (min-width: 820px) { .ak-header__nav { display: flex; } .ak-header__menu { display: none; } .ak-header__inner { padding: 0 var(--space-8); } }

/* ---------- MobileNav (image-1 reference: sunken pill bar, active = copper square) ---------- */
.ak-mnav { display: flex; justify-content: space-around; gap: var(--space-2); padding: var(--space-2) var(--space-3); background: var(--surface-sunken); border-radius: var(--radius-md); }
.ak-mnav__item { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 64px; padding: 4px 0; color: var(--ink); text-decoration: none; border-radius: var(--radius-xs); font-size: 13px; line-height: 16px; font-weight: 500; }
.ak-mnav__icon { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 36px; border-radius: var(--radius-xs); }
.ak-mnav__item.is-active .ak-mnav__icon { background: var(--accent); color: var(--on-accent); }
.ak-mnav__item.is-active .ak-mnav__label { color: var(--accent-text); }
.ak-mnav__icon .ak-count { top: -4px; right: 2px; }

/* ---------- Breadcrumbs ---------- */
.ak-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1); list-style: none; padding: 0; margin: 0; font-size: 15px; line-height: 20px; }
.ak-crumbs li { display: inline-flex; align-items: center; gap: var(--space-1); color: var(--ink-muted); }
.ak-crumbs a { color: var(--ink-muted); text-decoration: none; }
.ak-crumbs a:hover { color: var(--accent-text); text-decoration: underline; }
.ak-crumbs [aria-current] { color: var(--ink); font-weight: 500; }

/* ---------- Tabs ---------- */
.ak-tabs__list { display: flex; gap: var(--space-6); border-bottom: 1px solid var(--line); overflow-x: auto; }
.ak-tabs__tab { position: relative; padding: var(--space-3) 0; border: 0; background: transparent; font-size: 16px; font-weight: 500; color: var(--ink-muted); cursor: pointer; white-space: nowrap; border-radius: var(--radius-xs) var(--radius-xs) 0 0; }
.ak-tabs__tab:hover { color: var(--ink); }
.ak-tabs__tab.is-active { color: var(--ink); }
.ak-tabs__tab.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); }
.ak-tabs__panel { padding-top: var(--space-5); color: var(--ink); }

/* ---------- Pagination ---------- */
.ak-pages { display: flex; align-items: center; gap: var(--space-1); }
.ak-pages__btn { display: inline-flex; align-items: center; justify-content: center; min-width: var(--control-md); height: var(--control-md); padding: 0 var(--space-2); border: 1px solid transparent; border-radius: var(--radius-xs); background: transparent; color: var(--ink); font-size: 16px; font-weight: 500; cursor: pointer; font-variant-numeric: tabular-nums; }
.ak-pages__btn:hover:not(:disabled) { background: var(--surface-sunken); }
.ak-pages__btn.is-active { background: var(--accent); color: var(--on-accent); }
.ak-pages__btn:disabled { color: var(--ink-disabled); cursor: not-allowed; }
.ak-pages__gap { min-width: 24px; text-align: center; color: var(--ink-muted); }

/* ---------- Footer ---------- */
.ak-footer { container-type: inline-size; background: var(--surface-sunken); color: var(--ink); border-top: 1px solid var(--line); }
.ak-footer__inner { display: grid; grid-template-columns: 1fr; gap: var(--space-8); max-width: var(--container); margin: 0 auto; padding: var(--space-12) var(--space-4) var(--space-8); }
@container (min-width: 720px) { .ak-footer__inner { grid-template-columns: 1.4fr repeat(3, 1fr); padding: var(--space-16) var(--space-8) var(--space-10); } }
.ak-footer__tag { margin-top: var(--space-3); font-family: var(--font-serif); font-style: italic; font-size: 19px; line-height: 26px; color: var(--ink-muted); }
.ak-footer__col .ak-overline { color: var(--ink-muted); margin-bottom: var(--space-3); }
.ak-footer__col ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); font-size: 15px; line-height: 22px; }
.ak-footer__col a { color: var(--ink); text-decoration: none; }
.ak-footer__col a:hover { color: var(--accent-text); text-decoration: underline; }
.ak-footer__note { max-width: var(--container); margin: 0 auto; padding: var(--space-4); border-top: 1px solid var(--line); font-size: 13px; line-height: 18px; color: var(--ink-muted); }
@container (min-width: 720px) { .ak-footer__note { padding: var(--space-4) var(--space-8); } }

/* ---------- SectionHeader ---------- */
.ak-sechead { display: flex; flex-direction: column; gap: var(--space-2); max-width: var(--measure); }
.ak-sechead .ak-overline { color: var(--ink-muted); }
.ak-sechead__title { color: var(--ink); }
.ak-sechead__lead { color: var(--ink-muted); margin-top: var(--space-1); }
.ak-sechead__action { margin-top: var(--space-3); }
.ak-sechead--center { align-items: center; text-align: center; margin: 0 auto; }

/* ---------- Photo ---------- */
.ak-photo__frame { position: relative; overflow: hidden; border-radius: var(--radius-sm); background: var(--photo-bg); }
.ak-photo__frame img { width: 100%; height: 100%; object-fit: cover; }
.ak-photo__cap { margin-top: var(--space-2); font-size: 13px; line-height: 18px; color: var(--ink-muted); }

/* ---------- Hero ---------- */
.ak-hero { container-type: inline-size; display: grid; grid-template-columns: 1fr; gap: var(--space-8); align-items: center; }
.ak-hero__text { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-4); }
.ak-hero__seal { width: 128px; height: 128px; border-radius: var(--radius-full); }
.ak-hero__title { display: flex; flex-direction: column; font-family: var(--font-serif); color: var(--ink); }
.ak-hero__prefix { font-style: italic; font-weight: 400; font-size: 34px; line-height: 38px; color: var(--bakar); margin-left: 4px; }
[data-theme="dark"] .ak-hero__prefix { color: var(--accent-text); }
.ak-hero__name { font-weight: 700; font-size: 64px; line-height: 64px; letter-spacing: -0.01em; }
.ak-hero__tagline { color: var(--ink); margin-top: var(--space-4); }
.ak-hero__body { max-width: 52ch; color: var(--ink-muted); }
.ak-hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-2); }
@media (min-width: 760px) { .ak-hero { grid-template-columns: 1fr 1fr; gap: var(--space-12); } .ak-hero__name { font-size: 112px; line-height: 104px; } .ak-hero__prefix { font-size: 40px; line-height: 44px; } }

/* ---------- FeatureItem ---------- */
.ak-feature { display: flex; gap: var(--space-5); align-items: flex-start; }
.ak-feature__img { flex: none; display: flex; align-items: center; justify-content: center; width: 104px; height: 104px; border-radius: var(--radius-full); overflow: hidden; background: var(--sage-soft); color: var(--sage); }
.ak-feature__img img { width: 100%; height: 100%; object-fit: cover; }
.ak-feature__title { color: var(--ink); margin-bottom: var(--space-1); }
.ak-feature__text { color: var(--ink-muted); font-size: 17px; line-height: 27px; }

/* ---------- Card ---------- */
.ak-card { display: flex; flex-direction: column; background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; color: var(--ink); text-decoration: none; }
.ak-card.is-link { transition: box-shadow .15s, border-color .15s; }
.ak-card.is-link:hover { box-shadow: var(--shadow-sm); border-color: var(--line-strong); }
.ak-card.is-selected { border: 2px solid var(--accent); }
.ak-card__media { background: var(--photo-bg); }
.ak-card__media img { width: 100%; height: 100%; object-fit: cover; }
.ak-card__body { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-5) var(--space-6) var(--space-6); }
.ak-card__text { color: var(--ink-muted); font-size: 15px; line-height: 23px; }
.ak-card__footer { margin-top: var(--space-2); }

/* ---------- Accordion ---------- */
.ak-acc { border-top: 1px solid var(--line); }
.ak-acc__item { border-bottom: 1px solid var(--line); }
.ak-acc__h { margin: 0; font: inherit; }
.ak-acc__btn { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-4) 0; border: 0; background: transparent; text-align: left; cursor: pointer; font-family: var(--font-serif); font-size: 21px; line-height: 28px; font-weight: 500; color: var(--ink); border-radius: var(--radius-xs); }
.ak-acc__btn:hover { color: var(--accent-text); }
.ak-acc__chev { color: var(--ink-muted); transition: transform .2s; }
.ak-acc__item.is-open .ak-acc__chev { transform: rotate(180deg); }
.ak-acc__panel { padding: 0 0 var(--space-5); color: var(--ink-muted); max-width: var(--measure); }

/* ---------- Alert ---------- */
.ak-alert { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-4); border-radius: var(--radius-sm); color: var(--ink); font-size: 15px; line-height: 23px; }
.ak-alert__icon { margin-top: 1px; }
.ak-alert__body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.ak-alert__title { font-weight: 700; }
.ak-alert__action { margin-top: var(--space-2); }
.ak-alert__close { display: inline-flex; border: 0; background: transparent; color: var(--ink-muted); cursor: pointer; padding: 2px; border-radius: var(--radius-xs); }
.ak-alert--info { background: var(--sage-soft); } .ak-alert--info .ak-alert__icon { color: var(--info); }
.ak-alert--success { background: var(--success-soft); } .ak-alert--success .ak-alert__icon { color: var(--success); }
.ak-alert--warning { background: var(--warning-soft); } .ak-alert--warning .ak-alert__icon { color: var(--warning); }
.ak-alert--danger { background: var(--danger-soft); } .ak-alert--danger .ak-alert__icon, .ak-alert--danger .ak-alert__title { color: var(--danger); }

/* ---------- Toast ---------- */
.ak-toast { display: inline-flex; align-items: center; gap: var(--space-3); min-height: 52px; max-width: 480px; padding: var(--space-3) var(--space-3) var(--space-3) var(--space-4); border-radius: var(--radius-md); background: var(--surface-inverse); color: var(--on-inverse); box-shadow: var(--shadow-md); font-size: 15px; line-height: 22px; }
.ak-toast__text { flex: 1; }
.ak-toast__action a, .ak-toast__action button { color: var(--on-inverse); font-weight: 700; background: transparent; border: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; padding: 0; }
.ak-toast__close { display: inline-flex; border: 0; background: transparent; color: var(--on-inverse); cursor: pointer; padding: 4px; border-radius: var(--radius-xs); opacity: .8; }

/* ---------- Badge ---------- */
.ak-badge { display: inline-flex; align-items: center; gap: var(--space-1); height: 26px; padding: 0 var(--space-2); border-radius: var(--radius-xs); font-size: 13px; line-height: 16px; font-weight: 500; letter-spacing: 0.04em; white-space: nowrap; }
.ak-badge__dot { width: 8px; height: 8px; border-radius: var(--radius-full); background: currentColor; }
.ak-badge--neutral { background: var(--surface-sunken); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.ak-badge--accent { background: var(--accent); color: var(--on-accent); }
.ak-badge--soft { background: var(--accent-soft); color: var(--accent-text); }
.ak-badge--sage { background: var(--sage-soft); color: var(--info); }
.ak-badge--success { background: var(--success-soft); color: var(--success); }
.ak-badge--warning { background: var(--warning-soft); color: var(--warning); }
.ak-badge--danger { background: var(--danger-soft); color: var(--danger); }
.ak-badge--holiday { background: var(--barsun); color: #ffffff; }

/* ---------- Chip ---------- */
.ak-chip { display: inline-flex; align-items: center; gap: var(--space-1); height: var(--control-sm); padding: 0 var(--space-3); border: 1px solid var(--line-strong); border-radius: var(--radius-xs); background: var(--surface-raised); color: var(--ink); font-size: 15px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.ak-chip:hover { border-color: var(--ink-muted); }
.ak-chip.is-selected { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }
.ak-chip.is-selected .ak-icon { color: var(--accent-text); }
.ak-chip__count { color: var(--ink-muted); font-weight: 400; margin-left: 2px; }

/* ---------- Progress (image-1 reference: thin bars on sunken track) ---------- */
.ak-progress { display: flex; flex-direction: column; gap: var(--space-2); }
.ak-progress__head { display: flex; justify-content: space-between; gap: var(--space-3); font-size: 15px; line-height: 20px; color: var(--ink); }
.ak-progress__val { color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.ak-progress__track { height: 8px; background: var(--surface-sunken); border-radius: var(--radius-xs); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.ak-progress__bar { height: 100%; background: var(--accent); border-radius: var(--radius-xs); transition: width .3s; }
.ak-progress--sage .ak-progress__bar { background: var(--sage); }
.ak-progress--success .ak-progress__bar { background: var(--success); }

/* ---------- Skeleton ---------- */
.ak-skel { display: block; background: var(--surface-sunken); border-radius: var(--radius-sm); animation: ak-pulse 1.4s ease-in-out infinite; }
.ak-skel--text { height: 14px; border-radius: var(--radius-xs); }
.ak-skel--circle { border-radius: var(--radius-full); }
@keyframes ak-pulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .ak-skel { animation: none; } }

/* ---------- EmptyState ---------- */
.ak-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-3); padding: var(--space-10) var(--space-4); }
.ak-empty__icon { display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 72px; border-radius: var(--radius-full); background: var(--sage-soft); color: var(--sage); margin-bottom: var(--space-2); }
.ak-empty__img { width: 120px; height: 120px; border-radius: var(--radius-full); object-fit: cover; }
.ak-empty__text { color: var(--ink-muted); max-width: 40ch; }
.ak-empty__action { margin-top: var(--space-3); }

/* ---------- Overlay, Dialog, Drawer ---------- */
.ak-overlay { position: fixed; inset: 0; z-index: var(--z-dialog); display: flex; align-items: center; justify-content: center; padding: var(--space-4); background: var(--overlay); }
.ak-overlay--drawer { z-index: var(--z-drawer); justify-content: flex-end; align-items: stretch; padding: 0; }
.ak-dialog { width: 100%; max-width: 560px; max-height: calc(100% - 32px); display: flex; flex-direction: column; background: var(--surface-raised); color: var(--ink); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); overflow: hidden; }
.ak-dialog--sm { max-width: 420px; }
.ak-dialog__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); padding: var(--space-6) var(--space-4) 0 var(--space-6); }
.ak-dialog__title { padding-top: 4px; }
.ak-dialog__body { padding: var(--space-3) var(--space-6) var(--space-6); overflow: auto; color: var(--ink-muted); }
.ak-dialog__actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: var(--space-3); padding: var(--space-4) var(--space-6); border-top: 1px solid var(--line); background: var(--surface); }
.ak-drawer { width: 100%; max-width: 440px; height: 100%; display: flex; flex-direction: column; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); }
.ak-drawer--left { margin-right: auto; }
.ak-drawer__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-4) var(--space-4) var(--space-4) var(--space-6); border-bottom: 1px solid var(--line); }
.ak-drawer__body { flex: 1; overflow: auto; padding: var(--space-2) var(--space-6); }
.ak-drawer__foot { padding: var(--space-5) var(--space-6) var(--space-6); border-top: 1px solid var(--line); background: var(--surface-raised); }

/* ---------- Cookie ---------- */
.ak-cookie { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-4) var(--space-6); padding: var(--space-5) var(--space-6); background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-md); color: var(--ink); font-size: 15px; line-height: 23px; }
.ak-cookie__text { flex: 1 1 320px; display: flex; flex-direction: column; gap: 2px; color: var(--ink-muted); }
.ak-cookie__title { font-family: var(--font-serif); font-size: 21px; line-height: 28px; font-weight: 500; color: var(--ink); }
.ak-cookie__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* ---------- Price ---------- */
.ak-price { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 0 var(--space-2); color: var(--ink); font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.ak-price__from { font-family: var(--font-sans); font-size: .75em; font-weight: 400; color: var(--ink-muted); margin-right: -4px; }
.ak-price.is-sale .ak-price__now { color: var(--price-sale); }
.ak-price__was { font-family: var(--font-sans); font-size: .75em; font-weight: 400; color: var(--ink-muted); }

/* ---------- ProductCard ---------- */
.ak-pcard { position: relative; display: flex; flex-direction: column; }
.ak-pcard__link { display: flex; flex-direction: column; gap: var(--space-3); color: inherit; text-decoration: none; border-radius: var(--radius-sm); }
.ak-pcard__media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius-sm); background: var(--photo-bg); }
.ak-pcard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.ak-pcard__link:hover .ak-pcard__media img { transform: scale(1.03); }
.ak-pcard__badge { position: absolute; top: var(--space-3); left: var(--space-3); }
.ak-pcard__body { display: flex; flex-direction: column; gap: var(--space-1); padding-right: 52px; }
.ak-pcard__meta { font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.ak-pcard__link:hover .ak-pcard__name { color: var(--accent-text); }
.ak-pcard__add { position: absolute; right: 0; bottom: 2px; }
.ak-pcard.is-soldout .ak-pcard__media img { filter: grayscale(.6); opacity: .7; }

/* ---------- Gallery ---------- */
.ak-gallery { display: flex; flex-direction: column; gap: var(--space-3); }
.ak-gallery__main { position: relative; overflow: hidden; border-radius: var(--radius-sm); background: var(--photo-bg); }
.ak-gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.ak-gallery__count { position: absolute; right: var(--space-3); bottom: var(--space-3); padding: 2px var(--space-2); border-radius: var(--radius-xs); background: var(--surface-inverse); color: var(--on-inverse); font-size: 13px; line-height: 20px; }
.ak-gallery__thumbs { display: flex; gap: var(--space-2); overflow-x: auto; padding: 4px; margin: -4px; }
.ak-gallery__thumb { flex: none; width: 72px; aspect-ratio: 4 / 5; padding: 0; border: 2px solid transparent; border-radius: var(--radius-sm); overflow: hidden; background: var(--photo-bg); cursor: pointer; opacity: .75; }
.ak-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.ak-gallery__thumb:hover { opacity: 1; }
.ak-gallery__thumb.is-active { border-color: var(--accent); opacity: 1; }

/* ---------- Variant picker ---------- */
.ak-variants > legend { margin-bottom: var(--space-3); }
.ak-variants__cur { font-weight: 400; color: var(--ink-muted); }
.ak-variants__row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.ak-variant { position: relative; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 76px; min-height: var(--control-md); padding: var(--space-2) var(--space-4); border: 1px solid var(--line-strong); border-radius: var(--radius-xs); background: var(--surface-raised); cursor: pointer; text-align: center; }
.ak-variant input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ak-variant:hover { border-color: var(--ink-muted); }
.ak-variant__label { font-size: 16px; line-height: 20px; font-weight: 500; }
.ak-variant__note { font-size: 13px; line-height: 16px; color: var(--ink-muted); }
.ak-variant.is-selected { border: 2px solid var(--accent); background: var(--accent-soft); padding: calc(var(--space-2) - 1px) calc(var(--space-4) - 1px); }
.ak-variant:has(input:focus-visible) { box-shadow: var(--focus-ring); }
.ak-variant.is-disabled { color: var(--ink-disabled); background: var(--surface-sunken); border-style: dashed; cursor: not-allowed; }
.ak-variant.is-disabled .ak-variant__note { color: var(--ink-disabled); }

/* ---------- BuyBox ---------- */
.ak-buybox { display: flex; flex-direction: column; gap: var(--space-5); max-width: 520px; }
.ak-buybox .ak-overline { margin-bottom: calc(var(--space-3) * -1); }
.ak-buybox__name { color: var(--ink); }
.ak-buybox__price { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-4); }
.ak-buybox__desc { color: var(--ink-muted); }
.ak-buybox__buy { display: flex; gap: var(--space-3); align-items: stretch; }
.ak-buybox__buy .ak-stepper { height: var(--control-lg); }
.ak-buybox__notes { list-style: none; padding: var(--space-4) 0 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: var(--space-2); font-size: 15px; line-height: 22px; color: var(--ink); }
.ak-buybox__notes li { display: flex; gap: var(--space-2); align-items: flex-start; }
.ak-buybox__notes .ak-icon { color: var(--sage); margin-top: 1px; }

/* ---------- CartLine ---------- */
.ak-cartline { display: flex; gap: var(--space-4); padding: var(--space-4) 0; border-bottom: 1px solid var(--line); }
.ak-cartline__img { flex: none; width: 88px; aspect-ratio: 4 / 5; border-radius: var(--radius-sm); overflow: hidden; background: var(--photo-bg); }
.ak-cartline__img img { width: 100%; height: 100%; object-fit: cover; }
.ak-cartline__main { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-3); }
.ak-cartline__top { display: flex; justify-content: space-between; gap: var(--space-3); }
.ak-cartline__name a { color: var(--ink); text-decoration: none; }
.ak-cartline__name a:hover { color: var(--accent-text); text-decoration: underline; }
.ak-cartline__meta { margin-top: 2px; font-size: 15px; line-height: 22px; color: var(--ink-muted); }
.ak-cartline__bottom { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.ak-cartline__qty { font-size: 15px; color: var(--ink-muted); }
.ak-cartline__remove { display: inline-flex; align-items: center; gap: var(--space-1); border: 0; background: transparent; color: var(--ink-muted); font-size: 15px; cursor: pointer; padding: var(--space-1); border-radius: var(--radius-xs); }
.ak-cartline__remove:hover { color: var(--danger); }

/* ---------- OrderSummary ---------- */
.ak-summary { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-6); background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.ak-summary__rows { display: flex; flex-direction: column; gap: var(--space-2); margin: 0; }
.ak-summary__row { display: flex; justify-content: space-between; gap: var(--space-4); font-size: 16px; line-height: 24px; color: var(--ink-muted); }
.ak-summary__row dd { margin: 0; color: var(--ink); font-variant-numeric: tabular-nums; }
.ak-summary__row.is-success dd { color: var(--success); font-weight: 500; }
.ak-summary__row.is-sale dd { color: var(--price-sale); }
.ak-summary__total { display: flex; justify-content: space-between; align-items: baseline; padding-top: var(--space-4); border-top: 1px solid var(--line); font-weight: 500; }
.ak-summary__note { font-size: 13px; line-height: 18px; color: var(--ink-muted); }

/* ---------- CheckoutSteps ---------- */
.ak-steps { display: flex; gap: var(--space-2); list-style: none; padding: 0; margin: 0; counter-reset: s; }
.ak-steps__item { flex: 1; display: flex; align-items: center; gap: var(--space-2); padding-top: var(--space-3); border-top: 3px solid var(--line); font-size: 15px; line-height: 20px; color: var(--ink-muted); min-width: 0; }
.ak-steps__num { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: var(--radius-full); border: 1.5px solid var(--line-strong); font-size: 14px; font-weight: 700; }
.ak-steps__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ak-steps__item.is-done { border-top-color: var(--accent); color: var(--ink); }
.ak-steps__item.is-done .ak-steps__num { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.ak-steps__item.is-current { border-top-color: var(--accent); color: var(--ink); font-weight: 500; }
.ak-steps__item.is-current .ak-steps__num { border-color: var(--accent); color: var(--accent-text); border-width: 2px; }

/* ---------- DeliveryOptions ---------- */
.ak-delivery { display: flex; flex-direction: column; gap: var(--space-3); }
.ak-delivery > legend { margin-bottom: var(--space-3); }
.ak-delivery__opt { position: relative; display: flex; align-items: center; gap: var(--space-4); padding: var(--space-4); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface-raised); cursor: pointer; }
.ak-delivery__opt:hover { border-color: var(--ink-muted); }
.ak-delivery__opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ak-delivery__radio { flex: none; width: 22px; height: 22px; border-radius: var(--radius-full); border: 1.5px solid var(--line-strong); background: var(--surface-raised); }
.ak-delivery__opt.is-selected { border: 2px solid var(--accent); padding: calc(var(--space-4) - 1px); background: var(--accent-soft); }
.ak-delivery__opt.is-selected .ak-delivery__radio { border-color: var(--accent); box-shadow: inset 0 0 0 5px var(--accent); }
.ak-delivery__opt:has(input:focus-visible) { box-shadow: var(--focus-ring); }
.ak-delivery__icon { color: var(--sage); }
.ak-delivery__text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.ak-delivery__title { font-weight: 500; font-size: 17px; line-height: 24px; }
.ak-delivery__desc { font-size: 15px; line-height: 22px; color: var(--ink-muted); }
.ak-delivery__price { font-family: var(--font-serif); font-weight: 600; font-size: 19px; white-space: nowrap; }
.ak-delivery__opt.is-disabled { opacity: .55; cursor: not-allowed; }

/* ---------- Preview helpers (only previews use these) ---------- */
.ak-demo { padding: var(--space-6); display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; }
.ak-demo--col { flex-direction: column; align-items: stretch; }
.ak-demo--grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--space-6); align-items: start; }
.ak-demo--wide { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: var(--space-8); }
.ak-demo--mid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.ak-demo__stage { position: relative; transform: translateZ(0); overflow: hidden; border-radius: var(--radius-sm); border: 1px dashed var(--line); background: var(--surface-sunken); }
