/* The windows of the shop flow (architecture 7.1; PM-002, PM-003, PM-005, PM-006, PM-009 to PM-012, REV-009, REV-011, CUS-005 to CUS-038): the
   product window with its customiser, its photo viewer and its reviews, and the cart (drawer, review step, the two dialogs). The checkout joins in its stage. The
   four --theme-* variables are set on the window by the toy (themeVars); each is read with its default, so a window without them is the amber one. */
.overlay__panel.toy-window { display: flex; flex-direction: column; width: 92%; max-width: 960px; max-height: none; height: 90vh; padding: 1.25rem 1.6rem; overflow: hidden; }
.toy-window__inner { display: flex; flex: 1; flex-direction: column; min-height: 0; }

/* The header: the badge, the title and the base price with the close button. */
.toy-window__header { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin-bottom: 0.85rem; padding-bottom: 0.75rem; border-bottom: 1.5px solid var(--theme-border, #fde047); }
/* AF68: the strip of her preview of a hidden toy, in the colours of the badge "по поръчка". */
.toy-window__hidden { margin: 0 0 0.75rem; padding: 0.5rem 0.9rem; border-radius: var(--radius-sm); background: #fef3c7; color: #92400e; font-weight: 700; text-align: center; }
.toy-window__badge { justify-self: start; padding: 0.35rem 0.8rem; border-radius: var(--radius-full); box-shadow: var(--shadow-sm); font-size: 0.82rem; font-weight: 700; }
.toy-window__badge--ready { background: #d1fae5; color: #065f46; }
.toy-window__badge--custom { background: #fef3c7; color: #92400e; }
.toy-window__badge--soldout { background: #e2e8f0; color: #475569; }
.toy-window__title { margin: 0; font-size: 1.45rem; font-weight: 800; text-align: center; color: var(--theme-text, #451a03); }
.toy-window__end { display: flex; align-items: center; gap: 10px; justify-self: end; }
.toy-window__price { padding: 0.25rem 0.8rem; border: 1.5px solid var(--theme-border, #fde047); border-radius: var(--radius-full); white-space: nowrap; }
.toy-window__price small { font-size: 0.78rem; font-weight: 700; color: #64748b; }
.toy-window__price b { font-size: 1.15rem; font-weight: 800; color: #047857; }
.toy-window__close { position: static; flex: none; width: 34px; height: 34px; font-size: 1.3rem; }

/* Two columns that scroll on their own; the left one is as wide as the stage that the customiser draws in the picture's place. */
.toy-window__columns { position: relative; display: grid; flex: 1; grid-template-columns: calc(var(--stage) + 20px) 1fr; gap: 1.5rem; min-height: 0; }
.toy-window__left, .toy-window__right { display: flex; flex-direction: column; gap: 0.85rem; min-height: 0; padding-right: 10px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(148, 163, 184, 0.45) transparent; }
.toy-window__left > * { flex: none; width: 100%; max-width: var(--stage); margin-inline: auto; }
.toy-window__stage { position: relative; display: block; aspect-ratio: 1; overflow: hidden; border-radius: 14px; background: #f3f4f6; cursor: zoom-in; user-select: none; }
/* AF25: the stage stays at the top of its column while the rest scrolls, so "Моят избор" beside it stays with it */
.toy-window__left > .toy-window__stage { position: sticky; top: 0; z-index: 1; }
.toy-window__zoom { position: absolute; right: 6px; bottom: 6px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(0, 0, 0, 0.65); color: #fff; font-size: 1rem; }
.thumbs { display: flex; align-items: stretch; gap: 12px; padding: 4px 0; }
.thumbs__pane { display: flex; flex-direction: column; gap: 4px; }
.thumbs__pane--interactive { flex: none; }
.thumbs__pane--gallery { flex: 1; min-width: 0; }
.thumbs__title { font-size: 0.72rem; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: 0.03em; white-space: nowrap; }
.thumbs__divider { width: 1px; background: #e2e8f0; margin: 2px 0; align-self: stretch; }
.thumbs__grid { display: grid; grid-template-rows: repeat(2, 36px); grid-auto-flow: column; grid-auto-columns: 36px; gap: 6px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; }
.thumbs__item { position: relative; padding: 0; overflow: hidden; background: #f1f5f9; cursor: pointer; transition: var(--transition); }
.thumbs__item img { display: block; width: 100%; height: 100%; object-fit: cover; }
.thumbs__item--interactive { width: 78px; height: 78px; border-radius: 10px; border: 2px solid var(--theme-border, #fde047); }
.thumbs__item--interactive.thumbs__item--active { border: 3px solid var(--theme-icon-bg, #f59e0b); opacity: 1; box-shadow: 0 0 0 2px var(--theme-border, #fde047), 0 4px 10px rgba(0, 0, 0, 0.15); }
.thumbs__item--gallery { width: 36px; height: 36px; border-radius: 6px; border: 1.5px solid var(--theme-border, #fde047); opacity: 0.7; }
.thumbs__item--gallery:hover { opacity: 1; }
.thumbs__item--gallery.thumbs__item--active { border: 2.5px solid var(--theme-icon-bg, #f59e0b); opacity: 1; box-shadow: 0 0 0 2px var(--theme-border, #fde047); }
.thumbs--plain { justify-content: center; flex-wrap: wrap; gap: 8px; }
.thumbs--plain .thumbs__item--gallery { width: 44px; height: 44px; border-radius: 8px; }
/* AF61: the bundles that hold this toy, above the choices */
.toy-window__bundles { margin: 0 0 0.6rem; padding: 0.5rem 0.75rem; border-radius: var(--radius-sm); background: #f5f3ff; color: #5b21b6; font-size: 0.9rem; font-weight: 700; }
.toy-window__bundles a { color: inherit; }
.toy-window__disclaimer { margin: 0; font-size: 0.76rem; color: #64748b; text-align: center; line-height: 1.3; }

/* The description and the specifications (PM-011): a grey box; the description keeps its line breaks. */
.specs { padding: 1rem; border: 1px solid #f3f4f6; border-radius: 12px; background: #fafafa; font-size: 0.88rem; line-height: 1.5; }
.specs__description { margin: 0 0 0.6rem; padding-bottom: 0.6rem; border-bottom: 1px dashed #e5e7eb; font-size: 0.9rem; color: #374151; white-space: pre-line; }
.specs__list { margin: 0; padding: 0; list-style: none; }
.specs__list > li + li { margin-top: 0.35rem; }
.specs__characteristics { margin: 0.2rem 0 0; padding-left: 1.2rem; }
.specs__time { padding-top: 0.5rem; border-top: 1px dashed #e5e7eb; font-weight: 700; }

/* A section of the right column (PM-003): a native <details>, closed at the start; the chevron shows only while it is closed. */
.accordion { border: 2px solid var(--theme-border, #fde047); border-radius: 16px; background: #fff; box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04); }
.accordion__head { display: flex; align-items: center; gap: 10px; padding: 0.7rem 0.85rem; border-radius: 14px; background: linear-gradient(135deg, #fff 0%, var(--theme-border, #fde047) 180%); list-style: none; cursor: pointer; transition: var(--transition); }
.accordion__head::-webkit-details-marker { display: none; }
.accordion__head:hover { transform: translateY(-1.5px); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06); }
.accordion__icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: linear-gradient(135deg, var(--theme-icon-bg, #f59e0b), var(--theme-btn-bg, #d97706)); }
.accordion__title { flex: 1; font-size: 0.98rem; font-weight: 800; color: var(--theme-text, #451a03); }
.accordion__more { display: grid; place-items: center; width: 28px; height: 28px; border: 1.5px solid var(--theme-border, #fde047); border-radius: 50%; background: #fff; font-size: 0.7rem; color: var(--theme-text, #451a03); }
.accordion[open] .accordion__more { display: none; }
.accordion__body { padding: 0.65rem 0.85rem 0.85rem; }
.accordion__fold { display: block; margin: 0.7rem 0 0 auto; padding: 0.3rem 0.8rem; border: 1.5px solid var(--theme-border, #fde047); border-radius: var(--radius-full); background: #fff; color: var(--theme-text, #451a03); font-size: 0.8rem; font-weight: 700; }

/* The colour choice (PM-009): round buttons; the dot says what the shelf says. */
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { position: relative; width: 44px; height: 44px; border: 2px solid #cbd5e1; border-radius: 50%; background: var(--swatch, #e6d2b5); box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08); transition: var(--transition); }
.swatch__photo { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.swatch--selected { border: 3px solid var(--btn-leading, var(--clr-primary)); box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--btn-leading, var(--clr-primary)) 30%, transparent); transform: scale(1.12); }
.swatch__dot { position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border: 1.5px solid #fff; border-radius: 50%; }
.swatch__dot--ready { background: #10b981; }
.swatch__dot--custom { background: #f97316; }
.swatch__dot--soldout { background: #94a3b8; }
.swatches__caption { margin: 0.6rem 0 0; font-size: 0.88rem; font-weight: 600; color: var(--theme-text, #451a03); }
.yarn-modes { display: flex; flex-direction: column; gap: 0.8rem; margin-top: 0.6rem; }
.yarn-default-summary { padding: 0.6rem 0.8rem; border-radius: 8px; background: #fafaf9; border: 1px solid var(--clr-border); }
.yarn-default-summary__label { display: block; font-weight: 700; font-size: 0.82rem; color: #78716c; margin-bottom: 0.3rem; }
.yarn-default-summary__list { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.yarn-default-summary__tag { display: inline-flex; gap: 0.25rem; font-size: 0.85rem; padding: 0.2rem 0.5rem; background: #fff; border-radius: 6px; border: 1px solid #e7e5e4; }
.yarn-zone-pickers { display: flex; flex-direction: column; gap: 0.8rem; padding: 0.7rem; border-radius: 8px; background: #fafaf9; border: 1px solid var(--clr-border); }
.yarn-zone-picker__title { display: block; font-size: 0.85rem; margin-bottom: 0.4rem; }
.yarn-zone-picker__chosen { font-weight: 400; color: #78716c; }
/* AF149: "🎨 Свои цветове", the first round button before the ready models: a swatch's size, dashed in the colour of "по поръчка", its name under it. */
.yarn-own { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; max-width: 4.6rem; padding: 0; border: 0; background: none; color: var(--theme-text, #451a03); font: inherit; text-align: center; cursor: pointer; }
.yarn-own__circle { display: grid; place-items: center; width: 44px; height: 44px; border: 2px dashed var(--clr-custom); border-radius: 50%; background: color-mix(in srgb, var(--clr-custom) 10%, #fff); font-size: 1.3rem; }
.yarn-own[aria-pressed="true"] .yarn-own__circle { border: 3px solid var(--btn-leading, var(--clr-primary)); box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--btn-leading, var(--clr-primary)) 30%, transparent); }
.yarn-own__name { font-size: 0.72rem; font-weight: 700; line-height: 1.15; }
.yarn-own__note { font-size: 0.66rem; line-height: 1.1; color: var(--clr-custom); }
/* "Готови модели:" over the models only: the button on the left, level with the models under the title. */
.yarn-pick { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; row-gap: 0.35rem; align-items: start; }
.yarn-pick > .yarn-own { grid-column: 1; grid-row: 2; }
.yarn-pick__title { grid-column: 2; grid-row: 1; text-align: start; }
.yarn-pick > .swatches { grid-column: 2; grid-row: 2; }
.pill--custom.pill--active { background: #f97316; border-color: #f97316; color: #fff; }

/* The notice above the price (PM-010) and the price row; the toy's own theme wins over the shop's button colour for the button (PM-003 rule 2). */
.notice { display: flex; align-items: center; gap: 10px; padding: 0.65rem 0.9rem; border: 1.5px solid; border-radius: 10px; }
.notice--ready { border-color: #86efac; background: #f0fdf4; color: #15803d; }
.notice--custom { border-color: #fdba74; background: #fff7ed; color: #c2410c; }
.notice--blocked { border-color: #cbd5e1; background: #f1f5f9; color: #475569; }
/* AF55: what the customer still has to choose is said in red; a tap on the pale add button shakes a notice that blocks, once per tap. */
.notice--choose { border-color: color-mix(in srgb, var(--clr-danger) 45%, #fff); background: color-mix(in srgb, var(--clr-danger) 7%, #fff); color: var(--clr-danger); }
.notice--nudge { animation: nudge 0.45s ease; }
@keyframes nudge { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.notice__icon { font-size: 1.4rem; }
.notice__title, .notice__detail { display: block; }
.notice__title { font-size: 0.9rem; }
.notice__detail { font-size: 0.78rem; }
.toy-window__buy { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1rem; padding-top: 0.8rem; border-top: 1px solid var(--clr-border); }
.toy-window__total { margin: 0; white-space: nowrap; }
.toy-window__total span { display: block; font-size: 0.85rem; color: #64748b; }
.toy-window__total b { font-family: var(--font-heading); font-size: 1.6rem; color: #b45309; }
.toy-window__add { flex: 1 1 auto; padding-inline: 1.2rem; border: 2px solid var(--theme-border, #fde047); border-radius: 28px; background: var(--theme-btn-bg, #d97706); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2); }

/* The customiser (CUS-005 to CUS-038). Next to the photo: "Моят избор" with its counter, and the panel of thumbnails,
   which opens to the right of the stage on desktop. A thumbnail is dimmed until its thing is on the photo. */
.set-bar { position: absolute; top: 0; left: 10px; z-index: 5; width: var(--stage); height: var(--stage); pointer-events: none; }
.set-bar > * { pointer-events: auto; }
.set-bar__btn { display: inline-flex; align-items: center; gap: 6px; padding: 0.4rem 0.85rem; border: 1.5px solid #fca5a5; border-radius: var(--radius-full); background: rgba(255, 255, 255, 0.95); color: #dc2626; font-size: 0.82rem; font-weight: 700; transition: var(--transition); }
.set-bar__btn:hover { border-color: #ef4444; background: #fef2f2; }
.set-bar__btn--mine { position: absolute; top: 10px; right: 10px; border-color: #6ee7b7; color: #059669; box-shadow: var(--shadow-sm); }
.set-bar__btn--mine:hover { border-color: #059669; background: #ecfdf5; }
.set-bar__btn--mine[aria-expanded="true"] { border-color: #059669; background: #059669; color: #fff; }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--radius-full); background: #059669; color: #fff; font-size: 0.72rem; font-weight: 800; }
.set-bar__btn--mine[aria-expanded="true"] .count { background: #fff; color: #059669; }
.count--corner { position: absolute; top: -6px; right: -8px; }
/* AF38: a new piece in the set: the button pulses three times and its number pops, then both rest; nothing moves for a device that asks for less motion. */
.set-bar__pulse { position: absolute; inset: -2px; border-radius: inherit; pointer-events: none; animation: set-pulse 0.6s ease-out 3; }
.set-bar__btn--mine .count { animation: count-pop 0.45s ease-out; }
@keyframes set-pulse { from { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.45); } to { box-shadow: 0 0 0 10px rgba(5, 150, 105, 0); } }
@keyframes count-pop { 40% { transform: scale(1.35); } }
@media (prefers-reduced-motion: reduce) { .set-bar__pulse, .set-bar__btn--mine .count { animation: none; } }
.set-bar__panel { position: absolute; top: 0; left: calc(100% + 14px); display: grid; gap: 8px; width: 220px; max-height: var(--stage); padding: 0.75rem 0.85rem; overflow-y: auto; border: 1.5px solid #a7f3d0; border-radius: 14px; background: #f0fdf4; box-shadow: var(--shadow-md); animation: overlayIn 0.2s ease; }
.set-bar__row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.set-bar__pair { display: inline-flex; align-items: center; gap: 3px; }
.set-bar__pair--joined { padding: 3px 5px; border: 2px solid #10b981; border-radius: 12px; background: #d1fae5; } /* AF75, AF76: a piece with its key ring and lettering, plainly one */
.set-bar__plus { color: #047857; font-size: 1rem; font-weight: 800; }
.set-bar__label { flex: 0 0 100%; font-size: 0.75rem; font-weight: 700; color: #047857; }
.set-bar__panel .set-bar__btn--undress { justify-content: center; width: 100%; margin-top: 4px; }
.thumb { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 5px; width: 42px; height: 42px; overflow: hidden; border: 2px solid #cbd5e1; border-radius: 10px; background: #fff; opacity: 0.48; filter: grayscale(0.4); transition: var(--transition); }
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.thumb--text { width: auto; padding: 0 8px; }
.thumb--letter { opacity: 1; filter: none; } /* AF51: a lettering is in the set whatever the photo shows */
.thumb__dot { flex: none; width: 13px; height: 13px; border: 2px solid var(--ring, #cbd5e1); border-radius: 50%; background: var(--swatch, #e6d2b5); }
.thumb:not(.thumb--text) .thumb__dot { width: 26px; height: 26px; }
.thumb__text { max-width: 44px; overflow: hidden; font-size: 0.75rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.thumb[aria-pressed="true"] { border-color: #10b981; opacity: 1; filter: none; }
.thumb[aria-pressed="true"]::after { content: "✓"; position: absolute; top: 1px; right: 1px; display: grid; place-items: center; width: 13px; height: 13px; border-radius: 50%; background: #10b981; color: #fff; font-size: 0.55rem; }

/* A section of add-ons (CUS-006 to CUS-013): the caption with the clear button, then one card for each item. A card is grey while closed, light
   green while its colour is tried on, green once a piece of it is in the set. */
.section-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; margin-bottom: 0.2rem; }
.section-bar__caption { margin: 0; font-size: 0.85rem; font-weight: 600; color: #64748b; }
.clear-btn { padding: 0.3rem 0.7rem; border: 1px solid #fecdd3; border-radius: var(--radius-full); background: #fff1f2; color: #e11d48; font-size: 0.78rem; font-weight: 700; }
.clear-btn:disabled { opacity: 0.45; cursor: default; }
.addon { margin-top: 8px; border: 1.5px solid #cbd5e1; border-radius: 12px; background: #f8fafc; transition: var(--transition); }
.addon--open { border-color: #86efac; background: #f0fdf4; }
.addon--added { border-color: #10b981; background: #ecfdf5; }
.addon__head { display: flex; align-items: center; gap: 8px; width: 100%; padding: 0.6rem 0.75rem; font-size: 0.9rem; font-weight: 700; text-align: left; color: var(--theme-text, #451a03); }
.addon__name { flex: 1; }
.addon__arrow { font-size: 0.7rem; transition: transform 0.2s ease; }
.addon--open .addon__arrow { transform: rotate(180deg); }
/* AF52: the customer's choice of the toy, like the swatches of a colour: one row of her options. */
.choice { padding: 0.75rem 0.9rem; border: 2px solid var(--theme-border, #fde047); border-radius: var(--radius-md); background: #fff; }
.choice__title { margin: 0 0 0.5rem; font-weight: 800; color: var(--theme-text, #451a03); }
.choice__options { display: flex; flex-wrap: wrap; gap: 6px; }
.choice__group { margin: 0.4rem 0 0.25rem; font-weight: 700; color: var(--theme-text, #451a03); } /* AF103: the kind of the options under it */
.choice__option { min-width: 40px; padding: 0.4rem 0.6rem; border: 2px solid #cbd5e1; border-radius: 10px; background: #fff; font-size: 1rem; font-weight: 800; }
.choice__option[aria-pressed="true"] { border-color: #059669; background: #ecfdf5; color: #065f46; box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15); }
/* AF55: the choice a tap on the pale add button asks for, outlined in red until it is made; the outline flashes twice at every tap. */
.choice--nudge { border-color: var(--clr-danger); scroll-margin: 12px; animation: choice-flash 0.7s ease 2; }
@keyframes choice-flash { from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--clr-danger) 45%, transparent); } to { box-shadow: 0 0 0 10px transparent; } }
@media (prefers-reduced-motion: reduce) { .notice--nudge, .choice--nudge { animation: none; } }
/* AF60: the places of a bundle, one choice each; an option with its photo, dashed while it would be made to order, pale when it cannot be picked. */
.bpicks { display: grid; gap: 0.6rem; }
.choice__head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; } /* AF106: a place that folds */
.choice__head .choice__title { margin: 0; }
.choice--open .choice__head { margin-bottom: 0.5rem; }
.choice__empty { font-style: normal; font-weight: 600; color: var(--clr-text-muted, #6b7280); }
.choice__arrow { flex: none; }
.bplace-tailor { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.6rem; margin-top: 0.5rem; } /* AF112 */
.bplace-tailor__what { flex: 1 1 100%; color: var(--clr-text-muted, #6b7280); }
.bplace-hint { flex: 1 1 100%; padding: 0.35rem 0.6rem; border-radius: 8px; background: #fffbeb; color: #92400e; } /* AF119: soft, never required */
.bpick { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.9rem; font-weight: 700; }
.bpick__pic { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.bpick__dot { flex: none; width: 24px; height: 24px; border: 1px solid var(--clr-border, #e5e7eb); border-radius: 50%; background: var(--swatch, transparent); } /* AF109 */
.bpick--custom { border-style: dashed; }
/* AF71: a ready model of a bundle, its photo above its name. */
.bmodel-pick { flex-direction: column; max-width: 120px; text-align: center; }
.bmodel-pick--mine .bmodel-pick__pic { display: flex; align-items: center; justify-content: center; background: var(--clr-bg); font-size: 2.6rem; } /* AF75: her own combination */
.choose-btn { margin-top: 0.6rem; } /* AF83, AF85: a choice confirmed, folded into one card */
.chosen-card { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.6rem; padding: 0.6rem 0.8rem; border: 2px solid #10b981; border-radius: var(--radius-sm); background: #ecfdf5; }
.bplace-addon { margin-top: 0.4rem; font-size: 0.85rem; font-weight: 700; } /* AF74: her key ring on this piece */
/* AF144: the places of a part in one section: numbered places side by side (dashed while empty, green once chosen, the open one outlined in the theme), the
   options of the open one under them, and one row of numbered key-ring ticks. */
.bpart__count { margin-left: 0.3rem; font-size: 0.85rem; font-weight: 600; color: var(--clr-text-muted, #6b7280); }
.bslots { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 6px; margin-bottom: 0.6rem; }
.bslot { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; padding: 0.4rem 0.3rem; border: 2px dashed #cbd5e1; border-radius: 10px; background: #fff;
  color: var(--theme-text, #451a03); font: inherit; font-size: 0.85rem; font-weight: 700; text-align: center; cursor: pointer; }
.bslot__no { font-size: 0.75rem; color: var(--clr-text-muted, #6b7280); }
.bslot__name { overflow-wrap: anywhere; }
.bslot--done { border-style: solid; border-color: #059669; background: #ecfdf5; color: #065f46; }
.bslot[aria-pressed="true"] { border-style: solid; border-color: var(--theme-text, #451a03); box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-text, #451a03) 18%, transparent); }
.bslot--nudge { border-color: var(--clr-danger); }
.bslot-rings { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 0.6rem; }
.bslot-rings__label { flex: 1 1 100%; font-size: 0.85rem; font-weight: 700; color: var(--theme-text, #451a03); }
.bslot-rings .bplace-addon { margin-top: 0; min-width: 44px; }
/* AF145: a place of several stores: a picture of each store with its name (the tapped one pressed), then that store's colours as round photos with their names. */
.bkinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; margin-bottom: 0.6rem; }
.bkind { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; padding: 0.35rem 0.25rem; border: 2px solid #cbd5e1; border-radius: 12px; background: #fff;
  color: var(--theme-text, #451a03); font: inherit; font-size: 0.8rem; font-weight: 700; text-align: center; cursor: pointer; }
.bkind[aria-pressed="true"] { border-color: #059669; background: #ecfdf5; color: #065f46; box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15); }
.bkind__pic { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--clr-bg); font-size: 1.6rem; }
.bkind__name { overflow-wrap: anywhere; }
.bpick--round { flex-direction: column; gap: 3px; max-width: 104px; padding: 0.35rem 0.4rem; border-radius: 14px; font-size: 0.8rem; text-align: center; }
.bpick--round .bpick__pic { width: 48px; height: 48px; }
.bpick--round .bpick__dot { width: 40px; height: 40px; }
.bmodel-pick__pic { width: 96px; height: 96px; border-radius: var(--radius-sm); object-fit: cover; }
.bpick:disabled { opacity: 0.45; cursor: not-allowed; }
.addon__body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 0.1rem 0.75rem 0.75rem; }
.addon__hint { margin: 0; font-size: 0.8rem; color: #64748b; }
.swatch-cell { position: relative; display: inline-flex; }
.swatch-cell--added .swatch:not(.swatch--selected) { border-color: #059669; transform: scale(1.05); }
.emb-form__add { padding: 0.5rem 0.8rem; border: 1.5px dashed #86efac; border-radius: 10px; background: #fff; color: #047857; font-size: 0.86rem; font-weight: 700; transition: var(--transition); }
/* AF50: the one button that puts a tried colour in the set is a real button, not a pale outline. */
.addon__add { width: 100%; padding: 0.65rem 0.9rem; border: 0; border-radius: 10px; background: #059669; box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25); color: #fff; font-size: 0.92rem; font-weight: 800; transition: var(--transition); }
.addon__add:hover:not([aria-disabled="true"]) { background: #047857; }
.addon__add[aria-disabled="true"], .emb-form__add:disabled, .step[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.unit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 0.45rem 0.6rem; border: 1px solid #d1fae5; border-radius: 10px; background: #fff; font-size: 0.84rem; }
.unit-row__dot { flex: none; width: 20px; height: 20px; overflow: hidden; border: 1px solid #cbd5e1; border-radius: 50%; background: var(--swatch, #e6d2b5); }
.unit-row__dot img { width: 100%; height: 100%; object-fit: cover; }
.unit-row__name { flex: 1 1 4rem; min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
.unit-row__shelf { padding: 1px 8px; border-radius: var(--radius-full); font-size: 0.72rem; font-weight: 700; white-space: nowrap; }
.unit-row__shelf--ready { background: #ecfdf5; color: #166534; }
.unit-row__shelf--custom { background: #fff7ed; color: #c2410c; }
.unit-row__steps { display: flex; flex: 0 0 100%; align-items: center; gap: 8px; }
.step { width: 28px; height: 28px; border: 1.5px solid #cbd5e1; border-radius: 8px; background: #fff; font-weight: 800; line-height: 1; }
.unit-row__qty { min-width: 1.2rem; text-align: center; }
.unit-row__sum { margin-left: auto; font-weight: 700; color: #047857; }
.unit-row__bin { padding: 2px 4px; }

/* The section "Персонализация" (CUS-014 to CUS-024): the four choices in a left-aligned stack, the lilac form, and a card for each embroidery. */
.radios { display: grid; gap: 6px; margin: 0.5rem 0 0.6rem; }
.radios__item { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; font-weight: 600; cursor: pointer; }
.emb-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-bottom: 0.6rem; padding: 0.7rem; border: 1px solid #e9d5ff; border-radius: 12px; background: #faf5ff; }
.emb-form__row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px; }
.emb-form__label { font-size: 0.8rem; font-weight: 700; color: #581c87; }
.emb-form .field { padding: 0.5rem 0.7rem; }
.emb-form__error { margin: 0; font-size: 0.82rem; font-weight: 700; color: var(--clr-danger); }
/* AF30: the example photos of a lettering, small squares that open the viewer; the letters show as capitals while they are typed. */
.lettering__photos { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 0.6rem; }
.lettering__photo { width: 76px; padding: 0; border: 1px solid #e9d5ff; border-radius: 10px; background: #fff; overflow: hidden; cursor: zoom-in; }
.lettering__photo img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.lettering__text { text-transform: uppercase; }
.lettering__hint { margin: 0 0 0.6rem; font-size: 0.85rem; color: #64748b; } /* AF35: a toy with variants without its box yet */
.emb-form__add { width: 100%; border-color: #c084fc; background: #f3e8ff; color: #7e22ce; }
.emb-card { position: relative; margin-top: 6px; padding: 0.5rem 2rem 0.5rem 0.7rem; border: 1px solid #e9d5ff; border-radius: 10px; background: #faf5ff; color: #581c87; font-size: 0.84rem; }
.emb-card__title { margin: 0; font-weight: 700; }
.emb-card__price { margin-left: 6px; padding: 1px 8px; border-radius: var(--radius-full); background: #ecfdf5; color: #047857; font-size: 0.74rem; white-space: nowrap; }
.emb-card__line { margin: 0; font-size: 0.78rem; }
.emb-card__remove { position: absolute; top: 4px; right: 8px; font-size: 1.2rem; font-weight: 700; line-height: 1; color: #dc2626; }

/* The line that takes the last removal back (OQ-CUS-21; the colours of the cart's undo bar, CART-018). */
.undo { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0.55rem 0.85rem; border-radius: 10px; background: #1f2937; color: #fff; font-size: 0.85rem; }
.undo__btn { flex: none; padding: 0.25rem 0.7rem; border-radius: 6px; background: #f59e0b; color: #1f2937; font-weight: 700; }

/* The floating mini preview (CUS-036) exists only on a phone, while the photo is out of sight; the customised slide of the viewer (CUS-037) is
   the same stage, as large as min(70 % of the height, 85 % of the width) of the window. */
.mini, .toy-bar { display: none; } /* AF90: the bar of the name and the price, on a phone only */
.mini__up { padding: 2px 10px; border-radius: var(--radius-full); background: rgba(0, 0, 0, 0.65); color: #fff; font-size: 0.68rem; font-weight: 700; } /* AF89: a button of its own */
.lightbox .preview--zoom { flex: none; width: min(70vh, 85vw); margin: 0; background: #fff; }

/* The reviews (PM-012, REV-009, REV-011): the summary in sewing buttons, a list of at most 200 px that scrolls. */
.reviews { padding: 1rem; border: 1.5px solid #e2e8f0; border-radius: 12px; background: #fff; }
.reviews__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; }
.reviews__title { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 1rem; color: var(--theme-text, #451a03); }
.reviews__summary { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; }
.reviews__average { color: #d97706; }
.reviews__count, .reviews__none { font-size: 0.8rem; color: #94a3b8; }
.reviews__note { margin: 0.6rem 0 0; padding: 1rem 0; text-align: center; font-size: 0.85rem; color: #94a3b8; }
.reviews__note--error { color: #ef4444; }
.reviews__list { display: grid; gap: 8px; max-height: 200px; margin: 0.6rem 0 0; padding: 0; overflow-y: auto; list-style: none; }
.review { padding: 0.6rem 0.8rem; border: 1px solid #e2e8f0; border-radius: 8px; background: #f8fafc; font-size: 0.84rem; }
.review__head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.review__date { margin-left: auto; font-size: 0.75rem; color: #94a3b8; }
.review__comment { margin: 0.35rem 0 0; color: #475569; white-space: pre-line; }
/* The review of an invited buyer (REV-007): the button under the list, and the amber form with the picker of sewing buttons. */
.reviews__open { margin-top: 0.8rem; }
.review-form { display: grid; gap: 0.6rem; margin-top: 0.8rem; padding: 0.9rem; border: 1px solid #fde68a; border-radius: 10px; background: #fffbeb; }
.review-form__banner { margin: 0; padding: 0.45rem 0.7rem; border: 1px solid #a7f3d0; border-radius: 8px; background: #ecfdf5; color: #065f46; font-size: 0.82rem; font-weight: 600; }
.review-form__label { font-size: 0.85rem; font-weight: 700; }
.review-form__error { margin: 0; color: #dc2626; font-size: 0.85rem; font-weight: 600; }
.review-form__buttons { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.5rem; }
.picker { display: flex; gap: 6px; }
.picker__btn { padding: 2px; border: 0; background: none; line-height: 0; cursor: pointer; }
.picker__btn:focus-visible { outline: 2px solid var(--theme-text, #451a03); outline-offset: 2px; border-radius: 6px; }
.picker__btn .rbtn { filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.18)); }
.picker__btn[data-on="false"] .rbtn, .picker:hover .picker__btn .rbtn { opacity: 0.22; filter: grayscale(100%); }
.picker:hover .picker__btn:hover .rbtn, .picker:hover .picker__btn:has(~ .picker__btn:hover) .rbtn { opacity: 1; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.24)); }
.picker__btn:hover .rbtn { transform: scale(1.22) rotate(6deg); }

/* The photo viewer (PM-006): a dark window above the toy window. Its panel lets clicks through, so the dark background itself closes it. */
.overlay--lightbox { padding: 0; background: rgba(0, 0, 0, 0.94); backdrop-filter: blur(10px); }
.overlay__panel.lightbox { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.75rem; width: 100%; max-width: none; height: 100%; max-height: none; padding: 1rem; overflow: hidden; background: transparent; box-shadow: none; pointer-events: none; }
.lightbox__bar, .lightbox__stage, .lightbox__strip { pointer-events: auto; }
.lightbox__bar { display: flex; align-items: center; justify-content: space-between; width: min(1100px, 100%); min-height: 44px; font-weight: 700; color: #fff; }
.lightbox__close { width: 44px; height: 44px; margin-left: auto; border-radius: 50%; background: rgba(255, 255, 255, 0.2); color: #fff; font-size: 1.7rem; line-height: 1; }
.lightbox__stage { position: relative; display: flex; width: min(1100px, 100%); height: 72vh; }
.lightbox .zoom__target { max-height: 100%; }
.lightbox__nav { position: absolute; top: 50%; z-index: 15; width: 52px; height: 52px; border-radius: 50%; background: rgba(255, 255, 255, 0.2); color: #fff; font-size: 1.4rem; transform: translateY(-50%); }
.lightbox__nav:hover { background: rgba(255, 255, 255, 0.4); }
.lightbox__nav--previous { left: 8px; }
.lightbox__nav--next { right: 8px; }
.lightbox__strip { display: flex; gap: 8px; max-width: 90vw; padding: 8px; overflow-x: auto; border-radius: 12px; background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(6px); }
.lightbox__thumb { flex: none; width: 54px; height: 54px; overflow: hidden; border: 3px solid transparent; border-radius: 8px; opacity: 0.45; transition: var(--transition); }
.lightbox__thumb img { width: 100%; height: 100%; object-fit: cover; }
.lightbox__thumb--active { border-color: var(--btn-leading, var(--clr-primary)); opacity: 1; transform: scale(1.08); }

/* The cart (CART-010 to CART-019, CHK-001): the quantity control, the drawer, the review page, and the two dialogs. The thumbnail of a set is the preview stage in a
   small box (stage.css scales it); money is the green pill that the rows of the customiser use too. */
.stepper { display: inline-flex; align-items: center; border: 1.5px solid #cbd5e1; border-radius: 9px; background: #f3f4f6; }
.stepper__btn { width: 26px; height: 26px; border-radius: 8px; background: #fff; font-weight: 800; line-height: 1; }
.stepper__btn:hover:not(.stepper__btn--off) { color: var(--btn-leading, var(--clr-primary)); }
.stepper__btn--off { opacity: 0.3; cursor: not-allowed; }
.stepper__qty { min-width: 1.7rem; text-align: center; font-size: 0.9rem; }
.money { margin-left: 6px; padding: 1px 8px; border-radius: var(--radius-full); background: #ecfdf5; color: #047857; font-size: 0.74rem; font-weight: 700; white-space: nowrap; }
.line-label { margin: 0.2rem 0 0; font-size: 0.8rem; font-weight: 700; }
.line-label--ready { color: #047857; }
.line-label--custom { color: #c2410c; }
.line-note { margin: 0.3rem 0 0; padding: 0.35rem 0.6rem; border: 1px solid #fdba74; border-radius: 8px; background: #fff7ed; color: #9a3412; font-size: 0.78rem; }
.line-note--blocked { border-color: #fca5a5; background: #fef2f2; color: #b91c1c; }

.overlay__panel.cart-drawer { display: flex; flex-direction: column; padding: 0; overflow: hidden; animation: drawerIn 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes drawerIn { from { transform: translateX(100%); } to { transform: none; } }
.cart-drawer__head, .cart-drawer__foot { padding: 1.25rem 1.5rem; }
.cart-drawer__head { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--clr-border); }
.cart-drawer__head .overlay__close { position: static; }
.cart-drawer__title { margin: 0; font-size: 1.25rem; }
.cart-drawer__list { display: grid; flex: 1; align-content: start; gap: 1.2rem; margin: 0; padding: 1.5rem; overflow-y: auto; list-style: none; }
.cart-drawer__foot { display: grid; gap: 0.8rem; border-top: 1px solid var(--clr-border); background: var(--clr-bg); }
.cart-drawer__total { display: flex; justify-content: space-between; margin: 0; font-size: 1.15rem; font-weight: 700; }
.cart-note { flex: 1; padding: 2rem 1.5rem; text-align: center; color: #6b7280; }
.cart-note--empty { padding-top: 3rem; font-size: 1.05rem; }
.cart-row { display: flex; gap: 1rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--clr-border); }
.cart-row--blocked .cart-row__body > :not(.line-note) { opacity: 0.55; }
.cart-row__thumb { flex: none; width: 64px; height: 64px; overflow: hidden; border-radius: var(--radius-sm); background: #f3f4f6; }
.cart-thumb { width: 100%; height: 100%; object-fit: cover; }
.cart-row__body { flex: 1; min-width: 0; font-size: 0.82rem; }
.cart-row__title { margin: 0; font-size: 0.95rem; font-weight: 600; overflow-wrap: anywhere; }
.cart-row__colour { margin: 0.1rem 0 0; font-size: 0.8rem; font-weight: 600; color: var(--clr-primary); }
.cart-row__extra { margin: 0.15rem 0 0; font-size: 0.8rem; color: #4b5563; overflow-wrap: anywhere; }
.cart-row__extra--embroidery { color: #7e22ce; }
.cart-row__extra small { display: block; font-size: 0.75rem; color: #6b21a8; }
.cart-row__price { margin: 0.4rem 0 0; font-size: 0.85rem; }
.cart-row__actions { display: flex; align-items: center; justify-content: space-between; margin-top: 0.4rem; }
.cart-row__remove { padding: 0 6px; font-size: 1.5rem; line-height: 1; color: #ef4444; }

.overlay--page { align-items: flex-start; overflow-y: auto; background: #f8fafc; backdrop-filter: none; }
.overlay__panel.order-page { display: flex; flex-direction: column; width: 100%; max-width: 900px; height: auto; min-height: 100%; max-height: none; padding: 0; overflow: visible; border-radius: 0; box-shadow: none; }
.order-page__head { padding: 1.25rem 3.2rem 1rem 1.4rem; border-bottom: 1px solid #e2e8f0; }
.order-page__title { margin: 0; font-size: 1.35rem; }
.order-page__sub { margin: 0.2rem 0 0; font-size: 0.85rem; color: #64748b; }
.order-page__list { display: grid; flex: 1; align-content: start; gap: 1.2rem; padding: 1.25rem 1.4rem; background: #fafaf9; }
.order-page__foot { position: sticky; bottom: 0; z-index: 2; display: grid; gap: 0.8rem; padding: 1rem 1.4rem; border-top: 1px solid #e2e8f0; background: #fff; }
.order-page__total { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; margin: 0; font-weight: 700; }
.order-page__total b { font-family: var(--font-heading); font-size: 1.6rem; font-weight: 800; }
.order-page__wait { margin: 0; padding: 0.5rem 0.75rem; border: 1px solid #fca5a5; border-radius: 8px; background: #fef2f2; color: #b91c1c; font-size: 0.85rem; font-weight: 600; }
.order-page__buttons { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.order-page__buttons .btn { flex: 1 1 11rem; }
.order-page__buttons .btn--primary { flex: 2 1 14rem; }
.dispatch { padding: 0.7rem 0.9rem; border: 1.5px solid; border-radius: 12px; font-size: 0.85rem; }
.dispatch p { margin: 0 0 0.3rem; }
.dispatch p:last-child { margin: 0; }
.dispatch__term { margin-left: 6px; padding: 1px 10px; border-radius: var(--radius-full); background: rgba(255, 255, 255, 0.8); font-weight: 700; }
.dispatch--mixed { border-color: #fcd34d; background: #fffbeb; }
.dispatch--ready { border-color: #6ee7b7; background: #ecfdf5; }
.dispatch--custom { border-color: #fdba74; background: #fff7ed; }

.rcard { padding: 1rem; border: 1.5px solid #e5e7eb; border-radius: 16px; background: #fff; box-shadow: var(--shadow-sm); }
.rcard--blocked { border-color: #fca5a5; }
.rcard__strip { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 0.8rem; }
.piece { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; padding: 6px; border: 1px solid #ddd6fe; border-radius: 12px; background: #faf5ff; font-size: 0.72rem; text-align: center; }
.piece--toy { width: 95px; padding: 0; overflow: hidden; border-color: #e5e7eb; background: #f3f4f6; }
.piece__pic { width: 95px; height: 95px; }
.piece__caption { width: 100%; padding: 2px 4px; background: #374151; color: #fff; font-size: 0.7rem; }
.piece--addon { width: 92px; min-height: 98px; justify-content: center; }
.piece__image { max-width: 100%; height: 48px; object-fit: contain; }
.piece__icon { font-size: 1.8rem; }
.piece__name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.piece--content { flex: 1 1 220px; align-items: flex-start; gap: 4px; border-color: #e5e7eb; background: #fff; font-size: 0.82rem; text-align: left; } /* AF124 */
.piece__line--tailored { margin: -2px 0 2px 0.9rem; color: #701a75; } /* AF126: under its place */
.piece--embroidery { align-items: flex-start; min-width: 155px; border-color: #f0abfc; background: #fdf4ff; color: #701a75; text-align: left; }
.rcard__row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; }
.rcard__row--edit { margin-top: 0.6rem; padding-top: 0.6rem; border-top: 1px dashed #e5e7eb; }
.rcard__title { flex: 1 1 8rem; margin: 0; font-size: 1.05rem; overflow-wrap: anywhere; }
.rcard__price { display: grid; margin: 0; text-align: right; }
.rcard__price small { font-size: 0.7rem; color: #64748b; }
.rcard__price b { color: #047857; }
.rcard__bin { width: 32px; height: 32px; border: 1px solid #fca5a5; border-radius: 8px; background: #fee2e2; }
.rcard__bin:hover { background: #ef4444; }
.rcard__toggle { padding: 0.4rem 0.8rem; border: 1.5px solid #cbd5e1; border-radius: 10px; background: #f8fafc; color: #334155; font-size: 0.84rem; font-weight: 600; }
.rcard__toggle[aria-expanded="true"] { border-color: #c084fc; background: #f3e8ff; color: #7e22ce; }
.rpanel { display: grid; gap: 0.7rem; margin-top: 0.7rem; padding: 0.85rem; border: 1.5px solid #e2e8f0; border-radius: 10px; background: #f8fafc; }
.rpanel__row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.8rem; font-size: 0.88rem; font-weight: 600; }
.rpanel__row .field { flex: 1 1 10rem; width: auto; padding: 0.4rem 0.6rem; color: #0284c7; }
.rpanel__head { margin: 0; font-size: 0.9rem; }
.addon-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.7rem; padding: 0.5rem 0.7rem; border: 1px solid #ddd6fe; border-radius: 10px; background: #f5f3ff; font-size: 0.85rem; }
.addon-row__name { flex: 1 1 6rem; font-weight: 700; }
.addon-row .field { flex: 0 1 11rem; width: auto; padding: 0.3rem 0.5rem; }
.rsum { margin: 0; padding: 0.55rem 0.8rem; border: 1px solid #a7f3d0; border-radius: 10px; background: #f0fdf4; color: #065f46; }

.confirm__title { margin: 0 0 0.6rem; font-size: 1.3rem; }
.confirm__list { display: grid; gap: 0.5rem; margin: 0 0 0.9rem; padding: 0.8rem 0.9rem; border: 1px solid #e2e8f0; border-radius: 12px; background: #f8fafc; list-style: none; font-size: 0.88rem; }
.confirm__list b { color: var(--c, #0284c7); }
.confirm__ack { display: flex; gap: 0.6rem; padding: 0.7rem 0.8rem; border: 1px solid #fdba74; border-radius: 12px; background: #fff7ed; font-size: 0.88rem; font-weight: 600; }

/* The delivery step (CHK-002 to CHK-013): the page of the review with a form in it. Four numbered section cards, the two-parcel box, and in the footer the
   notes of a refused order, the summary and the one committing button. */
.checkout__form { display: flex; flex: 1; flex-direction: column; }
.checkout__body { display: grid; flex: 1; align-content: start; gap: 1.15rem; padding: 1.4rem; background: #fafaf9; }
.cosec { display: grid; gap: 0.9rem; min-width: 0; padding: 1.3rem 1.4rem; border: 1.5px solid #e2e8f0; border-radius: 16px; background: #fff; transition: border-color 0.2s, box-shadow 0.2s; }
.cosec:focus-within { border-color: #cbd5e1; box-shadow: var(--shadow-sm); }
.cosec__title { display: flex; align-items: center; gap: 0.6rem; margin: 0; font-size: 1.05rem; }
.cosec__n { display: inline-grid; flex: none; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--btn-leading, var(--clr-primary)); color: #fff; font-size: 0.78rem; font-weight: 800; }
.corow { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0.9rem; }
.corow--street { grid-template-columns: 2fr 1fr; }
.cfield { display: grid; align-content: start; gap: 0.35rem; min-width: 0; }
.cfield__label { font-size: 0.85rem; font-weight: 600; }
.cfield__hint { font-size: 0.78rem; color: #64748b; }
.cfield__hint--typed { padding: 0.5rem 0.75rem; border-radius: 8px; background: #fffbeb; color: #92400e; font-size: 0.82rem; }
.cfield__retry { justify-self: start; }
.cfield__error { font-size: 0.8rem; font-weight: 600; color: var(--clr-danger); }
.cfield .field[aria-invalid="true"] { border-color: var(--clr-danger); }
.cfield textarea.field { min-height: 4.2rem; resize: vertical; }
.courier { justify-self: start; margin: 0; padding: 0.3rem 0.9rem; border: 1px solid #bae6fd; border-radius: var(--radius-full); background: #e0f2fe; color: #0284c7; font-size: 0.88rem; font-weight: 700; }
.city { position: relative; }
.city__list {
  position: absolute; z-index: 5; top: 100%; left: 0; right: 0; max-height: 220px; margin: 0; padding: 0; overflow-y: auto; border: 1.5px solid #cbd5e1; border-top: none;
  border-radius: 0 0 8px 8px; background: #fff; box-shadow: var(--shadow-md); list-style: none;
}
.city__item { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.55rem 0.85rem; border-bottom: 1px solid #f1f5f9; color: #1e293b; font-size: 0.88rem; cursor: pointer; }
.city__item small { color: #64748b; }
.city__item:hover, .city__item[aria-selected="true"] { background: #f0fdf4; color: #166534; }
.city__code { flex: none; padding: 1px 6px; border-radius: 4px; background: #f1f5f9; color: #64748b; font-size: 0.76rem; font-weight: 600; }
.fee { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.6rem; margin: 0; padding: 0.7rem 0.9rem; border: 1.5px solid #86efac; border-radius: 10px; background: #f0fdf4; font-size: 0.92rem; }
.fee__badge { padding: 1px 8px; border-radius: var(--radius-full); background: #bbf7d0; color: #14532d; font-size: 0.76rem; font-weight: 700; }
.fee__badge--estimate { background: #fef3c7; color: #92400e; }
.pay { display: grid; gap: 0.2rem; margin: 0; padding: 0.8rem 1rem; border: 1.5px solid #e2e8f0; border-radius: 10px; background: #f8fafc; font-size: 0.92rem; }
.pay small { color: #64748b; }
.split { display: grid; gap: 0.7rem; padding: 1rem 1.1rem; border: 1.5px solid #f59e0b; border-radius: 12px; background: #fffbeb; font-size: 0.88rem; }
.split__choice { display: flex; gap: 0.7rem; cursor: pointer; }
.split__choice input { flex: none; width: 19px; height: 19px; accent-color: #d97706; }
.split__warn { margin: 0; padding: 0.7rem 0.9rem; border: 1px solid #fecaca; border-radius: 10px; background: #fef2f2; color: #991b1b; }
.order-page__foot--flow { position: static; }
.cosum { display: grid; gap: 0.25rem; padding: 0.8rem 1.1rem; border: 1px solid #e2e8f0; border-radius: 12px; background: #f8fafc; }
.cosum__line { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.1rem 1rem; margin: 0; font-size: 0.92rem; color: #4b5563; }
.cosum__line b { color: #111827; }
.cosum__line--total { margin-top: 0.25rem; padding-top: 0.45rem; border-top: 1px solid #e2e8f0; font-size: 1.18rem; font-weight: 800; color: #111827; }
.cosum__parcel { padding: 0.6rem 0.8rem; border: 1px solid #86efac; border-radius: 10px; background: #f0fdf4; }
.cosum__parcel--custom { border-color: #fdba74; background: #fff7ed; }
.cosum__part { margin: 0.15rem 0 0; font-size: 0.82rem; color: #4b5563; }
.conote { margin: 0; padding: 0.7rem 0.9rem; border: 1.5px solid #fcd34d; border-radius: 10px; background: #fffbeb; color: #92400e; font-size: 0.9rem; font-weight: 600; }
.conote--failed { border-color: #fca5a5; background: #fef2f2; color: #991b1b; }
.conote p { margin: 0 0 0.3rem; }
.conote a, .cfield__error a { text-decoration: underline; }

/* The button that commits follows the leading button colour, green until the owner chooses one (Part 3: OQ-APP-04); the locked way on of the confirmation is plainly locked. */
.btn--commit {
  --go: var(--btn-leading, #059669);
  padding: 0.95rem 1.5rem; border-color: rgba(255, 255, 255, 0.28); border-radius: 14px; background: linear-gradient(180deg, color-mix(in srgb, var(--go, #059669) 78%, #fff), var(--go, #059669)) var(--go, #059669); color: var(--btn-text, #fff); font-size: 1.05rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18); box-shadow: 0 4px 10px color-mix(in srgb, var(--go, #059669) 25%, transparent), 0 8px 22px color-mix(in srgb, var(--go, #059669) 32%, transparent);
}
.btn--commit:hover:not(:disabled) { background: linear-gradient(180deg, color-mix(in srgb, var(--go, #059669) 62%, #fff), var(--go, #059669)) var(--go, #059669); filter: brightness(1.04); transform: translateY(-2px); box-shadow: 0 6px 14px color-mix(in srgb, var(--go, #059669) 30%, transparent), 0 12px 28px color-mix(in srgb, var(--go, #059669) 36%, transparent); }
.btn--commit:active:not(:disabled) { filter: brightness(0.97); transform: translateY(1px); }
.btn--commit:disabled, .confirm .btn--primary:disabled { opacity: 0.45; filter: grayscale(0.35); box-shadow: none; }

/* The confirmation of a stored order (CHK-016, decision 26): its number, what was ordered and the amount due. */
.overlay__panel.thanks { display: grid; gap: 0.9rem; max-width: 540px; }
.thanks__title { margin: 0; font-size: 1.4rem; color: #047857; }
.thanks__text, .thanks__pay, .thanks__keep { margin: 0; }
.thanks__pay { font-size: 0.85rem; color: #64748b; }
.thanks__keep { padding: 0.55rem 0.75rem; border-radius: 8px; background: #f0fdf4; color: #166534; font-size: 0.85rem; font-weight: 600; }
.thanks__items { display: grid; gap: 0.3rem; margin: 0; padding: 0; list-style: none; font-size: 0.92rem; }
.thanks__items li { display: flex; justify-content: space-between; gap: 1rem; }

/* A phone: the card scrolls as a whole and is one column, in the order picture, thumbnails, colours, notice, price, then the specifications and
   the reviews. The left column is a plain wrapper that takes no part in the layout, so its children can be put in that order. */
@media (max-width: 767.98px) {
  .overlay__panel.toy-window { width: 96%; height: auto; max-height: 94vh; padding: 0.9rem 0.65rem; overflow-y: auto; }
  .toy-window__inner { display: block; flex: none; } /* AF90: as tall as what it holds, so the bar sticks to the end */
  .toy-window__columns { display: flex; flex-direction: column; gap: 0.8rem; }
  .toy-window__left { display: contents; }
  .toy-window__left > .toy-window__stage { position: relative; }
  .toy-window__left > * { order: 0; max-width: min(340px, 88vw); }
  .toy-window__right { order: 1; padding-right: 0; overflow: visible; }
  .toy-window__left > .specs, .toy-window__left > .reviews { order: 2; max-width: none; }
  .set-bar { position: static; order: 0; display: grid; justify-items: center; gap: 8px; width: 100%; max-width: min(340px, 88vw); height: auto; margin-inline: auto; pointer-events: auto; }
  .set-bar__btn--mine { position: relative; } /* AF38: in the flow, and the frame of its pulse */
  .set-bar__panel { position: static; width: 100%; max-height: 280px; }
  .toy-window__right { gap: 0.8rem; }
  .lightbox__stage { height: 66vh; }
  .order-page__list, .order-page__foot { padding-inline: 0.9rem; }
  .checkout__body { padding: 0.9rem; }
  .cosec { padding: 1rem 0.9rem; }
  .order-page__foot { position: static; }
  .rcard { padding: 0.8rem; }
  .mini[data-shown] {
    position: fixed; right: 16px; bottom: 20px; z-index: var(--z-float); display: flex; flex-direction: column; align-items: center; gap: 4px; width: var(--float-size, 96px);
    cursor: grab; touch-action: none; animation: overlayIn 0.25s ease;
  }
  /* AF90: a bar of no height that sticks to the top of the window; what it holds shows once the header has left the screen. */
  .toy-bar { position: sticky; top: 0; z-index: var(--z-float); display: block; height: 0; }
  .toy-bar__inner {
    position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 10px; padding: 0.3rem 0.35rem 0.3rem 0.8rem; border: 1.5px solid var(--theme-border, #fde047);
    border-radius: 12px; background: rgba(255, 255, 255, 0.97); box-shadow: var(--shadow-lg); visibility: hidden; opacity: 0; transform: translateY(-6px); transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  }
  .toy-bar[data-shown] .toy-bar__inner { visibility: visible; opacity: 1; transform: none; }
  .toy-bar__title { flex: 1; min-width: 0; overflow: hidden; color: #1e293b; font-size: 0.95rem; text-overflow: ellipsis; white-space: nowrap; }
  .toy-bar__price { flex: none; color: #047857; font-size: 1rem; }
  .toy-bar .toy-bar__close { position: static; flex: none; width: 30px; height: 30px; font-size: 1.15rem; }
  .mini__pic { width: 100%; aspect-ratio: 1; overflow: hidden; border: 2.5px solid var(--theme-border, #fde047); border-radius: 18px; background: #fff; box-shadow: var(--shadow-lg); }
  /* AF89: "Моят избор" under the picture; its panel spans the window above the box in the lower half of it, else below (web/lib/drag.js places it). */
  .set-bar--mini { display: flex; flex-direction: column; align-items: center; width: auto; max-width: none; margin: 0; }
  .set-bar--mini .set-bar__btn--mine { padding: 0.25rem 0.6rem; font-size: 0.72rem; white-space: nowrap; box-shadow: var(--shadow-lg); }
  .set-bar--mini .set-bar__panel { position: fixed; top: var(--float-below, auto); left: 12px; right: 12px; width: auto; max-height: 45vh; cursor: auto; touch-action: pan-y; }
  .mini[data-low] .set-bar--mini .set-bar__panel { top: auto; bottom: var(--float-above, auto); }
}
@media (max-width: 600px) {
  .overlay__panel.toy-window { width: 98%; max-height: 95vh; padding: 0.85rem 0.55rem; border-radius: 16px; }
  .toy-window__header { display: flex; flex-direction: column; gap: 6px; text-align: center; }
  .toy-window__end { justify-self: auto; }
  .toy-window__close { position: absolute; top: 6px; right: 6px; }
  .accordion__head { padding: 0.6rem 0.65rem; }
  .accordion__body { padding: 0.65rem 0.45rem; }
  .lightbox__nav { width: 44px; height: 44px; }
  .overlay--page, .overlay--drawer { padding: 0; }
  .cart-row { gap: 0.7rem; }
  .addon-row .field { flex: 1 1 100%; }
}
@media (min-width: 992px) {
  .overlay__panel.order-page { min-height: 0; margin: 2rem auto 3rem; border: 1.5px solid #e2e8f0; border-radius: 20px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05); }
  .order-page__foot { border-radius: 0 0 20px 20px; }
}
