:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --danger: #dc2626;
  --danger-hover: #b91c1c;
  --success-bg: #ecfdf5;
  --success-text: #065f46;
  --error-bg: #fef2f2;
  --error-text: #991b1b;
  --shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
  --radius: 12px;
  --font: "Segoe UI", "Noto Sans", "Noto Sans Devanagari", "Noto Sans Gujarati", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.page { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand a { font-weight: 700; font-size: 1.05rem; }

.nav { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.nav a {
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9rem;
}
.nav a.active,
.nav a:hover {
  background: #eff6ff;
  color: var(--primary);
}

.main {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 1rem 1rem 1.75rem;
  flex: 1;
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
}

.footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  padding: 0.85rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.card-soft {
  background: var(--surface-soft);
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 0.85rem;
}

.pin-shell {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1rem 1rem 1.5rem;
}

.pin-card {
  width: min(100%, 420px);
  margin: 0;
  text-align: center;
  padding: 1.5rem 1.35rem;
}

.welcome-line {
  margin: 0 0 0.55rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
}

.pin-card h1 {
  font-size: clamp(1.4rem, 4vw, 1.7rem);
  margin-bottom: 0.35rem;
}

.pin-card .muted {
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
}

.pin-form { text-align: left; margin-top: 1rem; }
.pin-form label { font-size: 0.92rem; }
.pin-form input {
  font-size: 1.55rem;
  letter-spacing: 0.32em;
  text-align: center;
  padding: 0.8rem 0.7rem;
  min-height: 54px;
  border-radius: 10px;
}
.pin-form .btn {
  margin-top: 0.75rem;
  min-height: 46px;
  font-size: 0.95rem;
  border-radius: 10px;
}

h1, h2 { margin: 0 0 0.25rem; line-height: 1.25; }
h1 { font-size: 1.35rem; }
h2 { font-size: 1.05rem; }

.muted, .help, .meta { color: var(--muted); margin: 0; }
.help, .meta { font-size: 0.84rem; margin-top: 0.25rem; }
.help.is-ready { color: #166534; font-weight: 600; }

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.filters {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.85rem;
}

.field-actions { justify-content: flex-end; margin-bottom: 0; }

label, .label { font-weight: 600; font-size: 0.9rem; }

input[type="text"],
input[type="search"],
input[type="password"],
input[type="file"],
textarea,
select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  font: inherit;
  background: #fff;
  color: var(--text);
}

textarea { resize: vertical; min-height: 88px; }

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #bfdbfe;
  border-color: var(--primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  border: 0;
  border-radius: 10px;
  padding: 0.55rem 0.9rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

.btn-tiny { padding: 0.3rem 0.5rem; font-size: 0.78rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: #eef2ff; color: #1e3a8a; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--danger-hover); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.product-list {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  min-width: 0;
  width: 100%;
}

.product-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  padding: 0.9rem;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.product-cover {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  border: 1px solid var(--border);
  color: inherit;
  text-decoration: none;
}

.product-title-wrap h2 a {
  color: inherit;
  text-decoration: none;
}

.product-title-wrap h2 a:hover {
  color: var(--primary);
}

.product-cover .media-frame,
.product-cover img,
.product-cover .cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-cover .media-frame {
  position: absolute;
  inset: 0;
}

.media-frame {
  position: relative;
  overflow: hidden;
  background: #eef2f7;
}

.media-frame.is-shimmer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #e8eef5 0%, #f8fafc 45%, #e8eef5 90%);
  background-size: 200% 100%;
  animation: shimmer-move 1.1s ease-in-out infinite;
}

.media-frame.is-loaded::after { display: none; }

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.media-frame.is-loaded img { opacity: 1; }

@keyframes shimmer-move {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 100;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.page-loader.is-active { opacity: 1; }

.page-loader-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #60a5fa, #2563eb);
}

.page-loader.is-active .page-loader-bar {
  animation: page-load-progress 1.2s ease-in-out infinite;
}

@keyframes page-load-progress {
  0% { width: 0; margin-left: 0; }
  50% { width: 55%; margin-left: 15%; }
  100% { width: 0; margin-left: 100%; }
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.page-status {
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 600;
}

.btn.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.cover-count {
  position: absolute;
  right: 0.55rem;
  bottom: 0.55rem;
  background: rgba(17, 24, 39, 0.72);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.img-placeholder {
  width: 100%;
  height: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  color: #94a3b8;
  background:
    repeating-linear-gradient(
      -45deg,
      #f8fafc,
      #f8fafc 8px,
      #f1f5f9 8px,
      #f1f5f9 16px
    );
}

.img-placeholder svg {
  width: 28px;
  height: 28px;
  opacity: 0.85;
}

.img-placeholder span {
  font-size: 0.8rem;
  font-weight: 600;
}

.img-placeholder.ph-sm {
  min-height: 64px;
  border-radius: 8px;
  border: 1px dashed #cbd5e1;
}

.img-placeholder.ph-sm svg { width: 18px; height: 18px; }
.img-placeholder.ph-sm span { font-size: 0.68rem; }

.img-placeholder.ph-md { min-height: 96px; border-radius: 10px; }
.img-placeholder.ph-lg { min-height: 140px; }

.media-fallback {
  min-height: 72px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.8rem;
}

.media-fallback.tiny { min-height: 64px; }

.product-body {
  min-width: 0;
  max-width: 100%;
  display: grid;
  gap: 0.65rem;
  overflow: hidden;
}

.product-head {
  display: flex;
  justify-content: space-between;
  gap: 0.65rem;
  align-items: flex-start;
}

.product-title-wrap { min-width: 0; flex: 1; }

.brief {
  margin: 0.25rem 0 0;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  font-size: 0.92rem;
  color: #4b5563;
  max-height: 9.5rem;
  overflow-y: auto;
  line-height: 1.45;
}

.gallery-block {
  border-top: 1px solid var(--border);
  padding-top: 0.7rem;
  margin-bottom: 0.35rem;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.gallery-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}

.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.inline-form { display: inline; margin: 0; }

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  flex: 0 0 auto;
}

.badge-available { background: #dcfce7; color: #166534; }
.badge-not_available { background: #fee2e2; color: #991b1b; }

.thumb-strip {
  display: flex;
  gap: 0.45rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.25rem;
}

.thumb-item {
  flex: 0 0 110px;
  width: 110px;
  max-width: 110px;
  display: grid;
  gap: 0.3rem;
  min-width: 0;
}

.thumb-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.thumb-item img,
.thumb-item .img-placeholder,
.thumb-item .media-frame {
  width: 100%;
  max-width: 110px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.thumb-item .btn-tiny {
  width: 100%;
  white-space: normal;
  line-height: 1.2;
  padding: 0.35rem 0.4rem;
  font-size: 0.75rem;
}

.thumb-item.is-placeholder .img-placeholder {
  border-style: dashed;
}

.empty-visual {
  width: min(180px, 70%);
  margin: 0 auto 0.85rem;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.form-card { max-width: 680px; }
.form-actions { margin-top: 0.85rem; }

.selected-preview .label { margin: 0 0 0.45rem; }

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.5rem;
  min-height: 96px;
}

.preview-grid.empty {
  display: block;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: #fff;
  padding: 0.9rem;
}

.preview-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
}

.existing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.5rem;
}

.existing-item,
.queue-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.45rem;
  background: #fff;
  display: grid;
  gap: 0.3rem;
}

.existing-item.is-removing {
  border-color: #fca5a5;
  background: #fef2f2;
  opacity: 0.75;
}

.existing-item img,
.existing-item .img-placeholder,
.queue-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
}

.existing-name,
.queue-name {
  font-size: 0.75rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.add-image-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.image-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  padding: 1.25rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.image-dropzone:hover,
.image-dropzone:focus {
  border-color: #93c5fd;
  background: #eff6ff;
  outline: none;
}

.image-dropzone.is-dragover {
  border-color: var(--primary);
  background: #dbeafe;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.25);
}

.dropzone-title {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.dropzone-sub {
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
}

.preview-grid:not(.empty) {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.5rem;
}

.multi-upload {
  margin-top: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  padding: 0.75rem;
  display: grid;
  gap: 0.65rem;
}

.multi-upload-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
}

.multi-upload-item {
  display: grid;
  gap: 0.3rem;
}

.multi-upload-item .transfer-progress {
  margin-top: 0.2rem;
  padding: 0.55rem 0.65rem;
}

.multi-upload-item.is-done .multi-upload-status {
  color: #166534;
  font-weight: 700;
}

.multi-upload-head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: center;
}

.multi-upload-name {
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.multi-upload-status {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}

.transfer-progress,
.progress {
  margin-top: 0.75rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.transfer-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}

.transfer-progress-title {
  font-size: 0.84rem;
  font-weight: 600;
  color: #1e3a8a;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-label {
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 700;
  color: #1d4ed8;
  font-variant-numeric: tabular-nums;
}

.progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #dbe3ef;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #3b82f6, #2563eb 55%, #1d4ed8);
  transition: width 0.18s ease;
}

.transfer-progress.is-active .progress-bar {
  background-size: 180% 100%;
  animation: progress-shine 1.1s linear infinite;
}

.transfer-progress.is-done {
  border-color: #bbf7d0;
  background: linear-gradient(180deg, #f0fdf4 0%, #ecfdf5 100%);
}

.transfer-progress.is-done .transfer-progress-title,
.transfer-progress.is-done .progress-label {
  color: #166534;
}

.transfer-progress.is-done .progress-bar {
  background: linear-gradient(90deg, #34d399, #16a34a);
  animation: none;
}

.transfer-progress.is-error {
  border-color: #fecaca;
  background: linear-gradient(180deg, #fff1f2 0%, #fef2f2 100%);
}

.transfer-progress.is-error .transfer-progress-title,
.transfer-progress.is-error .progress-label {
  color: #991b1b;
}

.transfer-progress.is-error .progress-bar {
  background: #ef4444;
  animation: none;
}

@keyframes progress-shine {
  0% { filter: brightness(1); }
  50% { filter: brightness(1.12); }
  100% { filter: brightness(1); }
}

body.confirm-open {
  overflow: hidden;
}

.confirm-dialog {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.confirm-dialog.hidden {
  display: none !important;
}

.confirm-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.confirm-dialog-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.22);
  padding: 1.25rem 1.2rem 1.15rem;
  text-align: center;
}

.confirm-dialog-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 0.7rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  font-weight: 800;
  color: #991b1b;
  background: #fee2e2;
  border: 1px solid #fecaca;
}

.confirm-dialog-panel h2 {
  margin: 0 0 0.45rem;
  font-size: 1.2rem;
}

.confirm-dialog-message {
  margin: 0 0 1.1rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.confirm-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
}

.confirm-dialog-actions .btn {
  min-width: 120px;
}

.alert {
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  margin: 0.65rem 0;
  font-size: 0.9rem;
}

.alert-error { background: var(--error-bg); color: var(--error-text); }
.alert-success { background: var(--success-bg); color: var(--success-text); }

.empty-state { text-align: center; padding: 2rem 1rem; }
.hidden { display: none !important; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  background: #111827;
  color: #fff;
  padding: 0.65rem 0.95rem;
  border-radius: 999px;
  z-index: 50;
  max-width: min(90vw, 380px);
  text-align: center;
  font-size: 0.88rem;
}

.view-card,
.view-gallery-card {
  margin-top: 0.85rem;
}

.view-meta {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.view-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--border);
}

.view-meta-row .label,
.view-brief-block .label,
.gallery-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.view-brief {
  margin: 0.45rem 0 0;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.55;
  font-size: 0.98rem;
}

textarea#brief {
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 160px;
  line-height: 1.5;
}

.product-title-wrap h2,
.product-title-wrap h2 a,
.view-card h1,
.confirm-dialog-message {
  word-break: break-word;
  overflow-wrap: anywhere;
}

.gallery-label {
  margin-bottom: 0.75rem;
}

.view-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.85rem;
}

.view-gallery-item {
  display: grid;
  gap: 0.35rem;
  text-align: left;
  padding: 0.55rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

.view-gallery-item:hover {
  border-color: #94a3b8;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.view-gallery-item .media-frame,
.view-gallery-item img,
.view-gallery-item .gallery-thumb,
.view-gallery-item .img-placeholder {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
}

.view-gallery-name {
  font-size: 0.85rem;
  font-weight: 600;
  word-break: break-word;
}

.view-gallery-meta {
  font-size: 0.78rem;
  color: var(--muted);
}

.empty-state.compact {
  padding: 1.25rem 0.5rem;
}

body.lightbox-open {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 0.75rem;
}

.lightbox.hidden {
  display: none !important;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.78);
}

.lightbox-dialog {
  position: relative;
  z-index: 1;
  width: min(1100px, 100%);
  max-height: calc(100vh - 1.5rem);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 0.65rem;
  background: #0f172a;
  color: #f8fafc;
  border-radius: 14px;
  padding: 0.85rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.lightbox-top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: space-between;
  align-items: start;
}

.lightbox-info {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.lightbox-info strong {
  word-break: break-word;
}

.lightbox-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.lightbox-stage {
  position: relative;
  min-height: 220px;
  max-height: min(70vh, 720px);
  display: grid;
  place-items: center;
  overflow: auto;
  background: #020617;
  border-radius: 10px;
}

.lightbox-stage img {
  max-width: 100%;
  max-height: min(70vh, 720px);
  width: auto;
  height: auto;
  object-fit: contain;
}

.lightbox-stage img.is-loading {
  opacity: 0.15;
}

.lightbox-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #cbd5e1;
  font-size: 0.95rem;
  pointer-events: none;
}

.lightbox-counter {
  margin: 0;
  text-align: center;
  font-size: 0.85rem;
}

@media (max-width: 719px) {
  .lightbox-dialog {
    padding: 0.65rem;
  }

  .lightbox-actions .btn {
    flex: 1 1 calc(50% - 0.4rem);
  }
}

@media (min-width: 720px) {
  .filters {
    grid-template-columns: 2fr 1fr auto;
    align-items: end;
  }

  .product-list {
    gap: 1.5rem;
  }

  .product-card {
    grid-template-columns: minmax(0, 210px) minmax(0, 1fr);
    align-items: stretch;
    gap: 1.75rem;
  }

  .product-cover {
    aspect-ratio: 1;
    min-height: 180px;
    height: 100%;
    max-width: 100%;
  }

  .gallery-block {
    padding-top: 0.9rem;
    margin-bottom: 0.55rem;
  }

  .product-actions {
    margin-top: 1.1rem;
    padding-top: 1rem;
  }

  .pin-shell { padding: 1.25rem 1rem 2rem; }

  .pin-card {
    width: 440px;
    padding: 1.75rem 1.6rem;
  }

  .welcome-line { font-size: 1.15rem; }

  .pin-form input { min-height: 56px; font-size: 1.65rem; }
  .pin-form .btn { min-height: 48px; }
}
