:root {
  --selection-dock-clearance: 108px;
  --bg: #f5f2ec;
  --surface: #ffffff;
  --surface-soft: #fbfaf7;
  --ink: #1d2527;
  --muted: #687173;
  --line: #ded8ce;
  --primary: #12665f;
  --primary-strong: #0a4944;
  --secondary: #8d5a2b;
  --accent: #b5364c;
  --gold: #c6923d;
  --shadow: 0 18px 45px rgba(29, 37, 39, 0.1);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(90deg, rgba(18, 102, 95, 0.05) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, rgba(141, 90, 43, 0.04) 0 1px, transparent 1px 100%),
    var(--bg);
  background-size: 44px 44px;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 10px clamp(14px, 2vw, 26px);
  border-bottom: 1px solid rgba(29, 37, 39, 0.08);
  background: rgba(245, 242, 236, 0.92);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.15;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.58);
}

.topnav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.topnav a[aria-current="page"],
.topnav a:hover {
  background: var(--ink);
  color: #fff;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.language-switch button {
  min-width: 38px;
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.language-switch button.is-active {
  background: var(--ink);
  color: #fff;
}

.catalog-shell {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 18px;
  padding: clamp(14px, 2vw, 26px);
  padding-bottom: 132px;
}

.filter-panel,
.builder-controls,
.login-panel,
.product-form,
.admin-table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.filter-panel {
  position: sticky;
  top: 74px;
  align-self: start;
  padding: 14px;
}

@media (min-width: 1081px) {
  .catalog-shell {
    padding-bottom: max(132px, calc(var(--selection-dock-clearance) + 24px));
  }

  .filter-panel {
    max-height: calc(100vh - 90px - var(--selection-dock-clearance));
    max-height: calc(100dvh - 90px - var(--selection-dock-clearance));
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }
}

.panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-head h1,
.admin-header h1,
.login-panel h1 {
  margin: 0;
  font-size: clamp(21px, 2vw, 30px);
  line-height: 1.08;
}

.panel-head p,
.form-message {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.field.inline {
  grid-auto-flow: column;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid #cfc7bb;
  border-radius: var(--radius);
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.field textarea {
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(18, 102, 95, 0.14);
}

.field small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.code-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.code-control input[readonly] {
  background: #f7f4ed;
  color: var(--primary-strong);
  font-weight: 900;
  letter-spacing: 0;
}

.toggle-row {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.toggle-row.strong {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.toggle-row label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  color: var(--ink);
  font-weight: 700;
}

.toggle-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.filter-actions,
.dock-actions,
.admin-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dock-actions {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.dock-actions.flat {
  border-top: 0;
  padding-top: 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0 14px;
  cursor: pointer;
  font-weight: 800;
  line-height: 1;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.button:active {
  transform: translateY(1px);
}

.button.primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 18px rgba(18, 102, 95, 0.22);
}

.button.primary:hover {
  background: var(--primary-strong);
}

.button.secondary {
  border-color: rgba(141, 90, 43, 0.26);
  background: rgba(141, 90, 43, 0.12);
  color: #6e3f16;
}

.button.ghost {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.button.small {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.product-area {
  min-width: 0;
}

.section-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--secondary);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.view-title h2 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(22px, 2.2vw, 32px);
  line-height: 1.1;
}

.sort-wrap {
  flex: 0 0 auto;
}

.product-grid {
  display: grid;
  gap: 12px;
}

.product-category {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 30px rgba(29, 37, 39, 0.06);
}

.category-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding-right: 12px;
  background: #fff;
}

.category-toggle {
  width: 100%;
  min-width: 0;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  padding: 12px 14px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.category-bulk {
  white-space: nowrap;
}

.category-toggle strong,
.category-toggle small {
  display: block;
}

.category-toggle strong {
  font-size: 16px;
  line-height: 1.2;
}

.category-toggle small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.category-chevron {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--primary);
  font-size: 20px;
  font-weight: 900;
  transition: transform 0.18s ease;
}

.product-category.is-open .category-chevron {
  transform: rotate(180deg);
}

.category-products {
  border-top: 1px solid var(--line);
  padding: 12px;
  background: var(--surface-soft);
}

.category-product-scroll {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
  gap: 12px;
  overflow: visible;
  padding: 2px;
}

.category-product-scroll .product-card {
  min-width: 0;
}

.category-empty {
  min-height: 110px;
  display: grid;
  place-items: center;
  border: 1px dashed #cfc7bb;
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  text-align: center;
  padding: 16px;
}

.product-card {
  display: grid;
  grid-template-rows: 132px 1fr;
  min-height: 318px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(29, 37, 39, 0.08);
}

.product-card.is-selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(18, 102, 95, 0.16), 0 10px 30px rgba(29, 37, 39, 0.08);
}

.product-card.is-magnet {
  grid-template-rows: auto 1fr;
}

.product-card.is-magnet .product-image {
  aspect-ratio: 1 / 1;
  background-color: #f4f0e8;
}

.product-image > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.product-card.is-magnet .product-image > img {
  object-fit: contain;
}

.product-image,
.mini-thumb,
.pdf-thumb,
.template-thumb,
.photo-preview,
.quantity-preview,
.admin-photo {
  position: relative;
  overflow: hidden;
  background-color: #d8d3c7;
}

.product-image::before,
.mini-thumb::before,
.pdf-thumb::before,
.template-thumb::before,
.photo-preview::before,
.quantity-preview::before,
.admin-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--swatch, linear-gradient(135deg, #ddd, #aaa));
}

.has-photo {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.has-photo.has-contain-photo {
  background-color: #f4f0e8;
  background-size: contain;
}

.has-photo::before {
  display: none;
}

.product-image::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255, 255, 255, 0.58);
}

.swatch-linen {
  --swatch:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.18) 0 2px, transparent 2px 7px),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.06) 0 1px, transparent 1px 5px),
    linear-gradient(135deg, #d8c9b0, #ede7db 48%, #b8a688);
}

.swatch-marble {
  --swatch:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.9), transparent 20%),
    radial-gradient(circle at 70% 62%, rgba(17, 29, 33, 0.18), transparent 25%),
    linear-gradient(135deg, #eef0ed, #c9ccc5 50%, #aeb3af);
}

.swatch-geo {
  --swatch:
    linear-gradient(30deg, transparent 0 48%, rgba(255, 255, 255, 0.35) 48% 52%, transparent 52%),
    linear-gradient(150deg, transparent 0 48%, rgba(0, 0, 0, 0.12) 48% 52%, transparent 52%),
    linear-gradient(135deg, #164f5b, #d7a23f);
}

.swatch-wood {
  --swatch:
    repeating-linear-gradient(90deg, rgba(35, 20, 8, 0.16) 0 6px, transparent 6px 18px),
    linear-gradient(135deg, #b8793a, #e2b674 48%, #754719);
}

.swatch-floral {
  --swatch:
    radial-gradient(circle at 26% 30%, rgba(181, 54, 76, 0.48) 0 9%, transparent 10%),
    radial-gradient(circle at 66% 42%, rgba(18, 102, 95, 0.42) 0 8%, transparent 9%),
    radial-gradient(circle at 42% 72%, rgba(198, 146, 61, 0.46) 0 8%, transparent 9%),
    linear-gradient(135deg, #eadfcf, #c6bba6);
}

.swatch-stone {
  --swatch:
    linear-gradient(110deg, rgba(255, 255, 255, 0.18) 0 12%, transparent 12% 24%, rgba(0, 0, 0, 0.08) 24% 30%, transparent 30%),
    radial-gradient(circle at 80% 20%, rgba(0, 0, 0, 0.2), transparent 18%),
    linear-gradient(135deg, #777a72, #c7c3b8);
}

.product-body {
  display: grid;
  gap: 9px;
  padding: 12px;
}

.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.code {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: end;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(18, 102, 95, 0.1);
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
}

.badge.gold {
  background: rgba(198, 146, 61, 0.18);
  color: #805718;
}

.badge.muted {
  background: rgba(104, 113, 115, 0.12);
  color: var(--muted);
}

.product-card h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
}

.product-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.42;
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.spec {
  min-width: 0;
  padding: 7px;
  border-radius: 6px;
  background: var(--surface-soft);
}

.spec span,
.price-label {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.spec strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-card.is-magnet .spec strong {
  overflow: visible;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

.card-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}

.order-quantity-badge {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  min-width: 0;
  padding: 0 9px;
  border: 1px solid rgba(18, 102, 95, 0.18);
  border-radius: 999px;
  background: rgba(18, 102, 95, 0.09);
  color: var(--primary);
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.price {
  font-size: 18px;
  font-weight: 900;
}

.empty-state {
  grid-column: 1 / -1;
  min-height: 280px;
  display: grid;
  place-items: center;
  border: 1px dashed #cfc7bb;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.56);
  color: var(--muted);
  text-align: center;
}

.selection-dock {
  position: fixed;
  left: clamp(16px, 3vw, 36px);
  right: clamp(16px, 3vw, 36px);
  bottom: 18px;
  z-index: 40;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 20px 56px rgba(29, 37, 39, 0.2);
  backdrop-filter: blur(18px);
}

.dock-summary {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 0;
  padding: 12px 16px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.dock-summary strong {
  font-size: 24px;
}

#dockHint {
  color: var(--primary);
  font-weight: 900;
}

.dock-body {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  max-height: 0;
  overflow: hidden;
  padding: 0 16px;
  transition: max-height 0.22s ease, padding 0.22s ease;
}

.selection-dock.is-open .dock-body {
  max-height: 220px;
  padding: 0 16px 16px;
}

.selected-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 3px;
}

.selected-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 220px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.mini-thumb {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 6px;
}

.selected-chip strong,
.selected-chip span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-chip strong {
  font-size: 13px;
}

.selected-chip span {
  color: var(--muted);
  font-size: 12px;
}

.remove-chip {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

.quantity-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(22, 28, 30, 0.48);
  backdrop-filter: blur(10px);
}

.quantity-modal.is-hidden {
  display: none;
}

.quantity-dialog {
  width: min(460px, 100%);
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 28px 80px rgba(18, 27, 29, 0.32);
}

.quantity-product {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.quantity-preview {
  width: 76px;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background-color: var(--surface-soft);
}

.quantity-product span:last-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.quantity-product small,
.quantity-product em {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quantity-product strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quantity-field {
  margin: 0;
}

.quantity-stepper {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  gap: 8px;
}

.quantity-stepper input {
  height: 44px;
  text-align: center;
  font-size: 20px;
  font-weight: 950;
}

.quantity-actions {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
}

.has-modal {
  overflow: hidden;
}

.builder-shell {
  display: grid;
  grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
  gap: 24px;
  padding: clamp(16px, 3vw, 36px);
}

.builder-controls {
  position: sticky;
  top: 92px;
  align-self: start;
  padding: 18px;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
  max-height: 440px;
  overflow: auto;
  padding-right: 4px;
}

.template-card {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
  background: #fff;
  cursor: pointer;
  text-align: left;
}

.template-card.is-active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(18, 102, 95, 0.14);
}

.template-thumb {
  width: 56px;
  height: 56px;
  border-radius: 6px;
}

.template-card strong,
.template-card span {
  display: block;
}

.template-card strong {
  font-size: 13px;
  line-height: 1.18;
}

.template-card span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.builder-form {
  display: grid;
  gap: 0;
}

.catalog-links {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.link-copy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.catalog-readonly .template-grid,
.catalog-readonly .builder-form {
  display: none;
}

.catalog-readonly .builder-controls .panel-head h1::after {
  content: " Paylaşım";
}

.preview-stage {
  min-width: 0;
  display: grid;
  place-items: start center;
}

.pdf-document {
  --pdf-ink: #1d2527;
  --pdf-muted: #667174;
  --pdf-paper: #ffffff;
  --pdf-soft: #f6f2ea;
  --pdf-line: #ddd6cb;
  --pdf-accent: #12665f;
  --pdf-accent-2: #c6923d;
  --pdf-cover: linear-gradient(135deg, rgba(29, 37, 39, 0.92), rgba(18, 102, 95, 0.78));
  --pdf-card-radius: 7px;
  --pdf-image-fit: contain;
  width: min(100%, 1120px);
  min-height: 720px;
  border: 1px solid var(--line);
  background: var(--pdf-paper);
  color: var(--pdf-ink);
  box-shadow: var(--shadow);
  isolation: isolate;
}

@media screen {
  .preview-stage {
    position: relative;
    display: block;
    width: 100%;
    min-height: 1px;
    overflow: hidden;
  }

  .pdf-document {
    --preview-scale: 1;
    position: absolute;
    top: 0;
    left: 50%;
    width: 1120px;
    max-width: none;
    transform: translateX(-50%) scale(var(--preview-scale));
    transform-origin: top center;
    will-change: transform;
  }

  .pdf-document.is-exporting {
    position: static;
    left: auto;
    width: 1120px;
    transform: none;
    box-shadow: none;
  }
}

.pdf-cover {
  position: relative;
  min-height: 96px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 13px 20px;
  color: #fff;
  background: var(--pdf-cover), var(--pdf-accent);
  overflow: hidden;
}

.pdf-cover::before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  pointer-events: none;
}

.pdf-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 84% 18%, rgba(255, 255, 255, 0.2), transparent 25%),
    linear-gradient(115deg, transparent 0 42%, rgba(255, 255, 255, 0.12) 42% 43%, transparent 43% 100%);
  mix-blend-mode: screen;
  opacity: 0.72;
  pointer-events: none;
}

.pdf-cover-copy {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 14px;
  align-items: end;
  min-width: 0;
}

.pdf-cover-kicker {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 9px;
  font-weight: 950;
  text-transform: uppercase;
}

.pdf-cover-kicker::before {
  content: "";
  width: 34px;
  height: 1px;
  background: currentColor;
  flex: 0 0 auto;
}

.pdf-cover-kicker strong {
  min-width: 0;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdf-cover h1 {
  grid-column: 1;
  margin: 0;
  max-width: 760px;
  font-size: clamp(18px, 2.25vw, 28px);
  line-height: 1.02;
  font-weight: 950;
}

.pdf-cover p {
  margin: 0;
  max-width: 720px;
  font-size: 10px;
  line-height: 1.3;
}

.pdf-cover-note,
.pdf-meta-row.is-contact {
  display: none;
}

.pdf-meta-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pdf-meta-row.is-primary {
  grid-column: 1 / -1;
}

.pdf-meta-row span {
  min-height: 19px;
  display: inline-flex;
  align-items: center;
  padding: 0 7px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 8px;
  font-weight: 800;
}

.pdf-cover-stats {
  grid-column: 2;
  grid-row: 3;
  justify-self: end;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pdf-cover-stats span {
  min-width: 58px;
  display: grid;
  gap: 1px;
  padding: 5px 7px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(4px);
}

.pdf-cover-stats strong {
  font-size: 15px;
  line-height: 1;
}

.pdf-cover-stats small {
  color: rgba(255, 255, 255, 0.82);
  font-size: 6px;
  font-weight: 950;
  text-transform: uppercase;
}

.pdf-cover-gallery {
  display: none;
}

.pdf-cover-gallery figure {
  position: relative;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.pdf-cover-gallery figure:first-child {
  grid-row: span 2;
}

.pdf-cover-gallery figure:nth-child(5) {
  grid-column: 1 / -1;
}

.pdf-cover-gallery img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pdf-cover-gallery figcaption {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  padding: 3px 5px;
  border-radius: 999px;
  background: rgba(29, 37, 39, 0.68);
  color: #fff;
  font-size: 7px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdf-content {
  padding: 18px;
  background: var(--pdf-paper);
}

.pdf-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: end;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--pdf-line);
}

.pdf-section-head span,
.pdf-section-head small {
  color: var(--pdf-muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.pdf-section-head strong {
  font-size: 18px;
  line-height: 1;
}

.pdf-section-head small {
  justify-self: end;
}

.pdf-chapter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.pdf-chapter-row span,
.pdf-chapter-row strong {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 900;
}

.pdf-chapter-row em {
  min-width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--pdf-accent);
  color: #fff;
  font-style: normal;
  font-size: 7px;
}

.pdf-chapter-row span {
  background: var(--pdf-ink);
  color: #fff;
}

.pdf-chapter-row strong {
  border: 1px solid var(--pdf-line);
  color: var(--pdf-ink);
}

.pdf-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 8px;
}

.pdf-item {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--pdf-line);
  border-radius: var(--pdf-card-radius);
  background: #fff;
  break-inside: avoid;
  box-shadow: 0 10px 24px rgba(29, 37, 39, 0.045);
}

.pdf-thumb {
  position: relative;
  height: 58px;
  background: var(--pdf-soft);
  border-bottom: 1px solid rgba(29, 37, 39, 0.06);
}

.pdf-thumb img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: var(--pdf-image-fit);
  image-rendering: auto;
  padding: 5px;
}

.pdf-code-ribbon {
  position: absolute;
  z-index: 2;
  left: 5px;
  top: 5px;
  max-width: calc(100% - 10px);
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--pdf-ink);
  font-size: 6px;
  font-weight: 950;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(29, 37, 39, 0.12);
}

.pdf-quantity-ribbon {
  position: absolute;
  z-index: 2;
  right: 5px;
  bottom: 5px;
  max-width: calc(100% - 10px);
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(18, 102, 95, 0.92);
  color: #fff;
  font-size: 6px;
  font-weight: 950;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(29, 37, 39, 0.14);
}

.pdf-info {
  display: grid;
  gap: 4px;
  padding: 6px;
}

.pdf-item-number {
  color: var(--pdf-accent);
  font-size: 7px;
  font-weight: 950;
  letter-spacing: 0;
}

.pdf-info h3 {
  margin: 0;
  min-height: 24px;
  display: -webkit-box;
  overflow: hidden;
  font-size: 9px;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.pdf-category-line {
  display: none;
  color: var(--pdf-muted);
  font-size: 7px;
  font-weight: 900;
  text-transform: uppercase;
}

.pdf-info p {
  margin: 0;
  color: var(--pdf-muted);
  display: none;
}

.pdf-specs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  color: #273133;
  font-size: 7px;
  line-height: 1.2;
}

.pdf-specs span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.pdf-footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--pdf-line);
  color: var(--pdf-muted);
  font-size: 9px;
  font-weight: 750;
}

.pdf-export-document {
  position: static !important;
  z-index: auto;
  top: auto;
  left: auto !important;
  width: 1120px !important;
  min-height: 0;
  border: 0;
  box-shadow: none;
  transform: none !important;
  background: #fff;
}

.pdf-export-page {
  width: 1120px;
  height: 792px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 18px;
  background: var(--pdf-paper);
  break-after: page;
  page-break-after: always;
}

.pdf-export-page:last-child {
  break-after: auto;
  page-break-after: auto;
}

.pdf-export-page .pdf-cover {
  flex: 0 0 auto;
}

.pdf-export-content {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 18px 0 0;
}

.pdf-export-content .pdf-section-head.is-continuation {
  margin-bottom: 12px;
}

.pdf-export-content .pdf-grid {
  flex: 0 0 auto;
}

.pdf-export-content .pdf-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  margin-top: auto;
}

.pdf-export-content .pdf-footer span:nth-child(2) {
  justify-self: center;
}

.pdf-export-content .pdf-footer span:last-child {
  justify-self: end;
}

.pdf-export-page-number {
  white-space: nowrap;
}

.layout-compact .pdf-grid,
.layout-matrix .pdf-grid {
  grid-template-columns: repeat(10, minmax(0, 1fr));
}

.layout-compact .pdf-thumb {
  height: 48px;
}

.layout-compact .pdf-info {
  padding: 5px;
}

.layout-compact .pdf-info h3,
.layout-matrix .pdf-info h3 {
  min-height: 21px;
}

.layout-index .pdf-grid,
.layout-archive .pdf-grid {
  grid-template-columns: repeat(8, minmax(0, 1fr));
}

.layout-archive .pdf-item {
  filter: grayscale(0.95);
}

.layout-technical .pdf-grid,
.layout-architect .pdf-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.layout-technical .pdf-item,
.layout-architect .pdf-item {
  display: grid;
  grid-template-rows: 84px 1fr;
  background:
    linear-gradient(90deg, rgba(18, 102, 95, 0.07) 0 1px, transparent 1px 100%),
    #fff;
  background-size: 12px 12px;
}

.layout-gallery .pdf-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.layout-gallery {
  --pdf-image-fit: contain;
}

.layout-gallery .pdf-item.is-lead {
  grid-column: span 2;
  grid-row: span 2;
}

.layout-gallery .pdf-item.is-lead .pdf-thumb {
  height: 170px;
}

.layout-editorial .pdf-grid,
.layout-magazine .pdf-grid,
.layout-blocks .pdf-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.layout-editorial .pdf-item.is-lead,
.layout-magazine .pdf-item.is-lead {
  grid-column: span 3;
}

.layout-editorial .pdf-item.is-wide,
.layout-magazine .pdf-item.is-wide,
.layout-blocks .pdf-item.is-wide {
  grid-column: span 2;
}

.layout-editorial .pdf-thumb,
.layout-magazine .pdf-thumb,
.layout-blocks .pdf-thumb {
  height: 78px;
}

.layout-story .pdf-grid,
.layout-portfolio .pdf-grid,
.layout-proposal .pdf-grid,
.layout-folio .pdf-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.layout-story .pdf-thumb,
.layout-portfolio .pdf-thumb,
.layout-proposal .pdf-thumb,
.layout-folio .pdf-thumb {
  height: 112px;
}

.layout-story .pdf-category-line,
.layout-portfolio .pdf-category-line,
.layout-proposal .pdf-category-line,
.layout-folio .pdf-category-line,
.layout-gallery .pdf-category-line,
.layout-museum .pdf-category-line {
  display: block;
}

.layout-story .pdf-info p,
.layout-portfolio .pdf-info p,
.layout-proposal .pdf-info p,
.layout-folio .pdf-info p,
.layout-museum .pdf-info p {
  display: block;
  font-size: 8px;
  line-height: 1.28;
}

.layout-dealer .pdf-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.layout-dealer .pdf-item {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
}

.layout-dealer .pdf-thumb {
  height: 100%;
  min-height: 104px;
}

.layout-dealer .pdf-code-ribbon {
  top: auto;
  bottom: 6px;
  background: rgba(18, 102, 95, 0.1);
  color: var(--pdf-accent);
}

.layout-book {
  background:
    linear-gradient(90deg, #f8f2e8 0 calc(50% - 1px), #d3c5b0 calc(50% - 1px) calc(50% + 1px), #fffaf4 calc(50% + 1px)),
    #fffaf4;
  box-shadow:
    0 26px 60px rgba(29, 37, 39, 0.18),
    inset 18px 0 26px rgba(80, 48, 20, 0.06),
    inset -18px 0 26px rgba(80, 48, 20, 0.05);
}

.layout-book .pdf-content {
  position: relative;
  background:
    linear-gradient(90deg, rgba(29, 37, 39, 0.08) 0 1px, transparent 1px calc(50% - 6px), rgba(29, 37, 39, 0.18) calc(50% - 6px) calc(50% + 6px), transparent calc(50% + 6px)),
    #fffaf4;
}

.layout-book .pdf-content::before,
.layout-book .pdf-content::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 48%;
  pointer-events: none;
}

.layout-book .pdf-content::before {
  left: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.42), transparent 28%);
}

.layout-book .pdf-content::after {
  right: 0;
  background: linear-gradient(270deg, rgba(29, 37, 39, 0.05), transparent 32%);
}

.layout-book .pdf-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 22px;
}

.layout-book .pdf-item {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 42% minmax(0, 1fr);
  border: 0;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 1px 0 rgba(29, 37, 39, 0.14);
}

.layout-book .pdf-thumb {
  height: 118px;
}

.layout-museum .pdf-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.layout-museum .pdf-item {
  padding: 10px;
  border-radius: 2px;
  background: #fbfaf6;
}

.layout-museum .pdf-thumb {
  height: 142px;
  border: 10px solid #fff;
  box-shadow: inset 0 0 0 1px rgba(29, 37, 39, 0.08);
}

.layout-capsule .pdf-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
}

.layout-capsule .pdf-item {
  border-radius: 18px;
}

.layout-capsule .pdf-thumb {
  height: 82px;
  border-radius: 16px 16px 0 0;
}

.template-classic {
  --pdf-cover: linear-gradient(135deg, rgba(29, 37, 39, 0.92), rgba(18, 102, 95, 0.78)), linear-gradient(45deg, #8d5a2b, #12665f);
}

.template-minimal,
.template-soft,
.template-museum {
  --pdf-ink: #20282a;
  --pdf-paper: #fbfaf7;
  --pdf-soft: #f3eee5;
  --pdf-accent: #8d5a2b;
}

.template-minimal .pdf-cover,
.template-soft .pdf-cover,
.template-museum .pdf-cover,
.template-architect .pdf-cover {
  color: var(--pdf-ink);
}

.template-minimal .pdf-cover-kicker,
.template-soft .pdf-cover-kicker,
.template-museum .pdf-cover-kicker,
.template-architect .pdf-cover-kicker,
.template-book .pdf-cover-kicker {
  color: rgba(29, 37, 39, 0.58);
}

.template-minimal .pdf-cover-kicker strong,
.template-soft .pdf-cover-kicker strong,
.template-museum .pdf-cover-kicker strong,
.template-architect .pdf-cover-kicker strong,
.template-book .pdf-cover-kicker strong {
  color: var(--pdf-ink);
}

.template-minimal .pdf-meta-row span,
.template-soft .pdf-meta-row span,
.template-museum .pdf-meta-row span,
.template-architect .pdf-meta-row span,
.template-book .pdf-meta-row span,
.template-minimal .pdf-cover-stats span,
.template-soft .pdf-cover-stats span,
.template-museum .pdf-cover-stats span,
.template-architect .pdf-cover-stats span,
.template-book .pdf-cover-stats span {
  border-color: rgba(29, 37, 39, 0.18);
  background: rgba(255, 255, 255, 0.62);
  color: var(--pdf-ink);
}

.template-minimal .pdf-cover-stats small,
.template-soft .pdf-cover-stats small,
.template-museum .pdf-cover-stats small,
.template-architect .pdf-cover-stats small,
.template-book .pdf-cover-stats small {
  color: rgba(29, 37, 39, 0.62);
}

.template-minimal {
  --pdf-cover: linear-gradient(90deg, #fbfaf7, #ede4d6);
}

.template-premium,
.template-lux {
  --pdf-paper: #fbfaf7;
  --pdf-ink: #1d2527;
  --pdf-accent: #c6923d;
  --pdf-cover: linear-gradient(90deg, rgba(29, 37, 39, 0.96), rgba(29, 37, 39, 0.48)), linear-gradient(135deg, #1d2527, #c6923d);
}

.template-technical,
.template-architect {
  --pdf-accent: #12665f;
  --pdf-cover:
    linear-gradient(90deg, rgba(18, 102, 95, 0.12) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, rgba(18, 102, 95, 0.12) 0 1px, transparent 1px 100%),
    #f7f8f6;
}

.template-showroom {
  --pdf-accent: #b5364c;
  --pdf-cover: linear-gradient(135deg, rgba(141, 90, 43, 0.92), rgba(181, 54, 76, 0.7)), #8d5a2b;
}

.template-boutique {
  --pdf-accent: #b5364c;
  --pdf-cover: linear-gradient(120deg, rgba(255, 255, 255, 0.18), transparent 38%), linear-gradient(135deg, #b5364c, #12665f);
}

.template-gridline,
.template-mono {
  --pdf-accent: #1d2527;
  --pdf-cover: linear-gradient(135deg, #ffffff 0 50%, #1d2527 50%);
}

.template-mono {
  --pdf-cover: linear-gradient(135deg, #111, #555);
}

.template-colorline {
  --pdf-accent: #b5364c;
  --pdf-cover: linear-gradient(90deg, #12665f 0 24%, #c6923d 24% 48%, #b5364c 48% 72%, #1d2527 72% 100%);
}

.template-soft {
  --pdf-cover: linear-gradient(135deg, #efe8dc, #c8dad6);
}

.template-wholesale {
  --pdf-accent: #12665f;
  --pdf-cover: linear-gradient(135deg, #12665f, #f5f2ec);
}

.template-signature {
  --pdf-cover: linear-gradient(135deg, rgba(18, 102, 95, 0.88), rgba(29, 37, 39, 0.72)), linear-gradient(45deg, #12665f, #b5364c);
}

.template-gallery {
  --pdf-accent: #c6923d;
  --pdf-cover: linear-gradient(135deg, rgba(198, 146, 61, 0.9), rgba(255, 255, 255, 0.1)), #8d5a2b;
}

.template-compact {
  --pdf-accent: #687173;
  --pdf-cover: linear-gradient(135deg, #687173, #ded8ce);
}

.template-book {
  --pdf-accent: #8d5a2b;
  --pdf-cover: linear-gradient(90deg, #f7f1e7 0 48%, #d8c9b0 48% 52%, #fffaf3 52%);
}

.template-book .pdf-cover {
  color: var(--pdf-ink);
}

.template-editorial {
  --pdf-cover: linear-gradient(135deg, #ffffff 0 34%, #1d2527 34% 68%, #c6923d 68%);
  --pdf-accent: #c6923d;
}

.template-editorial .pdf-cover h1,
.template-editorial .pdf-cover p {
  max-width: 620px;
}

.template-capsule {
  --pdf-accent: #12665f;
  --pdf-cover: linear-gradient(135deg, #12665f 0 45%, #f7f5f0 45% 100%);
}

.template-thumb[data-layout]::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 3px;
  background:
    linear-gradient(#fff 0 0) 0 0 / 42% 24% no-repeat,
    linear-gradient(#fff 0 0) 100% 0 / 42% 24% no-repeat,
    linear-gradient(#fff 0 0) 0 50% / 42% 24% no-repeat,
    linear-gradient(#fff 0 0) 100% 50% / 42% 24% no-repeat,
    linear-gradient(#fff 0 0) 0 100% / 42% 24% no-repeat,
    linear-gradient(#fff 0 0) 100% 100% / 42% 24% no-repeat;
  opacity: 0.84;
}

.template-thumb[data-layout="book"]::after {
  inset: 8px;
  background:
    linear-gradient(90deg, transparent 0 48%, rgba(29, 37, 39, 0.35) 48% 52%, transparent 52%),
    linear-gradient(#fff 0 0) 0 0 / 45% 100% no-repeat,
    linear-gradient(#fff 0 0) 100% 0 / 45% 100% no-repeat;
}

.template-thumb[data-layout="dealer"]::after,
.template-thumb[data-layout="technical"]::after {
  background:
    repeating-linear-gradient(180deg, #fff 0 5px, transparent 5px 10px);
}

.template-thumb[data-layout="gallery"]::after,
.template-thumb[data-layout="magazine"]::after,
.template-thumb[data-layout="editorial"]::after {
  background:
    linear-gradient(#fff 0 0) 0 0 / 60% 58% no-repeat,
    linear-gradient(#fff 0 0) 100% 0 / 34% 26% no-repeat,
    linear-gradient(#fff 0 0) 100% 50% / 34% 26% no-repeat,
    linear-gradient(#fff 0 0) 0 100% / 100% 22% no-repeat;
}

.admin-shell {
  padding: clamp(16px, 3vw, 36px);
}

.login-panel {
  width: min(100%, 440px);
  margin: 56px auto 0;
  padding: 22px;
}

.admin-panel {
  display: grid;
  gap: 22px;
}

.is-hidden {
  display: none !important;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(300px, 460px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.product-form {
  padding: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 12px;
}

.category-manager {
  display: grid;
  gap: 12px;
  margin: 4px 0 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.category-manager-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.category-manager-head strong,
.category-manager-head small {
  display: block;
}

.category-manager-head strong {
  font-size: 15px;
}

.category-manager-head small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.category-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.category-add-row input {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cfc7bb;
  border-radius: var(--radius);
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.category-add-row input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(18, 102, 95, 0.14);
}

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  border: 1px solid rgba(18, 102, 95, 0.18);
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(18, 102, 95, 0.08);
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: 900;
}

.category-chip small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.category-chip button {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(181, 54, 76, 0.18);
  border-radius: 999px;
  background: rgba(181, 54, 76, 0.08);
  color: var(--accent);
  cursor: pointer;
  font-weight: 900;
  line-height: 1;
}

.photo-field {
  margin-top: 4px;
}

.photo-uploader {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px dashed #cfc7bb;
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.photo-preview {
  width: 104px;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: #fff;
}

.photo-controls {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.photo-controls input[type="file"] {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cfc7bb;
  border-radius: var(--radius);
  padding: 8px;
  background: #fff;
  color: var(--ink);
}

.photo-controls small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.admin-table-wrap {
  min-width: 0;
  overflow: hidden;
}

.table-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.count-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(18, 102, 95, 0.11);
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.table-scroll {
  overflow-x: auto;
}

.admin-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.pager-info {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  background: #fff;
}

.admin-table th,
.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #eee8df;
  text-align: left;
  vertical-align: middle;
}

.admin-table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.admin-table td {
  font-size: 14px;
}

.admin-photo {
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.row-actions {
  display: flex;
  gap: 8px;
  justify-content: end;
}

.admin-orders-wrap {
  margin-top: 22px;
  overflow: hidden;
}

.admin-orders-wrap .table-toolbar span {
  display: grid;
  gap: 3px;
}

.admin-orders-wrap .table-toolbar small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.order-records {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.order-record {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}

.order-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  cursor: pointer;
}

.order-summary > span:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.order-summary strong,
.order-summary small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.order-metrics {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.order-metrics em {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 12px;
  font-style: normal;
  font-weight: 950;
  white-space: nowrap;
}

.order-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.order-items {
  display: grid;
  gap: 1px;
  padding: 0 12px 12px;
}

.order-item {
  display: grid;
  grid-template-columns: minmax(120px, 0.24fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  background: var(--surface-soft);
  font-size: 13px;
}

.order-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-item small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.order-item > strong {
  color: var(--primary);
  white-space: nowrap;
}

.form-message {
  min-height: 20px;
  color: var(--accent);
}

@media (max-width: 1080px) {
  .catalog-shell,
  .builder-shell,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .filter-panel,
  .builder-controls {
    position: static;
  }

  .filter-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 14px;
  }

  .filter-panel .panel-head,
  .filter-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .topbar,
  .section-toolbar,
  .admin-header,
  .table-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 8px 12px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .brand small {
    display: none;
  }

  .topnav {
    display: none;
  }

  .catalog-shell,
  .builder-shell,
  .admin-shell {
    padding: 14px;
    padding-bottom: 206px;
  }

  .filter-panel,
  .form-grid,
  .toggle-row.strong,
  .code-control,
  .category-add-row,
  .photo-uploader {
    grid-template-columns: 1fr;
  }

  .sort-wrap,
  .field.inline,
  .field.inline input,
  .field.inline select {
    width: 100%;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .category-head {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0 12px 12px;
  }

  .category-toggle {
    padding: 12px 0 8px;
  }

  .category-bulk {
    width: 100%;
  }

  .category-product-scroll {
    grid-template-columns: 1fr;
  }

  .dock-body {
    grid-template-columns: 1fr;
  }

  .builder-controls .template-grid {
    display: none;
  }

  .selection-dock {
    left: 10px;
    right: 10px;
    bottom: calc(74px + env(safe-area-inset-bottom, 0px));
    border-radius: 10px;
  }

  .dock-summary {
    min-height: 48px;
    padding: 9px 12px;
    gap: 10px;
  }

  .dock-summary strong {
    font-size: 21px;
  }

  #dockHint {
    max-width: 132px;
    overflow: hidden;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dock-body {
    gap: 10px;
    padding: 0 12px;
  }

  .selection-dock.is-open .dock-body {
    max-height: 74px;
    padding: 0 12px 12px;
  }

  .selection-dock .selected-list {
    display: none;
  }

  .dock-actions {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(88px, 0.42fr) minmax(0, 1fr);
    gap: 8px;
    padding-top: 0;
    border-top: 0;
  }

  .dock-actions .button {
    min-height: 44px;
    padding-inline: 10px;
  }

  .quantity-modal {
    align-items: end;
    padding: 12px;
  }

  .quantity-dialog {
    gap: 14px;
    padding: 14px;
    border-radius: 14px;
  }

  .quantity-product {
    grid-template-columns: 58px 1fr;
  }

  .quantity-preview {
    width: 58px;
  }

  .quantity-product strong {
    font-size: 16px;
  }

  .quantity-actions {
    grid-template-columns: 1fr;
  }

  .quantity-actions .button {
    width: 100%;
    min-height: 42px;
  }

  .order-summary,
  .order-item {
    grid-template-columns: 1fr;
  }

  .order-actions,
  .order-metrics {
    justify-content: stretch;
  }

  .order-actions .button,
  .order-metrics em {
    flex: 1;
    justify-content: center;
  }

}

@media print {
  @page {
    size: A4 landscape;
    margin: 0;
  }

  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  html,
  body {
    background: #fff;
    width: auto;
    min-height: auto;
  }

  body {
    margin: 0;
  }

  .topbar,
  .builder-controls,
  .catalog-links {
    display: none !important;
  }

  .builder-shell {
    display: block;
    padding: 0;
  }

  .preview-stage {
    display: block;
  }

  .pdf-document {
    width: 100%;
    min-height: auto;
    padding: 6mm;
    border: 0;
    box-sizing: border-box;
    box-shadow: none;
  }

  .pdf-cover {
    min-height: 12mm;
    gap: 1mm;
    grid-template-columns: minmax(0, 1fr);
    padding: 2.2mm 4mm;
    break-after: avoid;
  }

  .pdf-cover-copy {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1mm 3mm;
  }

  .pdf-cover h1 {
    max-width: 240mm;
    font-size: 9.5pt;
    line-height: 1.05;
  }

  .pdf-cover p {
    max-width: 240mm;
    font-size: 5.3pt;
    line-height: 1.18;
  }

  .pdf-meta-row {
    gap: 2mm;
  }

  .pdf-meta-row span {
    min-height: 3.4mm;
    padding: 0 1.6mm;
    font-size: 4.5pt;
  }

  .pdf-cover-kicker {
    gap: 1.5mm;
    font-size: 4.2pt;
  }

  .pdf-cover-kicker::before {
    width: 6mm;
  }

  .pdf-cover-stats {
    grid-column: 2;
    grid-row: 3;
    justify-self: end;
    gap: 1.5mm;
  }

  .pdf-cover-stats span {
    min-width: 12mm;
    padding: 0.9mm 1.3mm;
  }

  .pdf-cover-stats strong {
    font-size: 7.5pt;
  }

  .pdf-cover-stats small {
    font-size: 3.1pt;
  }

  .pdf-content {
    padding: 4mm 0 0;
  }

  .pdf-section-head {
    margin-bottom: 2mm;
    padding-bottom: 1.6mm;
  }

  .pdf-section-head span,
  .pdf-section-head small {
    font-size: 4.8pt;
  }

  .pdf-section-head strong {
    font-size: 10pt;
  }

  .pdf-chapter-row {
    gap: 1.2mm;
    margin-bottom: 2mm;
  }

  .pdf-chapter-row span,
  .pdf-chapter-row strong {
    min-height: 4mm;
    padding: 0 1.6mm;
    font-size: 4.4pt;
  }

  .pdf-cover-gallery {
    display: none;
  }

  .pdf-cover-gallery figcaption {
    left: 1mm;
    right: 1mm;
    bottom: 1mm;
    padding: 0.6mm 1mm;
    font-size: 3.8pt;
  }

  .pdf-grid {
    grid-template-columns: repeat(10, 1fr);
    gap: 2mm;
  }

  .layout-index .pdf-grid,
  .layout-archive .pdf-grid {
    grid-template-columns: repeat(8, 1fr);
  }

  .layout-technical .pdf-grid,
  .layout-architect .pdf-grid,
  .layout-capsule .pdf-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .layout-editorial .pdf-grid,
  .layout-magazine .pdf-grid,
  .layout-blocks .pdf-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .layout-gallery .pdf-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .layout-story .pdf-grid,
  .layout-portfolio .pdf-grid,
  .layout-proposal .pdf-grid,
  .layout-folio .pdf-grid,
  .layout-museum .pdf-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .layout-book .pdf-grid,
  .layout-dealer .pdf-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pdf-item {
    border-radius: 2mm;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .layout-book .pdf-item {
    grid-template-columns: 42% minmax(0, 1fr);
  }

  .layout-dealer .pdf-item {
    grid-template-columns: 26mm minmax(0, 1fr);
  }

  .pdf-thumb {
    height: 17mm;
    min-height: 0;
  }

  .pdf-thumb img {
    padding: 1mm;
  }

  .pdf-code-ribbon {
    left: 1mm;
    top: 1mm;
    max-width: calc(100% - 2mm);
    padding: 0.45mm 0.9mm;
    font-size: 3.2pt;
  }

  .pdf-quantity-ribbon {
    right: 1mm;
    bottom: 1mm;
    max-width: calc(100% - 2mm);
    padding: 0.45mm 0.9mm;
    font-size: 3.2pt;
  }

  .layout-dealer .pdf-code-ribbon {
    top: auto;
    bottom: 1mm;
  }

  .layout-compact .pdf-thumb {
    height: 14mm;
  }

  .layout-technical .pdf-thumb,
  .layout-architect .pdf-thumb,
  .layout-capsule .pdf-thumb,
  .layout-editorial .pdf-thumb,
  .layout-magazine .pdf-thumb,
  .layout-blocks .pdf-thumb {
    height: 20mm;
  }

  .layout-gallery .pdf-thumb,
  .layout-story .pdf-thumb,
  .layout-portfolio .pdf-thumb,
  .layout-proposal .pdf-thumb,
  .layout-folio .pdf-thumb,
  .layout-book .pdf-thumb,
  .layout-museum .pdf-thumb {
    height: 28mm;
  }

  .layout-dealer .pdf-thumb {
    height: 100%;
    min-height: 24mm;
  }

  .pdf-info {
    gap: 0.9mm;
    padding: 1.4mm;
  }

  .pdf-info h3 {
    min-height: 7.5mm;
    font-size: 4.9pt;
    line-height: 1.14;
  }

  .pdf-info p,
  .pdf-specs {
    font-size: 4pt;
    line-height: 1.18;
  }

  .pdf-item-number,
  .pdf-category-line {
    font-size: 3.8pt;
  }

  .pdf-specs {
    grid-template-columns: 1fr;
    gap: 0.45mm;
  }

  .pdf-footer {
    margin-top: 3mm;
    padding-top: 2mm;
    font-size: 5pt;
  }
}

/* CATALOG_PRODUCT_IMAGE_FIT_V1
   Urun kartlarinda gorseli kirpmadan, oranini koruyarak tam gosterir. */
.product-card {
  grid-template-rows: auto 1fr;
}

.product-card .product-image {
  aspect-ratio: 1 / 1;
  min-height: 0;
  background-color: #f7f4ed;
}

.product-card .product-image > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
