/* Amino Annex bulk builder. Mobile first: the kit is a bottom sheet until the builder itself is 900px wide
   (builder.js adds .is-wide), then a sticky side panel. Card columns follow the product area's own width. */

.aabb {
	--aabb-accent: var(--aa-accent, #1A56C9);
	--aabb-ink: var(--aa-ink, #0B1F3A);
	--aabb-muted: var(--aa-muted, #4A5D7A);
	--aabb-line: var(--aa-line, #E3E9F2);
	--aabb-line-2: var(--aa-line-2, #C9D6E8);
	--aabb-tint: var(--aa-tint, #EEF4FD);
	--aabb-tint-2: var(--aa-tint-2, #F4F7FB);
	--aabb-ok: var(--aa-ok, #1C6B3E);
	--aabb-white: #fff;
	--aabb-radius: var(--aa-radius-lg, 14px);
	--aabb-font: var(--aa-font, system-ui, -apple-system, "Segoe UI", sans-serif);
	--aabb-mono: var(--aa-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
	color: var(--aabb-ink);
	font-family: var(--aabb-font);
	padding-bottom: 88px;
}
/* Use the full content width: Amino Annex theme prose column, and block themes via .alignwide. */
.aa-prose:has(> .aabb) { max-width: none; }
.aabb *, .aabb *::before, .aabb *::after { box-sizing: border-box; }
.aabb :where(button) { font: inherit; color: inherit; cursor: pointer; }
.aabb :where(button:disabled) { cursor: not-allowed; }
.aabb :focus-visible { outline: 3px solid var(--aabb-accent); outline-offset: 2px; }
.aabb svg { flex: none; }
.aabb .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.aabb s { color: var(--aabb-muted); font-weight: 400; }

.aabb-title { margin: 0 0 4px; font-size: 1.6rem; line-height: 1.2; }
.aabb-intro { margin: 0 0 16px; color: var(--aabb-muted); }

.aabb-layout { display: block; }

/* Search */
.aabb-search { display: flex; align-items: center; gap: 10px; padding: 0 18px; min-height: 52px; margin-bottom: 16px; background: var(--aabb-white); border: 1px solid var(--aabb-line-2); border-radius: 999px; color: var(--aabb-muted); }
.aabb-search:focus-within { border-color: var(--aabb-accent); box-shadow: 0 0 0 3px rgba(26, 86, 201, .15); }
.aabb-search input { flex: 1; min-width: 0; border: 0; background: none; padding: 12px 0; font: inherit; font-size: 16px; color: var(--aabb-ink); outline: none; }

/* Cards */
.aabb-main { min-width: 0; container-type: inline-size; }
.aabb .aabb-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin: 0; padding: 0; }
@container (min-width: 520px) { .aabb .aabb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (min-width: 1000px) { .aabb .aabb-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.aabb-card { min-width: 0; margin: 0; display: flex; flex-direction: column; padding: 16px; background: var(--aabb-white); border: 1px solid var(--aabb-line); border-radius: var(--aabb-radius); transition: border-color .15s, box-shadow .15s; }
.aabb-card:hover { box-shadow: 0 6px 20px rgba(11, 31, 58, .07); }
.aabb-card.is-in-kit { border-color: var(--aabb-accent); box-shadow: 0 0 0 1px var(--aabb-accent); }
.aabb-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.aabb-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--aabb-tint-2); font-size: .72rem; font-weight: 700; letter-spacing: .04em; }
.aabb-deal { padding: 4px 10px; border-radius: 999px; background: var(--aabb-ok); color: #fff; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.aabb-card-media { position: relative; margin: 12px 0; border-radius: 12px; background: linear-gradient(180deg, var(--aabb-tint) 0%, var(--aabb-tint-2) 100%); aspect-ratio: 16 / 10; overflow: hidden; }
.aabb .aabb-card-media img { position: absolute; inset: 6%; width: 88%; height: 88%; max-width: none; margin: 0; object-fit: contain; mix-blend-mode: multiply; }
.aabb-times { position: absolute; top: 8px; left: 8px; padding: 2px 8px; border-radius: 999px; background: var(--aabb-accent); color: #fff; font: 700 .75rem/1.4 var(--aabb-mono); }
.aabb-inkit { position: absolute; bottom: 8px; right: 8px; padding: 2px 8px; border-radius: 999px; background: var(--aabb-ink); color: #fff; font-size: .72rem; font-weight: 700; }
.aabb-card-title { margin: 0; font-size: 1.05rem; line-height: 1.3; overflow-wrap: anywhere; }
.aabb-card-desc { margin: 4px 0 0; color: var(--aabb-muted); font-size: .88rem; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.aabb-sizes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.aabb-pill { min-height: 36px; padding: 4px 14px; border: 1px solid var(--aabb-line-2); border-radius: 999px; background: var(--aabb-white); font-size: .82rem; font-weight: 600; }
.aabb-pill[aria-pressed="true"] { background: var(--aabb-ink); border-color: var(--aabb-ink); color: #fff; }
.aabb-pill:disabled { opacity: .45; text-decoration: line-through; }
.aabb-card-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 14px; }
.aabb-price { font-size: .85rem; }
.aabb-price strong { font-size: 1.15rem; color: var(--aabb-ok); }
.aabb-price small { color: var(--aabb-muted); }
.aabb-pill b { font-family: var(--aabb-mono); font-size: .75rem; }
.aabb-add { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 16px; border: 1px solid var(--aabb-line); border-radius: 999px; background: var(--aabb-tint-2); font-size: .88rem; font-weight: 700; white-space: nowrap; }
.aabb-add:hover:not(:disabled) { background: var(--aabb-accent); border-color: var(--aabb-accent); color: #fff; }
.aabb-add:disabled { opacity: .5; }
.aabb-empty { color: var(--aabb-muted); }

/* Kit panel: bottom sheet on small screens */
.aabb-panel { position: fixed; z-index: 1001; left: 0; right: 0; bottom: 0; max-height: 88vh; overflow-y: auto; overscroll-behavior: contain; background: var(--aabb-tint-2); border-radius: 20px 20px 0 0; box-shadow: 0 -10px 40px rgba(11, 31, 58, .2); transform: translateY(105%); transition: transform .28s ease; visibility: hidden; }
.aabb.is-sheet-open .aabb-panel { transform: none; visibility: visible; }
.aabb-scrim { position: fixed; inset: 0; z-index: 1000; background: rgba(11, 31, 58, .45); }
html.aabb-lock { overflow: hidden; }
.aabb-panel-inner { position: relative; padding: 20px 16px 0; }
.aabb-close { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--aabb-white); font-size: 1.5rem; line-height: 1; }

.aabb-bar { position: fixed; z-index: 999; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 16px; border: 0; border-radius: 16px; background: var(--aabb-ink); color: #fff !important; box-shadow: 0 10px 30px rgba(11, 31, 58, .3); text-align: left; }
.aabb-bar-count { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.aabb-bar-pay { flex: 1; font-weight: 700; }
.aabb-bar-pay small { display: block; font-weight: 400; color: #9fe0b8; font-size: .78rem; }
.aabb-bar-go { padding: 6px 12px; border-radius: 999px; background: var(--aabb-accent); font-size: .85rem; font-weight: 700; }
.aabb-bar.is-bump { animation: aabb-bump .35s ease; }
@keyframes aabb-bump { 50% { transform: scale(1.03); } }

.aabb-panel-head { display: flex; align-items: center; gap: 14px; padding-right: 40px; }
.aabb-ring { position: relative; width: 64px; height: 64px; flex: none; }
.aabb-ring svg { transform: rotate(-90deg); }
.aabb-ring circle { fill: none; stroke-width: 6; }
.aabb-ring-bg { stroke: var(--aabb-line); }
.aabb-ring-fg { stroke: var(--aabb-accent); stroke-linecap: round; transition: stroke-dashoffset .4s ease; }
.aabb-ring span { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: .6rem; text-transform: uppercase; letter-spacing: .06em; color: var(--aabb-muted); }
.aabb-ring b { font-size: 1.2rem; line-height: 1; color: var(--aabb-ink); letter-spacing: 0; }
.aabb-eyebrow { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--aabb-accent); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.aabb-headline { margin: 2px 0; font-weight: 700; line-height: 1.3; }
.aabb-sub { margin: 0; color: var(--aabb-muted); font-size: .8rem; }

.aabb-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 16px 0 0; padding: 0; list-style: none; }
.aabb-tile { position: relative; display: flex; flex-direction: column; justify-content: flex-end; aspect-ratio: 1; padding: 8px; border-radius: 12px; background: linear-gradient(160deg, #1d3c6e, var(--aabb-ink)); color: #fff; overflow: hidden; }
.aabb-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 14px 14px 40px; }
.aabb-tile-name { position: relative; font-size: .78rem; font-weight: 700; line-height: 1.25; }
.aabb-tile-name em { font-style: normal; font-weight: 400; opacity: .8; }
.aabb-tile-pct { position: relative; font: 600 .7rem var(--aabb-mono); color: #9fe0b8; }
.aabb-remove { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .9); color: var(--aabb-ink) !important; font-size: 1.1rem; line-height: 1; }
.aabb-tile-add { width: 100%; align-items: center; justify-content: center; gap: 4px; border: 1.5px dashed var(--aabb-line-2); background: var(--aabb-white); color: var(--aabb-muted) !important; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; text-align: center; }
.aabb-tile-add span { font-size: 1.6rem; font-weight: 400; }

.aabb-slots { display: grid; grid-template-columns: repeat(var(--aabb-slots, 10), 1fr); gap: 4px; margin-top: 16px; }
.aabb-slots i { height: 10px; border-radius: 3px; background: var(--aabb-line); }
.aabb-slots i.is-full { background: var(--aabb-accent); }
.aabb-lines { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.aabb-line { position: relative; display: flex; align-items: center; gap: 10px; padding: 6px 44px 6px 6px; border: 1px solid var(--aabb-line); border-radius: 12px; background: var(--aabb-white); }
.aabb-line img { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; background: var(--aabb-tint-2); }
.aabb-line-name { flex: 1; min-width: 0; font-size: .85rem; font-weight: 700; }
.aabb-line-name em { font-style: normal; font-weight: 400; color: var(--aabb-muted); }
.aabb-line-qty { font: 700 .85rem var(--aabb-mono); }
.aabb-line .aabb-remove { top: 50%; transform: translateY(-50%); background: var(--aabb-tint-2); }
.aabb-tile-add--row { display: flex; flex-direction: row; aspect-ratio: auto; min-height: 56px; margin-top: 12px; border-radius: 12px; }
.aabb-sec { margin-top: 18px; }
.aabb-sec-title { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: .9rem; }
.aabb-sec-title svg { color: var(--aabb-accent); }
.aabb-hint { margin: 0 0 8px; font-size: .8rem; color: var(--aabb-muted); }
.aabb-gifts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.aabb-gift { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 6px 10px; border: 1px solid var(--aabb-line); border-radius: 12px; background: var(--aabb-white); font-size: .8rem; font-weight: 700; text-align: left; }
.aabb-gift img { width: 32px; height: 32px; object-fit: contain; border-radius: 6px; }
.aabb-gift[aria-pressed="true"] { background: var(--aabb-ink); border-color: var(--aabb-ink); color: #fff !important; }
.aabb-gift:disabled { opacity: .5; }
.aabb-addon { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--aabb-line); border-radius: 14px; background: var(--aabb-white); }
.aabb-addon + .aabb-addon { margin-top: 8px; }
.aabb-addon img { width: 52px; height: 52px; object-fit: contain; border-radius: 8px; background: var(--aabb-tint-2); }
.aabb-addon > div { flex: 1; min-width: 0; }
.aabb-addon strong { display: block; font-size: .88rem; }
.aabb-addon span { font-size: .8rem; color: var(--aabb-muted); }
.aabb-stepper { display: flex; align-items: center; gap: 4px; }
.aabb-stepper button { width: 34px; height: 34px; border: 1px solid var(--aabb-line); border-radius: 50%; background: var(--aabb-tint-2); font-weight: 700; }
.aabb-stepper span { min-width: 22px; text-align: center; font-weight: 700; color: var(--aabb-ink); }

.aabb-foot { position: sticky; bottom: 0; z-index: 2; margin: 18px -16px 0; padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); background: var(--aabb-tint-2); box-shadow: 0 -12px 16px -12px rgba(11, 31, 58, .12); }
.aabb-summary { margin: 0; padding: 14px; border-radius: 14px; background: var(--aabb-white); border: 1px solid var(--aabb-line); font-size: .88rem; }
.aabb-summary div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; }
.aabb-summary dt { color: var(--aabb-muted); }
.aabb-summary dd { margin: 0; font-weight: 700; text-align: right; }
.aabb-pay { font-size: 1.05rem; }
.aabb-save dt, .aabb-save dd, .aabb-ship dd { color: var(--aabb-ok); font-weight: 700; }

.aabb-cta { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 54px; margin-top: 14px; border: 0; border-radius: 999px; background: linear-gradient(90deg, var(--aabb-ink), #183f80); color: #fff !important; font-weight: 700; font-size: 1rem; }
.aabb-cta:hover:not(:disabled) { background: var(--aabb-accent); }
.aabb-cta:disabled { opacity: .55; }
.aabb-msg { margin: 8px 0 0; color: #a3261b; font-size: .85rem; text-align: center; }
.aabb-msg:empty { display: none; }
.aabb-note { margin: 8px 0 0; color: var(--aabb-muted); font-size: .78rem; text-align: center; }

@media (min-width: 560px) {
	.aabb-tiles { grid-template-columns: repeat(3, 1fr); }
	.aabb-gifts { grid-template-columns: repeat(3, 1fr); }
}

.aabb.is-wide { padding-bottom: 0; }
.aabb.is-wide .aabb-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.aabb.is-wide .aabb-panel { position: sticky; top: var(--aabb-sticky-top, 96px); left: auto; right: auto; bottom: auto; z-index: 1; max-height: calc(100vh - var(--aabb-sticky-top, 96px) - 16px); transform: none; visibility: visible; border: 1px solid var(--aabb-line-2); border-radius: 22px; box-shadow: none; transition: none; }
.aabb.is-wide .aabb-bar, .aabb.is-wide .aabb-scrim, .aabb.is-wide .aabb-close { display: none !important; }
.aabb.is-wide .aabb-panel-head { padding-right: 0; }
.aabb.is-wide .aabb-panel-inner { padding: 20px 20px 0; }
.aabb.is-wide .aabb-foot { margin: 18px -20px 0; padding: 12px 20px 20px; }
.aabb.is-wide .aabb-tiles, .aabb.is-wide .aabb-gifts { grid-template-columns: repeat(2, 1fr); }

@media (prefers-reduced-motion: reduce) {
	.aabb-panel, .aabb-ring-fg { transition: none; }
	.aabb-bar.is-bump { animation: none; }
}
