/* Catalogue pages (06/11/2026): products, add many, bulk actions, product edit, groups. */
.icon.tiny { width: 14px; height: 14px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.thumb { width: 56px; height: 56px; flex: none; object-fit: contain; border-radius: 10px; background: #f6f7f8; border: 1px solid var(--line); }
.empty-thumb { display: inline-grid; place-items: center; color: #9aa3a9; }
.empty-thumb.big { width: 100%; aspect-ratio: 1; gap: 6px; border: 1px dashed #cfd5d9; border-radius: 12px; background: #fafbfc; font-size: 13px; }
.product-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.product-cell strong { overflow-wrap: anywhere; }
.check-cell { width: 52px; }
.hit { display: inline-grid; place-items: center; width: 44px; height: 44px; margin: -10px -8px; cursor: pointer; }
.hit input, .check-line input { width: 20px; height: 20px; accent-color: var(--red); cursor: pointer; }
.check-line { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; cursor: pointer; }
tr.selected td { background: #fbf3f5; }
tr.muted-row td { color: #8b959c; }
tr.error-row td { background: #fff7f6; }
.row-error { color: var(--danger); font-weight: 600; font-size: 13px; }
.row-warn { color: var(--amber); font-weight: 600; font-size: 13px; }
.row-warn.block { display: block; margin-top: 6px; max-width: 260px; }
.row-error.block { display: block; margin-top: 6px; max-width: 220px; }
.list-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 6px 0 12px; }
.list-tools > :first-child { margin-right: auto; }
.list-tools.end { justify-content: flex-end; margin-top: 16px; }
.list-tools.end > :first-child { margin-right: 0; }
.sort-buttons, .row-actions { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.order-no { min-width: 22px; text-align: center; }
.bulk-bar { position: sticky; bottom: 12px; z-index: 15; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; padding: 12px 16px; border-radius: 14px; background: #24313b; color: #fff; box-shadow: 0 10px 30px rgb(0 0 0 / .25); }
.bulk-bar[hidden] { display: none; }
.bulk-bar .button.ghost { color: #fff; }
.bulk-bar .button.ghost:hover { background: rgb(255 255 255 / .12); }
.bulk-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.bulk-actions select.input { width: auto; min-height: 44px; padding: 6px 10px; font-size: 13px; color: var(--ink); }
.skip-list { margin: 0; padding-left: 18px; max-height: 260px; overflow: auto; }
.skip-list li { margin: 4px 0; }
.skip-list li span { display: block; color: var(--muted); font-size: 13px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.tab { min-height: 44px; padding: 10px 14px; border: 0; border-bottom: 3px solid transparent; background: none; font-weight: 700; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tab[aria-selected="true"] { color: var(--red); border-bottom-color: var(--red); }
.form-stack.wide { max-width: 640px; }
textarea.codes { min-height: 160px; font-family: Consolas, 'Cascadia Mono', monospace; }
.pick-table { max-height: 520px; overflow: auto; }
.pick-table thead th { position: sticky; top: 0; z-index: 1; }
.review-table td { min-width: 120px; }
.review-table td.check-cell, .review-table td.cell-actions { min-width: 0; }
.review-table .input { min-width: 140px; }
.photo-button { display: grid; place-items: center; gap: 2px; width: 72px; height: 72px; padding: 0; border: 1px dashed #cfd5d9; border-radius: 12px; background: #fafbfc; color: var(--muted); font-size: 13px; cursor: pointer; overflow: hidden; }
.photo-button img { width: 100%; height: 100%; object-fit: contain; }
.photo-button:disabled { cursor: not-allowed; opacity: .6; }
.price-lock { white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; padding: 2px 8px; border-radius: 999px; background: var(--grey-soft); font-size: 13px; font-weight: 700; }
.apply-all { padding: 12px; border-radius: 12px; background: #fafbfc; border: 1px solid var(--line); }
.edit-grid { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 18px; align-items: start; }
.image-box { display: flex; flex-direction: column; gap: 10px; }
.image-box > img { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 12px; border: 1px solid var(--line); background: #f6f7f8; }
.image-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.two-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
/* Phone width: date-and-time boxes need the full width, so paired fields stack. */
@media (max-width: 560px) { .two-fields { grid-template-columns: minmax(0, 1fr); } }
.inline-form { display: flex; gap: 8px; margin: 12px 0; }
.inline-form .input { flex: 1; }
.link-result { display: flex; flex-direction: column; gap: 12px; }
.spaced { margin: 10px 0 12px; }
.sticky-save { position: sticky; bottom: 0; z-index: 10; padding: 12px 0; background: linear-gradient(transparent, var(--page) 30%); }
.editor { border: 1px solid #d5dade; border-radius: 12px; background: #fff; }
.editor:focus-within { border-color: var(--red); outline: 3px solid rgb(143 49 64 / .14); }
.toolbar { position: sticky; top: 60px; z-index: 5; display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); border-radius: 12px 12px 0 0; background: #fafbfc; }
.tool { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 8px; background: none; cursor: pointer; color: var(--ink); }
.tool:hover { background: #eceef1; }
.tool:disabled { opacity: .4; cursor: not-allowed; }
.tool.small-heading .icon { width: 15px; height: 15px; }
.rich-editor { min-height: 320px; max-height: 70vh; overflow: auto; padding: 16px; outline: none; }
.phone { width: 100%; max-width: 390px; margin: 0 auto; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; background: #fff; }
.phone-head { padding: 10px 14px; background: var(--red); color: #fff; font-weight: 700; font-size: 13px; }
.phone-photo { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #f6f2ee; }
.phone-body { padding: 14px 16px 20px; }
.phone-body h3 { font-size: 18px; }
.phone-brand { color: var(--muted); font-size: 13px; }
.phone-price { margin: 6px 0 12px; color: var(--red); font-size: 18px; font-weight: 800; }

/* Product description: the same rules as the Mini App (src/styles.css .rich). */
.rich { font-size: 15px; line-height: 1.6; color: #2b3238; overflow-wrap: anywhere; }
.rich > :first-child { margin-top: 0; }
.rich p, .rich ul, .rich ol, .rich figure, .rich table, .rich blockquote, .rich pre, .rich div { margin: 0 0 12px; }
.rich h2 { margin: 18px 0 10px; font-size: 20px; line-height: 1.35; }
.rich h3 { margin: 16px 0 8px; font-size: 18px; line-height: 1.35; }
.rich h4, .rich h5, .rich h6 { margin: 14px 0 8px; font-size: 16px; line-height: 1.4; }
.rich ul, .rich ol { padding-left: 22px; }
.rich li { margin: 4px 0; }
.rich a { color: var(--red); text-decoration: underline; }
.rich img { max-width: 100%; height: auto; border-radius: 8px; }
.rich figure { max-width: 100%; margin-left: 0; margin-right: 0; }
.rich figcaption { margin-top: 6px; color: #66727b; font-size: 13px; text-align: center; }
.rich table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.rich td, .rich th { padding: 8px 10px; border: 1px solid #d9dee2; vertical-align: top; }
.rich hr { margin: 16px 0; border: 0; border-top: 1px solid #e1e5e8; }
.rich blockquote { padding-left: 12px; border-left: 3px solid #d9dee2; color: #4d5961; }

@media (max-width: 700px) {
  .edit-grid { grid-template-columns: 1fr; }
  .image-box > img, .empty-thumb.big { max-width: 220px; }
  .bulk-bar { bottom: 8px; }
  .bulk-actions { margin-left: 0; }
  .catalog-table td.check-cell, .pick-table td.check-cell, .review-table td.check-cell { display: flex; align-items: center; }
  .review-table td { min-width: 0; }
  .toolbar { top: 56px; }
  .inline-form { flex-direction: column; }
}

/* Photos (09/11/2026): quick change on the thumbnail, drag & drop, bulk replace page. */
.icon.big { width: 34px; height: 34px; }
.thumb-button { position: relative; flex: none; padding: 0; border: 0; border-radius: 10px; background: none; cursor: pointer; }
.thumb-button .thumb { display: block; }
.thumb-badge { position: absolute; right: -6px; bottom: -6px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--red); color: #fff; box-shadow: 0 0 0 2px #fff; }
.thumb-button:hover .thumb, .thumb-button:focus-visible .thumb { outline: 2px solid var(--red); outline-offset: 2px; }
.drop-over { outline: 3px dashed var(--red) !important; outline-offset: 3px; background: var(--soft) !important; }
.drop-zone { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 32px 20px; border: 2px dashed #cfd5d9; border-radius: 14px; background: #fafbfc; text-align: center; color: var(--muted); }
.drop-zone strong { color: var(--ink); font-size: 16px; }
.drop-zone p { max-width: 620px; }
.drop-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 4px; }
.row-state { margin-top: 6px; }
.photo-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.photo-table .input { min-width: 200px; }
.file-name { display: block; min-width: 140px; max-width: 240px; overflow-wrap: break-word; word-break: break-word; font-weight: 600; }
tr.done-row td { background: #f3faf5; }
.missing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.missing-item { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.missing-text { flex: 1; min-width: 0; }
.missing-text strong { display: block; overflow-wrap: anywhere; }
.image-box:focus-visible { outline: 3px solid rgb(143 49 64 / .35); outline-offset: 3px; border-radius: 12px; }
@media (max-width: 700px) {
  .photo-table .input { min-width: 0; }
  .drop-zone { padding: 22px 14px; }
}

/* Flyers (09/11/2026) */
.icon-button.flip .icon { transform: rotate(180deg); }
.flyer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.flyer-card { position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.flyer-card > img { width: 100%; aspect-ratio: 3 / 4; object-fit: contain; background: #f4f1ee; }
.flyer-card-body { display: flex; flex-direction: column; gap: 6px; padding: 12px; }
.flyer-card-body .badge { align-self: flex-start; }
.flyer-card-actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 12px; margin-top: auto; }
.flyer-upload { display: grid; place-items: center; min-height: 200px; border: 2px dashed #cfd5d9; border-radius: 14px; background: #fafbfc; cursor: pointer; overflow: hidden; }
.flyer-upload img { max-width: 100%; max-height: 320px; object-fit: contain; }
.flyer-upload .empty-thumb.big { aspect-ratio: auto; min-height: 160px; border: 0; }
.flyer-phone { background: #2b2f33; }
.flyer-mock { position: relative; margin: 18px 14px 10px; border-radius: 14px; overflow: hidden; background: #fff; }
.flyer-mock img { display: block; width: 100%; max-height: 520px; object-fit: contain; background: #fff; }
.flyer-mock-close { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgb(0 0 0 / .55); color: #fff; font-size: 20px; line-height: 1; }
.flyer-mock-bar { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 8px; background: #fff; font-weight: 700; }
.flyer-mock-launch { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0 14px 18px; padding: 10px; border-radius: 999px; background: #fff; color: var(--red); font-weight: 700; font-size: 13px; }
.flyer-empty { padding: 40px 16px; text-align: center; color: #c9ced2; }

/* ---- promotions (10/11/2026) ---- */
.promo-list { display: grid; gap: 12px; }
.promo-card { display: grid; gap: 8px; }
.promo-card-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.promo-card-head h2 { margin: 0 0 4px; font-size: 17px; }
.promo-badges { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.promo-benefit { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 8px; background: var(--red); color: #fff; font-weight: 800; font-size: 14px; white-space: nowrap; }
.promo-products { margin: 0; font-size: 14px; line-height: 1.5; }
.promo-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.promo-pick { display: grid; gap: 6px; max-height: 520px; overflow-y: auto; padding: 2px; }
.promo-pick-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: #fff; }
.promo-pick-row.on { border-color: var(--red); background: var(--soft); }
.promo-pick-row .hit { margin: 0; }
.promo-pick-name { display: grid; gap: 4px; min-width: 0; }
.promo-pick-name strong { font-size: 14px; }
.promo-pick-name .sub { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.promo-price del, .promo-examples del { color: var(--muted); }
.promo-price strong, .promo-examples strong { color: var(--red); }
.input-with-suffix { position: relative; max-width: 280px; }
.input-with-suffix .input { padding-right: 44px; font-size: 18px; font-weight: 700; }
.input-suffix { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 700; }
.promo-sticky { position: sticky; top: 76px; }
.promo-preview h2 { margin-top: 0; }
.promo-tag-demo { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.promo-examples { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 6px; }
.promo-examples li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
@media (max-width: 900px) { .promo-sticky { position: static; } }
.icon.flip-v { transform: scaleY(-1); }
.promo-line { color: var(--red); font-weight: 600; }
.promo-saving-text { color: var(--red); font-weight: 700; }

/* ---- store banners (10/11/2026) ---- */
.banner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.banner-card { position: relative; display: grid; grid-template-rows: auto 1fr auto; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.banner-card > img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; background: #f6f7f8; }
.banner-upload { aspect-ratio: 2 / 1; min-height: 0; }
.banner-upload img { width: 100%; height: 100%; object-fit: cover; }
.banner-order { list-style: none; counter-reset: banner; display: grid; gap: 10px; margin: 0 0 12px; padding: 0; }
.banner-order li { counter-increment: banner; display: grid; grid-template-columns: 28px 120px 1fr; align-items: center; gap: 10px; }
.banner-order li::before { content: counter(banner); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--red); color: #fff; font-weight: 700; font-size: 13px; }
.banner-order img, .banner-official-thumb { width: 120px; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.banner-official-thumb { display: grid; place-items: center; background: var(--soft); color: var(--red); }
.banner-order li span:last-child { display: grid; gap: 2px; }
.banner-order li.official::before { background: var(--grey); }

/* ---- posters and banners: quick replace, selection, drop to add (10/11/2026) ---- */
.poster-picture { position: relative; display: block; width: 100%; padding: 0; border: 0; background: #f4f1ee; cursor: pointer; }
.poster-picture:disabled { cursor: default; }
.poster-picture img { display: block; width: 100%; object-fit: contain; }
.flyer-card .poster-picture img { aspect-ratio: 3 / 4; }
.banner-card .poster-picture img { aspect-ratio: 2 / 1; object-fit: cover; }
.poster-replace { position: absolute; right: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: rgb(36 49 59 / .78); color: #fff; font-size: 13px; font-weight: 700; opacity: 0; transition: opacity .15s; }
.poster-picture:hover .poster-replace, .poster-picture:focus-visible .poster-replace, .poster-picture.drop-over .poster-replace { opacity: 1; }
@media (hover: none) { .poster-replace { opacity: 1; } }
.poster-check { position: absolute; left: 8px; top: 8px; z-index: 2; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: rgb(255 255 255 / .92); box-shadow: 0 1px 4px rgb(0 0 0 / .18); cursor: pointer; }
.poster-check input { width: 20px; height: 20px; accent-color: var(--red); cursor: pointer; }
.flyer-card.selected, .banner-card.selected { border-color: var(--red); box-shadow: 0 0 0 2px var(--red); }
.drop-area { min-height: 120px; border-radius: 14px; }
.drop-zone.compact { padding: 22px 16px; }
.drop-hint { margin-top: 12px; }
.category-thumb { padding: 0; border: 0; background: none; border-radius: 10px; cursor: pointer; }
.category-thumb:hover .thumb, .category-thumb:focus-visible .thumb { outline: 2px solid var(--red); outline-offset: 2px; }
