/* D5 SEA components: plain CSS classes, load after tokens.css */
a { color: var(--brand-ocean-text); text-underline-offset: 3px; }
a:hover { color: var(--brand-navy); }

.d5-root, .d5-root * { box-sizing: border-box; }
.d5-root { font-family: var(--font-sans); color: var(--ink); background: var(--surface-page); font-size: 16px; line-height: 24px; padding: var(--space-4); }
.d5-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.d5-stack { display: flex; flex-direction: column; gap: var(--space-3); }
.d5-lang { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.04em; color: var(--ink-muted); width: 28px; flex: none; }

/* Button */
.d5-btn { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 44px; padding: 0 20px; border-radius: var(--radius-md); border: 1px solid transparent; font-family: var(--font-sans); font-size: 14px; line-height: 20px; font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none; transition: background-color .15s ease, border-color .15s ease; }
.d5-btn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.d5-btn--primary { background: var(--brand-navy); color: var(--on-brand); }
.d5-btn--primary:hover { background: var(--brand-navy-hover); }
.d5-btn--secondary { background: var(--surface-card); color: var(--brand-navy); border-color: var(--brand-navy); }
.d5-btn--secondary:hover { background: var(--brand-ocean-tint); }
.d5-btn--ghost { background: transparent; color: var(--brand-ocean-text); }
.d5-btn--ghost:hover { background: var(--brand-ocean-tint); }
.d5-btn--promo { background: var(--brand-orange); color: var(--brand-navy); }
.d5-btn--promo:hover { background: var(--brand-orange-tint); border-color: var(--brand-orange-text); }
.d5-btn--sm { min-height: 36px; padding: 0 14px; position: relative; }
.d5-btn--sm::after { content: ""; position: absolute; inset: -4px 0; }
.d5-btn--lg { min-height: 52px; padding: 0 28px; font-size: 16px; line-height: 24px; }
.d5-btn--block { width: 100%; white-space: normal; text-align: center; }
.d5-btn[disabled], .d5-btn[aria-disabled="true"] { background: var(--surface-sunken); color: var(--ink-muted); border-color: transparent; cursor: not-allowed; }
.d5-btn[aria-busy="true"] { cursor: progress; }
.d5-spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: d5-spin .8s linear infinite; }
@keyframes d5-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .d5-spinner { animation-duration: 2.4s; } .d5-btn, .d5-card { transition: none; } }

/* Badge */
.d5-badge { display: inline-flex; align-items: center; gap: var(--space-1); padding: 2px 8px; border-radius: var(--radius-sm); font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.02em; white-space: nowrap; }
.d5-badge--promo { background: var(--brand-orange); color: var(--brand-navy); }
.d5-badge--tag { background: var(--brand-cyan-tint); color: var(--brand-cyan-text); }
.d5-badge--demo { background: var(--surface-sunken); color: var(--ink-muted); border: 1px dashed var(--border-control); }
.d5-badge--ad { background: var(--brand-ocean-tint); color: var(--brand-ocean-text); }

/* Status chip */
.d5-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 4px 12px 4px 10px; border-radius: var(--radius-pill); font-size: 14px; line-height: 20px; font-weight: 600; white-space: nowrap; }
.d5-chip svg { width: 16px; height: 16px; flex: none; }
.d5-chip--neutral { background: var(--surface-sunken); color: var(--ink-muted); }
.d5-chip--info { background: var(--brand-ocean-tint); color: var(--brand-ocean-text); }
.d5-chip--pending { background: var(--brand-orange-tint); color: var(--brand-orange-text); }
.d5-chip--success { background: var(--status-success-tint); color: var(--status-success); }
.d5-chip--danger { background: var(--status-danger-tint); color: var(--status-danger); }

/* Input */
.d5-field { display: flex; flex-direction: column; gap: 6px; max-width: 360px; }
.d5-field__label { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink); }
.d5-field__optional { font-weight: 400; color: var(--ink-muted); }
.d5-input { box-sizing: border-box; width: 100%; min-height: 44px; padding: 10px var(--space-3); border: 1px solid var(--border-control); border-radius: var(--radius-md); background: var(--surface-card); color: var(--ink); font-family: var(--font-sans); font-size: 16px; line-height: 24px; }
.d5-input::placeholder { color: var(--ink-muted); }
.d5-input:hover { border-color: var(--ink); }
.d5-input:focus { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-color: var(--brand-ocean-text); }
.d5-input[aria-invalid="true"] { border-color: var(--status-danger); border-width: 2px; padding: 9px 11px; }
.d5-input[disabled] { background: var(--surface-sunken); color: var(--ink-muted); cursor: not-allowed; }
.d5-field__help { font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.d5-field__error { display: flex; gap: 6px; align-items: flex-start; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--status-danger); }
.d5-field__error svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }

/* Card */
.d5-card { display: flex; flex-direction: column; width: 100%; max-width: 340px; background: var(--surface-card); border: 1px solid var(--border-hairline); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); overflow: hidden; transition: box-shadow .2s ease; }
.d5-card:hover { box-shadow: var(--shadow-raised); }
.d5-card:focus-within { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.d5-card__media { position: relative; aspect-ratio: 16 / 9; background: var(--surface-sunken); display: flex; align-items: flex-end; padding: var(--space-3); }
.d5-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.d5-card__badges { position: absolute; top: var(--space-3); left: var(--space-3); display: flex; flex-wrap: wrap; gap: var(--space-2); }
.d5-card__placeholder { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--ink-muted); }
.d5-card__body { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-4); }
.d5-card__place { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--brand-cyan-text); }
.d5-card__title { margin: 0; font-family: var(--font-sans); font-size: 18px; line-height: 28px; font-weight: 600; color: var(--ink-heading); }
.d5-card__meta { margin: 0; font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.d5-card__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-top: 1px solid var(--border-hairline); }
.d5-card__price { font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.d5-card__price strong { display: block; font-family: var(--font-display); font-size: 18px; line-height: 24px; font-weight: 700; color: var(--ink-heading); }
.d5-card__price s { color: var(--ink-muted); font-size: 14px; }
.d5-card__price--promo strong { color: var(--brand-orange-text); }
@media (min-width: 720px) { .d5-card__body { padding: var(--space-6) var(--space-6) var(--space-4); } .d5-card__foot { padding: var(--space-3) var(--space-6); } }
