/* =========================
   PAGES — оформление страниц
   ========================= */

/* ---------- HERO ---------- */

.hero {
  padding: 80px 0 60px;
  text-align: center;
}

.hero h1 {
  font-size: 40px;
  font-weight: 700;
  margin-bottom: 14px;
}

.hero p {
  font-size: 18px;
  color: var(--color-text-muted);
  max-width: 720px;
  margin: 0 auto 36px;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- BUTTONS ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 500;
  border: 1px solid var(--color-border);
  cursor: pointer;
  background: #fff;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.button.primary {
  background-color: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.button.primary:hover {
  opacity: 0.95;
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

.button.secondary:hover {
  background-color: var(--color-bg-soft);
}

.button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ---------- CATEGORIES ---------- */

.categories-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.category-card {
  padding: 10px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 14px;
  background: #fff;
  transition: background 0.15s ease, border 0.15s ease;
}

.category-card:hover {
  background: var(--color-bg-soft);
  border-color: var(--color-primary);
}

/* ---------- CATALOG ---------- */

.catalog {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

/* ---------- CARD ---------- */

.card {
  display: block;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px;
  background-color: #fff;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  color: inherit;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.card-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
}

.card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.card .price {
  margin-top: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-primary);
}

/* ---------- ITEM PAGE ---------- */

.item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

/* ---------- GALLERY ---------- */

.item-gallery {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.item-main-image {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  background: #fafafa;
}

.item-thumbs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.item-thumb {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid var(--color-border);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border 0.15s ease;
}

.item-thumb:hover {
  transform: scale(1.05);
  border-color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.item-price {
  font-size: 26px;
  font-weight: 700;
  color: var(--color-primary);
  margin: 16px 0;
}

/* ---------- FORMS ---------- */

.form {
  max-width: 520px;
  margin: 0 auto;
}

.form label {
  display: block;
  margin-bottom: 14px;
  font-size: 14px;
}

.form input,
.form select,
.form textarea {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  font-size: 14px;
}

.form textarea {
  resize: vertical;
}

.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* ---------- PREVIEW MEDIA ---------- */

.preview-images {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.preview-images img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  cursor: pointer;
  background: #fafafa;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.preview-images img:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.preview-video {
  display: none;
  max-width: 100%;
  margin-top: 12px;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  background: #000;
}

/* ---------- PROFILE ---------- */

.profile {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
}

.profile-menu a {
  display: block;
  padding: 10px 0;
  color: var(--color-text-main);
}

.profile-menu a.active {
  font-weight: 600;
  color: var(--color-primary);
}

/* ---------- SELLER ---------- */

.seller-box {
  margin-top: 32px;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #fff;
}

/* ---------- ADMIN / DIALOGS ---------- */

.admin-box {
  border: 1px solid var(--color-border);
  padding: 20px;
  border-radius: var(--radius-md);
  background: #fff;
}

.dialog-item {
  margin-bottom: 12px;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.dialog-item:hover {
  background: var(--color-bg-soft);
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}

.dialog-item.unread {
  border-left: 4px solid var(--color-primary);
}

.dialog-preview {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- RESPONSIVE ---------- */

@media (max-width: 900px) {
  .item {
    grid-template-columns: 1fr;
  }
  .profile {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .hero h1 {
    font-size: 30px;
  }
  .preview-images img,
  .item-thumb {
    width: 80px;
    height: 80px;
  }
}
/* =========================
   CATALOG v3 / MEDIA / ADMIN
   ========================= */
.category-card.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(0,0,0,.10);
}

.catalog-toolbar {
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--color-bg) 92%, transparent);
}
.catalog-search-label { display:block; font-weight:600; margin-bottom:8px; }
.catalog-search-row { display:flex; gap:12px; flex-wrap:wrap; }
.catalog-search {
  flex:1 1 320px;
  min-width: 0;
  padding: 13px 14px;
  border:1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text-main);
}
.filter-hint { padding:8px 0; }
.catalog-empty {
  grid-column:1/-1;
  padding:32px;
  text-align:center;
  border:1px dashed var(--color-border);
  border-radius:14px;
  background:color-mix(in srgb, var(--color-bg) 92%, transparent);
}

.catalog-card { padding:0; overflow:hidden; background:color-mix(in srgb, var(--color-bg) 96%, transparent); }
.card-image-wrap { position:relative; aspect-ratio:4/3; overflow:hidden; background:var(--color-bg-soft); }
.catalog-card .card-img { height:100%; margin:0; border-radius:0; object-fit:cover; }
.card-body { padding:14px; }
.card-category { min-height:42px; }
.card-bottom { margin-top:12px; display:flex; justify-content:space-between; align-items:flex-end; gap:10px; }
.card-small { font-size:12px; color:var(--color-text-muted); text-align:right; }
.type-badge,
.photo-count {
  position:absolute;
  top:10px;
  padding:5px 9px;
  border-radius:999px;
  font-size:12px;
  font-weight:600;
  background:rgba(20,24,31,.76);
  color:#fff;
  backdrop-filter:blur(4px);
}
.type-badge { left:10px; }
.photo-count { right:10px; }
.free-price { color:var(--color-primary); font-weight:700; }

.sortable-preview { align-items:flex-start; }
.preview-image-card {
  position:relative;
  width:126px;
  padding:6px;
  border:1px solid var(--color-border);
  border-radius:12px;
  background:var(--color-bg);
}
.preview-image-card.is-main { border:2px solid var(--color-primary); }
.preview-image-card img { width:112px; height:94px; margin:0; border:0; border-radius:8px; }
.preview-image-badge { font-size:11px; font-weight:600; margin:5px 2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.preview-image-actions { display:grid; grid-template-columns:repeat(4,1fr); gap:3px; }
.preview-image-actions button {
  min-height:28px;
  border:1px solid var(--color-border);
  border-radius:6px;
  background:var(--color-bg-soft);
  color:var(--color-text-main);
}
.preview-image-actions button:hover { border-color:var(--color-primary); color:var(--color-primary); }
.media-help { font-size:12px; margin-top:8px; }

.item-main-wrap { position:relative; }
.item-main-image { min-height:320px; max-height:620px; object-fit:contain; }
.gallery-nav {
  position:absolute;
  top:50%; transform:translateY(-50%);
  width:42px; height:42px;
  border-radius:50%;
  background:rgba(20,24,31,.68);
  color:#fff;
  font-size:24px;
  display:flex; align-items:center; justify-content:center;
}
.gallery-nav.prev { left:12px; }
.gallery-nav.next { right:12px; }
.gallery-counter {
  position:absolute; right:12px; bottom:12px;
  background:rgba(20,24,31,.70); color:#fff;
  border-radius:999px; padding:5px 10px; font-size:12px;
}
.item-thumb.active { border:2px solid var(--color-primary); box-shadow:0 0 0 2px color-mix(in srgb, var(--color-primary) 20%, transparent); }

.admin-manager-grid { display:grid; grid-template-columns:1fr 1fr 1fr; gap:18px; margin-top:18px; }
.admin-manager-column { border:1px solid var(--color-border); border-radius:12px; background:var(--color-bg); padding:14px; min-width:0; }
.admin-manager-list { display:flex; flex-direction:column; gap:8px; margin-top:10px; }
.admin-manage-row { display:flex; align-items:center; gap:6px; padding:8px; border:1px solid var(--color-border); border-radius:8px; background:var(--color-bg-soft); }
.admin-manage-row.selected { border-color:var(--color-primary); box-shadow:0 0 0 1px var(--color-primary); }
.admin-manage-label { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.admin-manage-actions { display:flex; gap:4px; flex-wrap:wrap; }
.admin-mini-btn { border:1px solid var(--color-border); border-radius:6px; padding:4px 7px; background:var(--color-bg); color:var(--color-text-main); }
.admin-mini-btn:hover { border-color:var(--color-primary); color:var(--color-primary); }
.admin-add-row { display:flex; gap:8px; margin-top:10px; }
.admin-add-row input { flex:1; min-width:0; }
.admin-type-row { display:grid; grid-template-columns:minmax(140px,1fr) 150px auto; gap:8px; align-items:center; padding:9px; border-bottom:1px solid var(--color-border); }
.theme-settings { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; max-width:760px; }
.theme-settings label { display:flex; flex-direction:column; gap:7px; font-size:14px; }
.theme-settings input,
.theme-settings select { padding:10px; border:1px solid var(--color-border); border-radius:8px; background:var(--color-bg); color:var(--color-text-main); }
.theme-preview { min-height:130px; border:1px solid var(--color-border); border-radius:12px; margin-top:18px; padding:18px; background:var(--color-bg-soft); }

:root[data-theme="dark"] .card,
:root[data-theme="dark"] .seller-box,
:root[data-theme="dark"] .admin-box,
:root[data-theme="dark"] .category-card,
:root[data-theme="dark"] .catalog-toolbar,
:root[data-theme="dark"] .admin-manager-column,
:root[data-theme="dark"] .preview-image-card { background:#20242a; color:var(--color-text-main); }

@media (max-width:900px) {
  .admin-manager-grid { grid-template-columns:1fr; }
}
@media (max-width:600px) {
  .catalog-search-row { flex-direction:column; }
  .card-bottom { align-items:flex-start; flex-direction:column; }
  .card-small { text-align:left; }
  .theme-settings { grid-template-columns:1fr; }
  .preview-image-card { width:112px; }
  .preview-image-card img { width:98px; height:84px; }
}


/* =========================================================
   MARKETPLACE PHOTO EXPERIENCE — OLX/Allegro/Amazon inspired
   ========================================================= */
.add-listing-form { max-width: 900px; }
.add-listing-form [hidden], .my-item-manage[hidden] { display:none !important; }
.listing-upload-status { display:grid; gap:8px; margin:10px 0; }
.listing-upload-status progress { width:100%; }
.photo-manager {
  margin: 20px 0 22px;
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: color-mix(in srgb, var(--color-bg) 94%, var(--color-bg-soft));
}
.photo-manager-head { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin-bottom:14px; }
.photo-manager-head h3 { margin:0 0 4px; }
.photo-manager-subtitle { margin:0; font-size:13px; }
.photo-count-chip {
  flex:0 0 auto; min-width:58px; text-align:center; padding:7px 10px;
  border:1px solid var(--color-border); border-radius:999px; font-weight:700;
  background:var(--color-bg-soft);
}
.photo-dropzone {
  min-height:150px; display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:7px; padding:22px; border:2px dashed var(--color-border); border-radius:14px;
  background:var(--color-bg-soft); cursor:pointer; text-align:center;
  transition:border-color .16s ease, background .16s ease, transform .16s ease;
}
.photo-dropzone:hover, .photo-dropzone:focus, .photo-dropzone.drag-over {
  outline:none; border-color:var(--color-primary);
  background:color-mix(in srgb, var(--color-primary) 7%, var(--color-bg));
}
.photo-dropzone.drag-over { transform:scale(1.01); }
.photo-dropzone.is-loading { opacity:.72; pointer-events:none; }
.photo-dropzone.is-loading::after { content:attr(data-processing-label); font-size:12px; font-weight:700; }
.photo-dropzone.is-full { opacity:.58; cursor:default; }
.photo-drop-icon { font-size:36px; line-height:1; }
.photo-choose-btn { margin-top:6px; }
.marketplace-photo-grid {
  display:grid; grid-template-columns:repeat(5, minmax(110px, 1fr)); gap:12px; margin-top:16px;
}
.marketplace-photo-grid .preview-image-card {
  width:auto; padding:6px; border-radius:12px; background:var(--color-bg);
  box-shadow:0 2px 9px rgba(0,0,0,.06); transition:transform .15s ease, border-color .15s ease;
}
.marketplace-photo-grid .preview-image-card:first-child { grid-column:span 2; grid-row:span 2; }
.marketplace-photo-grid .preview-image-card.is-main { border:2px solid var(--color-primary); }
.marketplace-photo-grid .preview-image-card.is-dragging { opacity:.45; transform:scale(.97); }
.marketplace-photo-grid .preview-image-card.drag-over { border-color:var(--color-primary); box-shadow:0 0 0 2px color-mix(in srgb, var(--color-primary) 20%, transparent); }
.preview-image-photo { position:relative; aspect-ratio:4/3; overflow:hidden; border-radius:9px; background:var(--color-bg-soft); }
.marketplace-photo-grid .preview-image-card img { width:100%; height:100%; object-fit:cover; border:0; border-radius:0; }
.preview-image-badge {
  position:absolute; left:7px; bottom:7px; margin:0; padding:4px 7px; border-radius:7px;
  background:rgba(20,24,31,.74); color:#fff; font-size:11px; font-weight:700;
}
.preview-drag-hint {
  position:absolute; right:7px; top:7px; padding:3px 6px; border-radius:7px;
  background:rgba(20,24,31,.62); color:#fff; font-size:14px; cursor:grab;
}
.preview-image-actions { margin-top:6px; }
.preview-image-actions button:disabled { opacity:.35; cursor:not-allowed; }

.item { grid-template-columns:minmax(0, 1.35fr) minmax(300px, .65fr); gap:34px; align-items:start; }
.marketplace-gallery { min-width:0; }
.item-gallery-layout { display:grid; grid-template-columns:86px minmax(0,1fr); gap:12px; align-items:start; }
.item-thumb-rail {
  display:flex; flex-direction:column; flex-wrap:nowrap; gap:9px; max-height:620px;
  overflow:auto; scrollbar-width:thin; padding:1px 3px 1px 1px;
}
.item-thumb-button { padding:0; border:0; background:transparent; border-radius:9px; }
.item-thumb-button .item-thumb { width:76px; height:76px; border-radius:9px; display:block; }
.item-main-wrap {
  position:relative; min-height:460px; height:min(62vw, 620px); max-height:620px;
  border:1px solid var(--color-border); border-radius:14px; overflow:hidden;
  background:color-mix(in srgb, var(--color-bg-soft) 88%, #fff);
  display:flex; align-items:center; justify-content:center;
}
.item-main-image {
  width:100%; height:100%; min-height:0; max-height:none; object-fit:contain;
  border:0; border-radius:0; background:transparent; cursor:zoom-in;
}
.gallery-zoom {
  position:absolute; top:12px; right:12px; width:40px; height:40px; border:0; border-radius:50%;
  background:rgba(20,24,31,.68); color:#fff; font-size:20px; display:flex; align-items:center; justify-content:center;
}
.gallery-nav { border:0; z-index:2; }
.gallery-counter { z-index:2; }
.gallery-lightbox[hidden] { display:none; }
.gallery-lightbox {
  position:fixed; inset:0; z-index:9999; background:rgba(8,10,14,.94);
  display:flex; align-items:center; justify-content:center; padding:42px 70px;
}
.lightbox-image { max-width:100%; max-height:100%; object-fit:contain; user-select:none; }
.lightbox-close, .lightbox-nav {
  position:absolute; border:0; color:#fff; background:rgba(255,255,255,.12);
  display:flex; align-items:center; justify-content:center; cursor:pointer;
}
.lightbox-close { top:18px; right:20px; width:46px; height:46px; border-radius:50%; font-size:32px; }
.lightbox-nav { top:50%; transform:translateY(-50%); width:52px; height:70px; border-radius:12px; font-size:38px; }
.lightbox-nav.prev { left:14px; }
.lightbox-nav.next { right:14px; }
.lightbox-counter {
  position:absolute; left:50%; bottom:18px; transform:translateX(-50%);
  color:#fff; background:rgba(255,255,255,.12); padding:7px 12px; border-radius:999px; font-weight:700;
}
body.lightbox-open { overflow:hidden; }
.photo-preview-dialog{border:0;border-radius:14px;padding:12px;background:#151820;color:white;max-width:95vw;max-height:95dvh;}
.photo-preview-dialog::backdrop{background:rgba(0,0,0,.85);}
.photo-preview-dialog img{display:block;max-width:90vw;max-height:78dvh;object-fit:contain;}
.photo-preview-dialog .button{margin-top:12px;}
.generated-preview{padding:12px;border:1px solid var(--border,#dde2ed);border-radius:12px;margin-top:8px;}
.generated-preview p{white-space:pre-wrap;}
.generated-preview button{margin:4px;}
.preview-image-photo img,.item-main-image,.gallery-lightbox button{-webkit-tap-highlight-color:transparent;}

@media (max-width: 900px) {
  .marketplace-photo-grid { grid-template-columns:repeat(3, minmax(95px,1fr)); }
  .item { grid-template-columns:1fr; }
  .item-gallery-layout { grid-template-columns:1fr; }
  .item-thumb-rail { order:2; flex-direction:row; max-height:none; overflow-x:auto; overflow-y:hidden; padding-bottom:4px; }
  .item-thumb-button .item-thumb { width:68px; height:68px; }
  .item-main-wrap { min-height:360px; height:min(75vw, 560px); }
}
@media (max-width: 560px) {
  .photo-manager { padding:12px; }
  .photo-manager-head { gap:10px; }
  .marketplace-photo-grid { grid-template-columns:repeat(2, minmax(0,1fr)); gap:9px; }
  .marketplace-photo-grid .preview-image-card:first-child { grid-column:span 2; grid-row:auto; }
  .photo-dropzone { min-height:135px; padding:16px; }
  .item-main-wrap { min-height:280px; height:78vw; border-radius:10px; }
  .gallery-lightbox { padding:55px 8px 48px; }
  .lightbox-nav { width:44px; height:60px; }
  .lightbox-nav.prev { left:4px; }
  .lightbox-nav.next { right:4px; }
}


/* ================= LOCATION PICKER ================= */
.location-picker-section {
  margin: 10px 0 4px;
  padding: 18px;
  border: 1px solid var(--border, #d9dee7);
  border-radius: 14px;
  background: rgba(255,255,255,.55);
}
.location-picker-section h3, .catalog-location-filter h2 { margin-top: 0; }
.location-help { margin: -4px 0 14px; }
.location-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}
.location-grid label { margin: 0; }
.location-grid select, .location-grid input { width: 100%; }
.location-custom-input { margin-top: 8px; }
.location-custom-input[hidden] { display: none !important; }
.catalog-location-filter {
  padding: 18px;
  border: 1px solid var(--border, #d9dee7);
  border-radius: 14px;
}
@media (max-width: 760px) {
  .location-grid { grid-template-columns: 1fr; }
}


/* =========================
   PRODUCT PARAMETERS — v9
   ========================= */
.product-attributes-section,
.item-specs-section {
  margin: 22px 0;
  padding: 18px;
  border: 1px solid var(--color-border, #dfe3e8);
  border-radius: 14px;
  background: color-mix(in srgb, var(--color-surface, #fff) 94%, var(--color-primary, #2563eb) 6%);
}
.product-attributes-section[hidden], .item-specs-section[hidden] { display:none !important; }
.product-attributes-section h3, .item-specs-section h3 { margin:0 0 6px; }
.attributes-help { margin:0 0 14px; font-size:13px; }
.spec-form-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.spec-field { margin:0; display:flex; flex-direction:column; gap:6px; }
.spec-label { font-size:13px; font-weight:700; }
.spec-field input, .spec-field select { width:100%; }
.item-specs-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 24px; }
.item-spec-row { display:flex; align-items:baseline; justify-content:space-between; gap:18px; padding:10px 0; border-bottom:1px solid var(--color-border,#e6e8eb); }
.item-spec-key { color:var(--color-muted,#667085); font-size:14px; }
.item-spec-value { text-align:right; font-size:14px; overflow-wrap:anywhere; }
.catalog-spec-summary { margin:6px 0 0; font-size:13px; font-weight:700; opacity:.85; }
@media (max-width:900px){ .spec-form-grid{grid-template-columns:repeat(2,minmax(0,1fr));} }
@media (max-width:620px){ .spec-form-grid,.item-specs-grid{grid-template-columns:1fr;} .product-attributes-section,.item-specs-section{padding:14px;} }

/* =========================
   v10 — dynamic product filters / admin parameters / theme controls
   ========================= */
.catalog-spec-filter {
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--color-bg) 94%, transparent);
}
.catalog-spec-filter-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}
.catalog-spec-filter-head h2 { margin-top: 0; }
.catalog-spec-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.catalog-spec-filter-field { display: grid; gap: 6px; font-weight: 600; }
.catalog-spec-filter-field input,
.catalog-spec-filter-field select {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text-main);
}
.range-filter-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.attribute-scope-grid,
.attribute-editor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.attribute-scope-grid label,
.attribute-editor-grid label { display: grid; gap: 6px; font-weight: 600; }
.attribute-scope-grid input,
.attribute-scope-grid select,
.attribute-editor-grid input,
.attribute-editor-grid select {
  width: 100%; padding: 10px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-bg); color: var(--color-text-main);
}
.attribute-options-wide { grid-column: span 2; }
.check-row { display: flex !important; align-items: center; gap: 8px !important; font-weight: 500 !important; }
.check-row input { width: auto !important; }
.admin-attribute-list { display: grid; gap: 8px; margin-top: 12px; }
.admin-attribute-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  border: 1px solid var(--color-border); border-radius: 10px; padding: 10px 12px;
  background: color-mix(in srgb, var(--color-bg) 96%, transparent);
}
.theme-settings {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.theme-settings label { display: grid; gap: 6px; font-weight: 600; }
.theme-settings input,
.theme-settings select { width: 100%; padding: 10px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-bg); color: var(--color-text-main); }
.theme-settings input[type="color"] { min-height: 44px; padding: 4px; }
.theme-preview { margin-top: 18px; padding: 18px; border: 1px solid var(--color-border); border-radius: 12px; background: color-mix(in srgb, var(--color-bg) 92%, transparent); }

:root[data-theme="dark"] .admin-box,
:root[data-theme="dark"] .seller-box { background: var(--color-bg-soft); }

@media (max-width: 900px) {
  .catalog-spec-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .attribute-scope-grid, .attribute-editor-grid, .theme-settings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .catalog-spec-filter-grid,
  .attribute-scope-grid,
  .attribute-editor-grid,
  .theme-settings { grid-template-columns: 1fr; }
  .attribute-options-wide { grid-column: auto; }
  .admin-attribute-row { align-items: flex-start; flex-direction: column; }
}

/* ---------- LINKED BRAND / MODEL SELECTS — v11 ---------- */
.linked-product-select { width:100%; }
.linked-product-select:disabled { opacity:.65; cursor:not-allowed; }
.linked-other-input { margin-top:8px; }

/* ---------- PERSONAL PROFILE APPEARANCE — v11 ---------- */
.profile-settings-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:18px; margin-top:20px; }
.personal-color-card { padding:18px; border:1px solid var(--color-border); border-radius:14px; background:color-mix(in srgb,var(--color-bg) 96%,transparent); }
.personal-color-swatches { display:flex; flex-wrap:wrap; gap:10px; margin:14px 0; }
.personal-color-swatch { width:38px; height:38px; border-radius:50%; border:3px solid transparent; box-shadow:0 0 0 1px var(--color-border); cursor:pointer; }
.personal-color-swatch.active { border-color:#fff; box-shadow:0 0 0 3px var(--color-text-main); }
.personal-color-preview { margin-top:16px; padding:16px; border-radius:12px; border:1px solid var(--color-border); background:var(--color-bg-soft); }
.personal-color-preview .button { margin-top:8px; }
.profile-settings-actions { display:flex; gap:10px; flex-wrap:wrap; margin-top:20px; }

/* =========================
   v13 — smart model presets / favorites / compare
   ========================= */
.smart-model-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1.2fr);
  gap: 12px 16px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--color-primary) 35%, var(--color-border));
  border-radius: 12px;
  background: color-mix(in srgb, var(--color-primary) 7%, var(--color-bg));
}
.smart-model-title { display:grid; gap:3px; }
.smart-model-title span, .smart-model-note { color:var(--color-text-muted); font-size:12px; line-height:1.45; }
.smart-preset-select { width:100%; padding:10px; border:1px solid var(--color-border); border-radius:var(--radius-md); background:var(--color-bg); color:var(--color-text-main); }
.smart-model-note { grid-column:1 / -1; }

.catalog-search-row { align-items:center; flex-wrap:wrap; }
.catalog-sort { min-width:210px; padding:10px 12px; border:1px solid var(--color-border); border-radius:var(--radius-md); background:var(--color-bg); color:var(--color-text-main); }
.marketplace-card { overflow:hidden; }
.catalog-card-link { display:block; color:inherit; text-decoration:none; }
.market-card-actions { display:flex; gap:8px; padding:10px 12px 12px; border-top:1px solid var(--color-border); background:color-mix(in srgb,var(--color-bg) 96%, transparent); }
.market-action { flex:1; min-width:0; border:1px solid var(--color-border); background:var(--color-bg); color:var(--color-text-main); border-radius:9px; padding:8px 10px; cursor:pointer; font-weight:700; font-size:12px; }
.market-action:hover { border-color:var(--color-primary); color:var(--color-primary); }
.market-action.active { border-color:var(--color-primary); color:var(--color-primary); background:color-mix(in srgb,var(--color-primary) 8%,var(--color-bg)); }
.item-market-actions { display:flex; gap:10px; flex-wrap:wrap; margin:14px 0 18px; }
.item-market-actions .button.active { border-color:var(--color-primary); color:var(--color-primary); background:color-mix(in srgb,var(--color-primary) 8%,var(--color-bg)); }

.market-page-head { display:flex; justify-content:space-between; align-items:flex-start; gap:18px; flex-wrap:wrap; }
.market-page-head h1 { margin-bottom:6px; }
.market-head-actions { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.compare-diff-toggle { display:flex; gap:8px; align-items:center; margin:22px 0 14px; font-weight:600; }
.compare-scroll { overflow-x:auto; padding-bottom:8px; }
.compare-table { width:100%; min-width:760px; border-collapse:separate; border-spacing:0; border:1px solid var(--color-border); border-radius:14px; overflow:hidden; background:color-mix(in srgb,var(--color-bg) 96%,transparent); }
.compare-table th, .compare-table td { min-width:180px; padding:12px 14px; border-right:1px solid var(--color-border); border-bottom:1px solid var(--color-border); vertical-align:top; text-align:left; }
.compare-table th:first-child, .compare-table td:first-child { min-width:190px; position:sticky; left:0; z-index:1; background:var(--color-bg-soft); }
.compare-table tr:last-child th, .compare-table tr:last-child td { border-bottom:0; }
.compare-table th:last-child, .compare-table td:last-child { border-right:0; }
.compare-table tbody tr.is-different td { background:color-mix(in srgb,var(--color-primary) 5%,var(--color-bg)); }
.compare-product-head { display:grid; gap:8px; position:relative; }
.compare-product-head img { width:100%; height:120px; object-fit:cover; border-radius:9px; background:var(--color-bg-soft); }
.compare-product-head a { color:var(--color-text-main); font-weight:800; text-decoration:none; padding-right:28px; }
.compare-remove { position:absolute; top:0; right:0; width:28px; height:28px; border-radius:50%; border:1px solid var(--color-border); background:var(--color-bg); color:var(--color-text-main); cursor:pointer; font-size:18px; line-height:1; }
.compare-param-head { font-size:13px; color:var(--color-text-muted); }

@media (max-width:700px){
  .smart-model-panel { grid-template-columns:1fr; }
  .smart-model-note { grid-column:auto; }
  .catalog-sort { width:100%; }
  .market-card-actions { flex-direction:column; }
  .item-market-actions .button { flex:1 1 145px; text-align:center; }
}

/* =========================
   v14 — LiberBot site assistant
   ========================= */
.liberbot{position:fixed;right:22px;bottom:22px;z-index:2200;font-family:inherit;}
.liberbot-launcher{height:56px;min-width:56px;padding:0 17px;border:0;border-radius:999px;background:var(--color-primary);color:#fff;box-shadow:0 12px 34px rgba(0,0,0,.22);display:flex;align-items:center;gap:9px;cursor:pointer;font-weight:800;font-size:14px;transition:transform .18s ease,box-shadow .18s ease;}
.liberbot-launcher:hover{transform:translateY(-2px);box-shadow:0 15px 38px rgba(0,0,0,.28);}
.liberbot-launcher-icon{font-size:24px;line-height:1;}
.liberbot-panel{position:absolute;right:0;bottom:70px;width:min(390px,calc(100vw - 28px));height:min(620px,calc(100vh - 115px));background:color-mix(in srgb,var(--color-bg) 98%,transparent);border:1px solid var(--color-border);border-radius:18px;box-shadow:0 22px 55px rgba(0,0,0,.25);overflow:hidden;display:grid;grid-template-rows:auto 1fr auto auto;opacity:0;transform:translateY(14px) scale(.98);pointer-events:none;transition:opacity .18s ease,transform .18s ease;backdrop-filter:blur(16px);}
.liberbot.is-open .liberbot-panel{opacity:1;transform:none;pointer-events:auto;}
.liberbot.is-open .liberbot-launcher{box-shadow:0 8px 24px rgba(0,0,0,.20);}
.liberbot-head{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 15px;background:linear-gradient(135deg,var(--color-primary),color-mix(in srgb,var(--color-primary) 70%,#111));color:#fff;}
.liberbot-head strong{display:block;font-size:15px;}.liberbot-head small{display:block;margin-top:2px;opacity:.82;font-size:11px;}
.liberbot-head-actions{display:flex;gap:5px;}.liberbot-head-actions button{width:32px;height:32px;border:0;border-radius:9px;background:rgba(255,255,255,.14);color:#fff;font-size:20px;cursor:pointer;}.liberbot-head-actions button:hover{background:rgba(255,255,255,.24);}
.liberbot-body{padding:14px;overflow:auto;display:flex;flex-direction:column;gap:9px;scroll-behavior:smooth;}
.liberbot-row{display:flex}.liberbot-row.user{justify-content:flex-end}.liberbot-row.bot{justify-content:flex-start}
.liberbot-bubble{max-width:84%;padding:10px 12px;border-radius:14px;font-size:13px;line-height:1.45;white-space:pre-wrap;overflow-wrap:anywhere;}
.liberbot-row.bot .liberbot-bubble{background:var(--color-bg-soft);border:1px solid var(--color-border);border-bottom-left-radius:5px;color:var(--color-text-main);}
.liberbot-row.user .liberbot-bubble{background:var(--color-primary);color:#fff;border-bottom-right-radius:5px;}
.liberbot-link-row{display:flex;gap:7px;flex-wrap:wrap;margin:0 0 5px 0;}
.liberbot-action{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:7px 10px;border:1px solid color-mix(in srgb,var(--color-primary) 45%,var(--color-border));border-radius:9px;text-decoration:none;color:var(--color-primary);background:color-mix(in srgb,var(--color-primary) 6%,var(--color-bg));font-size:12px;font-weight:750;}
.liberbot-action:hover{background:color-mix(in srgb,var(--color-primary) 12%,var(--color-bg));}
.liberbot-result{display:grid;grid-template-columns:58px 1fr;gap:10px;align-items:center;padding:8px;border:1px solid var(--color-border);border-radius:11px;background:var(--color-bg);text-decoration:none;color:var(--color-text-main);}
.liberbot-result:hover{border-color:var(--color-primary);}.liberbot-result img{width:58px;height:48px;object-fit:cover;border-radius:7px;background:var(--color-bg-soft);margin:0;}.liberbot-result-text{min-width:0;display:grid;gap:3px}.liberbot-result-text strong{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.liberbot-result-text small{font-size:11px;color:var(--color-text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.liberbot-quick-box{display:flex;gap:6px;overflow-x:auto;padding:9px 12px;border-top:1px solid var(--color-border);scrollbar-width:thin;background:color-mix(in srgb,var(--color-bg) 97%,transparent);}
.liberbot-quick{flex:0 0 auto;border:1px solid var(--color-border);border-radius:999px;background:var(--color-bg);color:var(--color-text-main);padding:7px 9px;font-size:11px;font-weight:700;cursor:pointer;}.liberbot-quick:hover{border-color:var(--color-primary);color:var(--color-primary);}
.liberbot-form{display:grid;grid-template-columns:1fr 42px;gap:7px;padding:10px 12px 12px;border-top:1px solid var(--color-border);background:var(--color-bg);}
.liberbot-input{width:100%;min-width:0;border:1px solid var(--color-border);border-radius:11px;padding:10px 11px;background:var(--color-bg);color:var(--color-text-main);font-size:13px;outline:none;}.liberbot-input:focus{border-color:var(--color-primary);box-shadow:0 0 0 3px color-mix(in srgb,var(--color-primary) 13%,transparent);}
.liberbot-send{border:0;border-radius:11px;background:var(--color-primary);color:#fff;font-size:18px;cursor:pointer;}.liberbot-send:hover{filter:brightness(.96)}
@media(max-width:640px){.liberbot{right:12px;bottom:12px}.liberbot-launcher{min-width:54px;height:54px;padding:0 14px}.liberbot-launcher-label{display:none}.liberbot-panel{right:0;bottom:64px;width:calc(100vw - 24px);height:min(72vh,610px);border-radius:16px}.liberbot-bubble{max-width:90%;}}

/* v16 — catalog price filters from LiberBot */
.catalog-price {
  width: 135px;
  min-width: 120px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text-main);
}
@media (max-width:700px){ .catalog-price { width:100%; } }
.catalog-currency {
  min-width: 110px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text-main);
}
@media (max-width:700px){ .catalog-currency { width:100%; } }


/* =========================
   v19 — checkout / orders
   ========================= */
.checkout-head,.orders-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;flex-wrap:wrap;margin-bottom:24px}.checkout-head h1,.orders-head h1{margin-bottom:6px}.checkout-layout{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(280px,.75fr);gap:24px;align-items:start}.checkout-form{display:grid;gap:18px}.checkout-section{border:1px solid var(--color-border);border-radius:14px;background:color-mix(in srgb,var(--color-bg) 97%,transparent);padding:18px}.checkout-section h2{font-size:18px;margin:0 0 14px}.checkout-grid{display:grid;gap:14px}.checkout-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.checkout-grid label,.checkout-section>label{display:grid;gap:7px;font-size:14px;font-weight:600}.checkout-grid input,.checkout-section textarea{width:100%;padding:11px 12px;border:1px solid var(--color-border);border-radius:9px;background:var(--color-bg);color:var(--color-text-main)}.checkout-span-2{grid-column:1/-1}.delivery-options{display:grid;gap:10px;margin-bottom:16px}.checkout-choice{display:flex!important;align-items:flex-start;gap:10px;padding:12px;border:1px solid var(--color-border);border-radius:10px;background:var(--color-bg);cursor:pointer}.checkout-choice:has(input:checked){border-color:var(--color-primary);box-shadow:0 0 0 1px var(--color-primary);background:color-mix(in srgb,var(--color-primary) 5%,var(--color-bg))}.checkout-choice input{margin-top:3px}.checkout-choice span{display:grid;gap:2px}.checkout-choice small{font-weight:400;color:var(--color-text-muted)}.checkout-choice.disabled{opacity:.58;cursor:not-allowed}.checkout-save-address,.checkout-confirm{display:flex!important;grid-template-columns:none!important;align-items:flex-start;gap:9px;font-weight:500!important;margin-top:14px}.checkout-summary{position:sticky;top:18px;border:1px solid var(--color-border);border-radius:14px;background:var(--color-bg);padding:18px}.checkout-summary h2{margin:0 0 16px}.checkout-product{display:grid;grid-template-columns:92px 1fr;gap:12px;align-items:center;padding-bottom:16px;border-bottom:1px solid var(--color-border)}.checkout-product img{width:92px;height:76px;object-fit:cover;border-radius:9px;background:var(--color-bg-soft)}.checkout-total{display:flex;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid var(--color-border)}.checkout-total.total{font-size:18px;border-bottom:0}.checkout-note{font-size:12px;line-height:1.5}.checkout-submit{min-height:48px;font-size:16px}.checkout-error{margin:0;padding:11px 13px;border:1px solid #d14343;border-radius:9px;background:color-mix(in srgb,#d14343 8%,var(--color-bg));color:#b42318}.order-created-notice{margin:0 0 18px;padding:13px 15px;border:1px solid color-mix(in srgb,#2f855a 45%,var(--color-border));border-radius:10px;background:color-mix(in srgb,#2f855a 8%,var(--color-bg));font-weight:700}.orders-tabs{display:flex;gap:10px;flex-wrap:wrap;margin:18px 0}.orders-tabs .active{border-color:var(--color-primary);color:var(--color-primary);background:color-mix(in srgb,var(--color-primary) 8%,var(--color-bg))}.orders-list{display:grid;gap:16px}.order-card{border:1px solid var(--color-border);border-radius:14px;background:var(--color-bg);padding:16px}.order-card-top{display:flex;justify-content:space-between;gap:12px;align-items:center;border-bottom:1px solid var(--color-border);padding-bottom:12px;margin-bottom:14px}.order-number{font-weight:800;margin-right:10px}.order-status{display:inline-flex;padding:4px 8px;border-radius:999px;background:var(--color-bg-soft);font-size:12px;font-weight:700}.status-new{color:#8a5b00}.status-confirmed{color:#1261a0}.status-shipped{color:#7c3aed}.status-completed{color:#2f855a}.status-cancelled{color:#b42318}.order-product{display:grid;grid-template-columns:110px 1fr;gap:14px;align-items:center}.order-product img{width:110px;height:88px;object-fit:cover;border-radius:10px;background:var(--color-bg-soft)}.order-product a{text-decoration:none;color:var(--color-text-main)}.order-price{font-size:18px;font-weight:800;margin-top:6px}.order-details{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:16px}.order-details>div{display:grid;gap:4px;padding:11px;border-radius:10px;background:var(--color-bg-soft)}.order-details span,.order-details small{font-size:12px;color:var(--color-text-muted)}.order-comment{margin-top:12px;padding:10px 12px;border-left:3px solid var(--color-primary);background:var(--color-bg-soft)}.order-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}
@media(max-width:850px){.checkout-layout{grid-template-columns:1fr}.checkout-summary{position:static;order:-1}.order-details{grid-template-columns:1fr}}
@media(max-width:600px){.checkout-grid.two{grid-template-columns:1fr}.checkout-span-2{grid-column:auto}.order-product{grid-template-columns:82px 1fr}.order-product img{width:82px;height:72px}.order-card-top{align-items:flex-start;flex-direction:column}}


/* =========================
   v21 — login convenience
   ========================= */
.password-field { position:relative; display:flex; align-items:center; }
.password-field input { width:100%; padding-right:52px; }
.password-toggle {
  position:absolute; right:8px; top:50%; transform:translateY(-50%);
  width:38px; height:38px; padding:0; border:0; border-radius:9px;
  background:transparent; color:var(--color-text-main); cursor:pointer; font-size:18px;
}
.password-toggle:hover, .password-toggle:focus-visible {
  background:var(--color-bg-soft); outline:2px solid color-mix(in srgb,var(--color-primary) 30%,transparent);
}
.form .login-remember-row {
  display:flex; flex-direction:row; align-items:flex-start; gap:10px; margin-top:2px; cursor:pointer;
}
.form .login-remember-row input { width:18px; height:18px; margin-top:2px; flex:0 0 auto; }
.login-remember-row span { display:grid; gap:2px; }
.login-remember-row small { color:var(--color-text-muted); font-weight:400; line-height:1.35; }

/* v21.1 — login clarity and local password recovery */
.login-help-links { margin-top:16px; display:flex; flex-direction:column; gap:8px; }
.login-help-links > a { font-weight:700; }
.password-reset-note { font-size:13px; line-height:1.5; margin-top:10px; }
.reset-ok { color:var(--color-primary) !important; font-weight:700; }

/* LiberCom v21.6 — price currency + personal preferences */
.price-entry-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(130px,190px) minmax(150px,220px);gap:14px;align-items:end}
.price-entry-grid label{margin:0}
.price-currency-help{margin:8px 0 0;font-size:.9rem}
.header-currency-picker{display:inline-flex;align-items:center;gap:6px;margin-right:8px;font-size:.82rem;color:var(--color-text-muted)}
.header-currency-picker select{width:auto;min-width:82px;padding:7px 8px;border:1px solid var(--color-border);border-radius:10px;background:var(--color-bg);color:var(--color-text-main)}
@media(max-width:720px){.price-entry-grid{grid-template-columns:1fr 120px 1fr}.header-currency-picker span{display:none}.header-currency-picker{margin-right:2px}.header-currency-picker select{min-width:76px;padding:6px}}


/* LiberCom v21.7 — mobile form feedback */
.liber-form-notice{
  margin:14px 0;padding:13px 15px;border-radius:12px;font-weight:700;line-height:1.35;
  background:rgba(24,119,242,.10);border:1px solid rgba(24,119,242,.28);color:var(--color-text,#1d2433);
}
.liber-form-notice.error{background:rgba(200,35,51,.10);border-color:rgba(200,35,51,.45);color:#8f1724;}
.liber-form-notice.success{background:rgba(20,140,75,.10);border-color:rgba(20,140,75,.38);color:#126b3c;}
.liber-field-error input,.liber-field-error select,.liber-field-error textarea,
input.liber-field-error,select.liber-field-error,textarea.liber-field-error{
  border-color:#c82333!important;box-shadow:0 0 0 3px rgba(200,35,51,.12)!important;
}
@media(max-width:700px){
  .liber-form-notice{font-size:16px;margin:12px 0;}
  #saveItemBtn{width:100%;min-height:50px;font-size:17px;}
}

/* v21.9 — smart content helper and breed reference card */
.content-helper-section{
  margin:18px 0;
  padding:16px;
  border:1px solid rgba(110,120,150,.20);
  border-radius:16px;
  background:rgba(255,255,255,.52);
}
.content-helper-section h3{margin:0 0 6px;font-size:1.05rem}
.content-helper-section p{margin:0 0 12px}
.content-helper-section label{margin:0}
.content-helper-section select{width:100%}
.breed-info-card{
  margin:18px 0;
  padding:18px;
  border:1px solid rgba(80,120,110,.24);
  border-radius:18px;
  background:rgba(255,255,255,.62);
}
.breed-info-head{display:flex;gap:12px;justify-content:space-between;align-items:flex-start;margin-bottom:12px}
.breed-info-head h3{margin:2px 0 0;font-size:1.15rem}
.breed-info-kicker{font-size:.78rem;text-transform:uppercase;letter-spacing:.06em;opacity:.7}
.breed-info-badge{white-space:nowrap;padding:6px 10px;border-radius:999px;background:rgba(60,110,95,.12);font-size:.82rem;font-weight:700}
.breed-info-body{display:grid;gap:9px}
.breed-info-row{display:grid;grid-template-columns:minmax(135px,190px) 1fr;gap:14px;padding:9px 0;border-bottom:1px solid rgba(0,0,0,.07)}
.breed-info-row:last-child{border-bottom:0}
.breed-info-row strong{font-size:.92rem}
.breed-info-row span{line-height:1.45}
.breed-info-source{margin:12px 0 0;font-size:.82rem}
.breed-info-note{margin:6px 0 0;font-size:.82rem}
@media(max-width:700px){
  .content-helper-section,.breed-info-card{padding:14px;border-radius:14px}
  .breed-info-head{display:block}
  .breed-info-badge{display:inline-block;margin-top:8px}
  .breed-info-row{grid-template-columns:1fr;gap:4px}
}

.content-auto-btn{margin-top:10px;width:auto;max-width:100%}
@media(max-width:700px){.content-auto-btn{width:100%;min-height:46px}}

/* =========================
   v21.11 — structured item page
   ========================= */
.item-price-card {
  margin: 16px 0 18px;
  padding: 16px 18px;
  border: 1px solid color-mix(in srgb, var(--color-primary) 28%, var(--color-border));
  border-radius: 14px;
  background: color-mix(in srgb, var(--color-primary) 6%, var(--color-bg));
}
.item-price-card .item-price { margin: 0; }
.item-price-meta { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.item-price-meta span {
  display:inline-flex; align-items:center; min-height:30px; padding:5px 9px;
  border-radius:999px; border:1px solid var(--color-border);
  background:var(--color-bg); color:var(--color-text-muted); font-size:12px; font-weight:700;
}
.item-quick-section,
.item-info-card,
.item-breed-info {
  margin: 18px 0;
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--color-bg) 95%, var(--color-primary) 5%);
}
.item-quick-section[hidden], .item-breed-info[hidden] { display:none !important; }
.item-quick-section h3,
.item-info-card h3,
.item-breed-info h3 { margin:0 0 12px; }
.item-info-card p { margin:0; line-height:1.65; white-space:pre-line; overflow-wrap:anywhere; }
.item-quick-facts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.item-quick-fact {
  display:grid; gap:4px; min-width:0; padding:11px 12px;
  border:1px solid var(--color-border); border-radius:10px;
  background:var(--color-bg);
}
.item-quick-fact span { font-size:12px; color:var(--color-text-muted); }
.item-quick-fact strong { font-size:14px; overflow-wrap:anywhere; }
.item-breed-info {
  background: color-mix(in srgb, var(--color-primary) 7%, var(--color-bg));
  border-color: color-mix(in srgb, var(--color-primary) 30%, var(--color-border));
}
.item-breed-head { display:flex; justify-content:space-between; gap:14px; align-items:flex-start; flex-wrap:wrap; }
.item-breed-badge {
  display:inline-flex; padding:5px 9px; margin-bottom:7px; border-radius:999px;
  background:var(--color-primary); color:#fff; font-size:12px; font-weight:800;
}
.item-reference-label { font-size:12px; color:var(--color-text-muted); font-weight:700; }
.item-breed-body { display:grid; gap:0; margin-top:4px; }
.item-breed-row {
  display:grid; grid-template-columns:minmax(130px,.42fr) minmax(0,1fr); gap:16px;
  padding:11px 0; border-bottom:1px solid var(--color-border); line-height:1.5;
}
.item-breed-row:last-child { border-bottom:0; }
.item-breed-row strong { font-size:13px; }
.item-breed-row span { font-size:14px; overflow-wrap:anywhere; }
.item-breed-source,
.item-breed-disclaimer { margin:10px 0 0; font-size:12px; color:var(--color-text-muted); line-height:1.45; }
.item-breed-disclaimer { padding-top:9px; border-top:1px dashed var(--color-border); }

@media (max-width:620px){
  .item-price-card,.item-quick-section,.item-info-card,.item-breed-info{padding:14px;border-radius:12px;}
  .item-quick-facts{grid-template-columns:1fr 1fr;gap:8px;}
  .item-quick-fact{padding:9px 10px;}
  .item-breed-row{grid-template-columns:1fr;gap:4px;padding:10px 0;}
}
@media (max-width:390px){
  .item-quick-facts{grid-template-columns:1fr;}
}

/* =========================
   LiberCom v21.12 — seller trust / reviews
   ========================= */
.seller-box-v21{align-items:flex-start;gap:18px;flex-wrap:wrap}.seller-box-main{min-width:0;flex:1}.seller-name-link{display:inline-block;font-size:1.15rem;font-weight:800;text-decoration:none;margin-bottom:8px}.seller-mini-stats{display:flex;flex-wrap:wrap;gap:8px 14px;font-size:.92rem;color:var(--muted,#667085);margin-bottom:10px}.seller-phone{display:block;margin-top:10px;font-weight:700}.seller-contact-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.seller-trust-badges{display:flex;flex-wrap:wrap;gap:8px}.seller-trust-badges.compact{margin-top:4px}.trust-badge{display:inline-flex;align-items:center;gap:5px;padding:6px 9px;border-radius:999px;background:rgba(127,127,127,.10);font-size:.82rem}.trust-badge.trust-good{background:rgba(38,166,91,.12)}
.seller-public-page{max-width:1180px}.seller-public-head{display:flex;gap:22px;align-items:flex-start;padding:24px}.seller-avatar{width:78px;height:78px;flex:0 0 78px;border-radius:50%;display:grid;place-items:center;font-weight:900;font-size:2rem;background:rgba(60,120,255,.12)}.seller-public-main{flex:1;min-width:0}.seller-title-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.seller-title-row h1{margin:0}.seller-role-badge{padding:5px 9px;border-radius:999px;background:rgba(183,121,31,.14);font-size:.82rem;font-weight:700}.seller-public-stats{display:grid;grid-template-columns:repeat(4,minmax(110px,1fr));gap:10px;margin-top:18px}.seller-public-stats>div,.profile-trust-grid>div{padding:12px;border:1px solid rgba(127,127,127,.18);border-radius:12px}.seller-public-stats strong,.profile-trust-grid strong{display:block;font-size:1.15rem}.seller-public-stats span,.profile-trust-grid span{display:block;font-size:.82rem;color:var(--muted,#667085);margin-top:3px}.seller-section{margin-top:28px}.seller-reviews-head{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;flex-wrap:wrap}.seller-rating-summary{font-weight:800;font-size:1.05rem}.seller-review-form{display:grid;gap:14px;margin:16px 0}.seller-review-form label{display:grid;gap:7px}.seller-review-actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.seller-reviews-list{display:grid;gap:12px}.seller-review-card{border:1px solid rgba(127,127,127,.2);border-radius:14px;padding:16px;background:var(--surface,#fff)}.seller-review-top{display:flex;justify-content:space-between;gap:12px;align-items:center}.seller-review-stars{letter-spacing:1px}.seller-review-badges{display:flex;gap:7px;align-items:center;flex-wrap:wrap;margin-top:7px}.seller-review-verified{display:inline-flex;align-items:center;gap:5px;padding:4px 8px;border-radius:999px;background:rgba(20,150,90,.12);font-size:.78rem;font-weight:800}.seller-review-legacy{display:inline-flex;padding:4px 8px;border-radius:999px;background:rgba(127,127,127,.10);font-size:.78rem}.seller-review-reply{margin-top:12px;padding:11px 12px;border-left:3px solid rgba(60,120,255,.42);background:rgba(60,120,255,.06);border-radius:8px}.seller-review-reply strong{display:block;margin-bottom:4px}.seller-review-eligibility{padding:9px 11px;border-radius:10px;background:rgba(20,150,90,.07)}.seller-review-owner-actions{margin-top:10px}.profile-trust-grid{display:grid;grid-template-columns:repeat(4,minmax(120px,1fr));gap:10px;margin-bottom:14px}
@media(max-width:760px){.seller-public-head{padding:16px;gap:14px}.seller-avatar{width:56px;height:56px;flex-basis:56px;font-size:1.45rem}.seller-public-stats,.profile-trust-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.seller-box-v21>.button.primary{width:100%}.seller-contact-actions .button{flex:1 1 160px;justify-content:center}}

/* =========================
   MOBILE USABILITY — LiberCom v21.14
   ========================= */
@media (max-width:760px){
  .page{padding-top:20px!important;}
  .catalog{grid-template-columns:1fr!important;gap:14px!important;}
  .catalog-card .card-img{min-height:210px;}
  .item{grid-template-columns:1fr!important;gap:22px!important;}
  .item-main-image{max-height:58vh!important;min-height:240px!important;}
  .form,.add-listing-form{max-width:none!important;width:100%;}
  .form input,.form select,.form textarea{font-size:16px;min-height:46px;}
  .form textarea{min-height:120px;}
  .profile{grid-template-columns:1fr!important;gap:16px!important;}
  .profile-menu{display:flex!important;gap:8px;overflow-x:auto;padding-bottom:5px;scrollbar-width:thin;}
  .profile-menu a{flex:0 0 auto;white-space:nowrap;border-radius:999px;padding:9px 12px;}
  .market-page-head{gap:10px;}
  .market-head-actions{width:100%;}
  .market-head-actions .button{flex:1 1 140px;text-align:center;}
  .seller-public-head{padding:14px!important;}
}


/* =========================
   LiberCom v21.15 — ad draft autosave
   ========================= */
.draft-panel{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 16px;margin-bottom:16px;border:1px solid color-mix(in srgb,var(--color-primary) 28%,var(--color-border));border-radius:14px;background:color-mix(in srgb,var(--color-primary) 6%,var(--color-bg));}
.draft-panel[hidden]{display:none!important}.draft-panel-main{display:grid;gap:4px;min-width:0}.draft-panel-main strong{font-size:.96rem}.draft-panel-main span{font-size:.84rem;line-height:1.4}.draft-panel-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.draft-panel-actions .button{margin:0;white-space:nowrap}.draft-panel.is-saved{border-color:rgba(38,166,91,.35)}
@media(max-width:700px){.draft-panel{align-items:stretch;flex-direction:column;padding:13px}.draft-panel-actions{display:grid;grid-template-columns:1fr 1fr}.draft-panel-actions .button{width:100%;min-height:44px}}
@media(max-width:390px){.draft-panel-actions{grid-template-columns:1fr}}


/* =========================
   v21.16 — управление объявлениями и статусы
   ========================= */
.my-items-status-filters{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0 18px;}
.my-items-filter{border:1px solid var(--color-border);background:var(--color-bg);color:var(--color-text-main);border-radius:999px;padding:9px 13px;font-weight:750;cursor:pointer;}
.my-items-filter span{display:inline-flex;min-width:20px;height:20px;align-items:center;justify-content:center;margin-left:5px;padding:0 5px;border-radius:999px;background:var(--color-bg-soft);font-size:11px;}
.my-items-filter.active{border-color:var(--color-primary);color:var(--color-primary);background:color-mix(in srgb,var(--color-primary) 8%,var(--color-bg));}
.my-item-card{position:relative;overflow:hidden;}
.my-item-status,.catalog-status-badge{position:absolute;left:10px;top:10px;z-index:2;padding:6px 9px;border-radius:999px;background:rgba(20,20,20,.78);color:#fff;font-size:11px;font-weight:800;backdrop-filter:blur(6px);}
.my-item-status.status-active{background:rgba(21,112,61,.88)}
.my-item-status.status-reserved,.catalog-status-badge{background:rgba(170,104,0,.9)}
.my-item-status.status-sold{background:rgba(51,69,88,.9)}
.my-item-status.status-archived{background:rgba(84,84,84,.9)}
.my-item-status.status-hidden{background:rgba(180,83,9,.92)}
.my-item-primary-actions,.my-item-manage{display:flex;gap:8px;flex-wrap:wrap;padding:10px 12px 12px;}
.my-item-primary-actions{border-top:1px solid var(--color-border);}
.my-item-primary-actions .button{flex:1 1 135px;text-align:center;}
.my-item-manage{padding-top:0;}
.my-item-manage[hidden]{display:none!important;}
.my-item-manage .button{flex:1 1 145px;}
.item-delete-btn.is-armed{outline:3px solid color-mix(in srgb,#d33 22%,transparent);font-weight:900;}
.my-items-empty{display:grid;gap:5px;padding:28px;border:1px dashed var(--color-border);border-radius:14px;background:var(--color-bg-soft);}
.my-items-empty span{color:var(--color-text-muted);font-size:13px;}
.item-status-banner{display:grid;gap:3px;margin:14px 0;padding:12px 14px;border:1px solid var(--color-border);border-radius:12px;background:var(--color-bg-soft);}
.item-status-banner strong{font-size:14px;}.item-status-banner span{font-size:12px;color:var(--color-text-muted);}
.item-status-banner.status-reserved{border-color:color-mix(in srgb,#b77900 45%,var(--color-border));}
.item-status-banner.status-sold,.item-status-banner.status-archived{border-color:color-mix(in srgb,#56616e 45%,var(--color-border));}
.item-status-banner.status-hidden{border-color:color-mix(in srgb,#b45309 55%,var(--color-border));background:color-mix(in srgb,#fef3c7 45%,var(--color-bg-soft));}
@media(max-width:700px){
  .my-items-status-filters{flex-wrap:nowrap;overflow-x:auto;padding-bottom:4px;scrollbar-width:thin;}
  .my-items-filter{flex:0 0 auto;}
  .my-item-primary-actions,.my-item-manage{display:grid;grid-template-columns:1fr 1fr;}
  .my-item-manage .button,.my-item-primary-actions .button{width:100%;}
}

/* =========================
   LiberCom v21.20 — advanced catalog search and filters
   ========================= */
.catalog-smart-search{white-space:nowrap;}
.catalog-price,.catalog-currency{
  min-width:128px;padding:10px 12px;border:1px solid var(--color-border);border-radius:var(--radius-md);background:var(--color-bg);color:var(--color-text-main);
}
.catalog-advanced-row{
  display:grid;grid-template-columns:repeat(3,minmax(150px,1fr)) repeat(3,minmax(150px,auto));gap:10px 12px;align-items:end;margin-top:14px;padding-top:14px;border-top:1px solid var(--color-border);
}
.catalog-advanced-row>label:not(.catalog-check){display:grid;gap:5px;font-size:12px;font-weight:700;color:var(--color-text-muted);}
.catalog-advanced-row select{width:100%;min-height:42px;padding:9px 10px;border:1px solid var(--color-border);border-radius:var(--radius-md);background:var(--color-bg);color:var(--color-text-main);font-size:14px;}
.catalog-check{display:flex;align-items:center;gap:8px;min-height:42px;padding:9px 11px;border:1px solid var(--color-border);border-radius:var(--radius-md);background:var(--color-bg);font-weight:700;font-size:13px;cursor:pointer;}
.catalog-check input{width:18px;height:18px;accent-color:var(--color-primary);}
.catalog-filter-summary{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-top:14px;padding-top:12px;border-top:1px dashed var(--color-border);}
.catalog-filter-summary-main{display:grid;gap:8px;min-width:0;flex:1;}
.catalog-filter-summary-main>strong{font-size:13px;}
.catalog-active-filters{display:flex;gap:7px;flex-wrap:wrap;}
.catalog-active-filters[hidden]{display:none!important;}
.catalog-filter-chip{display:inline-flex;align-items:center;gap:7px;max-width:100%;padding:6px 9px;border:1px solid color-mix(in srgb,var(--color-primary) 35%,var(--color-border));border-radius:999px;background:color-mix(in srgb,var(--color-primary) 7%,var(--color-bg));color:var(--color-text-main);font-size:12px;cursor:pointer;}
.catalog-filter-chip span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:240px;}
.catalog-filter-chip b{font-size:16px;line-height:1;color:var(--color-primary);}
.catalog-filter-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;}
.catalog-copy-status{font-size:12px;color:var(--color-text-muted);min-width:0;}
.catalog-view-toggle{display:inline-flex;border:1px solid var(--color-border);border-radius:10px;overflow:hidden;background:var(--color-bg);}
.catalog-view-btn{width:40px;height:38px;border:0;border-right:1px solid var(--color-border);background:transparent;color:var(--color-text-main);cursor:pointer;font-size:18px;}
.catalog-view-btn:last-child{border-right:0;}
.catalog-view-btn.active{background:var(--color-primary);color:#fff;}

.catalog.catalog-list-mode{grid-template-columns:1fr!important;}
.catalog-list-mode .catalog-card-link{display:grid;grid-template-columns:230px minmax(0,1fr);align-items:stretch;}
.catalog-list-mode .card-image-wrap{aspect-ratio:auto;min-height:170px;height:100%;}
.catalog-list-mode .catalog-card .card-img{height:100%;min-height:0;}
.catalog-list-mode .card-category{min-height:0;}
.catalog-list-mode .market-card-actions{justify-content:flex-end;}
.catalog-list-mode .market-card-actions .market-action{flex:0 1 180px;}

@media(max-width:1050px){
  .catalog-advanced-row{grid-template-columns:repeat(3,minmax(0,1fr));}
}
@media(max-width:760px){
  .catalog-search-row .catalog-search{flex-basis:100%;width:100%;}
  .catalog-smart-search{flex:1 1 100%;min-height:46px;}
  .catalog-price,.catalog-currency,.catalog-sort{flex:1 1 calc(50% - 6px);min-width:0;width:auto;}
  .catalog-advanced-row{grid-template-columns:1fr 1fr;}
  .catalog-filter-summary{flex-direction:column;}
  .catalog-filter-actions{width:100%;justify-content:space-between;}
  .catalog-filter-actions>.button{flex:1 1 180px;}
  .catalog-list-mode .catalog-card-link{grid-template-columns:122px minmax(0,1fr);}
  .catalog-list-mode .card-image-wrap{min-height:150px;}
  .catalog.catalog-list-mode .catalog-card .card-img{min-height:0!important;height:100%!important;}
  .catalog-list-mode .card-body{padding:11px;}
  .catalog-list-mode .card-body h3{font-size:15px;line-height:1.25;}
  .catalog-list-mode .catalog-spec-summary{display:none;}
  .catalog-list-mode .card-bottom{display:grid;gap:5px;}
  .catalog-list-mode .card-small{text-align:left;}
  .catalog-list-mode .market-card-actions{flex-direction:row;}
  .catalog-list-mode .market-card-actions .market-action{flex:1 1 0;}
}
@media(max-width:460px){
  .catalog-advanced-row{grid-template-columns:1fr;}
  .catalog-price,.catalog-currency,.catalog-sort{flex:1 1 100%;width:100%;}
  .catalog-filter-actions{display:grid;grid-template-columns:1fr auto;}
  .catalog-filter-actions>.button{grid-column:1/-1;width:100%;}
  .catalog-copy-status{grid-column:1/2;}
  .catalog-view-toggle{grid-column:2/3;grid-row:2;}
  .catalog-list-mode .catalog-card-link{grid-template-columns:108px minmax(0,1fr);}
  .catalog-list-mode .type-badge{font-size:10px;padding:4px 6px;}
  .catalog-list-mode .photo-count{font-size:10px;padding:4px 6px;}
}

/* =========================
   NOTIFICATION CENTER — LiberCom v21.21
   ========================= */
.notifications-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:18px 0;}
.notifications-summary{font-weight:700;}
.notifications-list{display:grid;gap:12px;}
.notification-card{display:grid;grid-template-columns:44px 1fr auto;gap:12px;align-items:start;padding:16px;border:1px solid var(--color-border);border-radius:16px;background:var(--color-bg);box-shadow:0 4px 16px rgba(16,24,40,.04);}
.notification-card.unread{border-color:color-mix(in srgb,var(--color-primary) 50%,var(--color-border));background:color-mix(in srgb,var(--color-primary) 5%,var(--color-bg));}
.notification-icon{width:44px;height:44px;border-radius:14px;display:flex;align-items:center;justify-content:center;background:var(--color-bg-soft);font-size:22px;}
.notification-title-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap;}
.notification-title{font-weight:800;font-size:16px;}
.notification-dot{width:8px;height:8px;border-radius:50%;background:var(--color-primary);}
.s12-page-heading.notifications-heading{display:block;}
.notification-card>div{min-width:0;}
.notification-title,.notification-message{overflow-wrap:anywhere;}
.notification-message{margin-top:5px;color:var(--color-text-muted);line-height:1.45;}
.notification-time{margin-top:7px;font-size:12px;color:var(--color-text-muted);}
.notification-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end;}
.notification-empty{padding:34px 18px;text-align:center;border:1px dashed var(--color-border);border-radius:16px;color:var(--color-text-muted);}
@media(max-width:700px){
  .notification-card{grid-template-columns:38px 1fr;padding:14px;}
  .notification-icon{width:38px;height:38px;border-radius:12px;font-size:19px;}
  .notification-actions{grid-column:2;justify-content:flex-start;}
}
.profile-menu [data-notification-badge]{float:right;min-width:20px;height:20px;padding:0 6px;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;background:#d92d20;color:#fff;font-size:11px;font-weight:800;}
.profile-menu [data-notification-badge][hidden]{display:none!important;}


/* =========================
   HOMEPAGE ADVERTISING — LiberCom v21.24
   Approved 6-slot desktop layout:
   left 4/5/6 equal, right 1 large, 2/3 equal and 30% of slot 1 width.
   ========================= */
.liber-home-layout{
  display:grid;
  grid-template-columns:110px minmax(0,1fr) 360px;
  gap:18px;
  align-items:start;
}
.liber-home-center{min-width:0;}
.liber-home-hero{margin-bottom:24px;}
.liber-home-hero h1{margin-top:0;}
.liber-home-actions{margin-bottom:28px;display:flex;gap:10px;flex-wrap:wrap;}
.liber-home-catalog{grid-template-columns:repeat(auto-fill,minmax(235px,1fr));}
.liber-ad-rail{display:flex;flex-direction:column;gap:12px;min-width:0;}
.liber-ad-slot{
  position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden;
  border:1px solid color-mix(in srgb,var(--color-primary) 45%,var(--color-border));
  border-radius:12px;background:linear-gradient(145deg,color-mix(in srgb,var(--color-primary) 5%,var(--color-bg)),color-mix(in srgb,var(--color-primary) 12%,var(--color-bg)));
  color:var(--color-text-main);text-decoration:none!important;box-shadow:0 3px 12px rgba(0,0,0,.035);
}
.liber-ad-slot:hover{border-color:var(--color-primary);text-decoration:none!important;}
.liber-ad-slot.is-disabled{display:none!important;}
.liber-ad-slot.is-clickable{cursor:pointer;}
.liber-ad-image{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;margin:0;}
.liber-ad-copy{position:relative;z-index:2;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;text-align:center;padding:12px;background:color-mix(in srgb,var(--color-bg) 82%,transparent);border-radius:10px;max-width:90%;}
.liber-ad-copy strong{font-size:15px;line-height:1.25;}
.liber-ad-copy small{font-size:11px;line-height:1.25;color:var(--color-text-muted);}
.liber-ad-mark{position:absolute;z-index:3;left:7px;top:6px;padding:2px 5px;border-radius:5px;background:rgba(0,0,0,.55);color:#fff;font-size:8px;line-height:1.2;}
.liber-ad-left{padding-top:0;}
.liber-ad-left-slot{width:110px;height:144px;}
.liber-ad-slot-1{width:100%;height:116px;}
.liber-ad-right-small{display:flex;flex-direction:column;gap:12px;align-items:flex-end;}
.liber-ad-slot-small{width:30%;min-width:108px;height:106px;}

@media(max-width:1120px){
  .liber-home-layout{grid-template-columns:96px minmax(0,1fr) 300px;gap:14px;}
  .liber-ad-left-slot{width:96px;height:130px;}
  .liber-ad-slot-small{min-width:96px;}
}
@media(max-width:900px){
  .liber-home-layout{grid-template-columns:minmax(0,1fr);}
  .liber-ad-left{display:none;}
  .liber-ad-right{order:2;display:grid;grid-template-columns:1fr 1fr;gap:10px;}
  .liber-ad-slot-1{grid-column:1/-1;height:105px;}
  .liber-ad-right-small{display:contents;}
  .liber-ad-slot-small{width:100%;min-width:0;height:90px;}
  .liber-home-center{order:1;}
}
@media(max-width:600px){
  .liber-ad-right{grid-template-columns:1fr;}
  .liber-ad-slot-1{grid-column:auto;height:92px;}
  .liber-ad-slot-small{height:78px;}
  .liber-home-actions .button{flex:1 1 calc(50% - 8px);padding:12px 10px;}
}

/* =========================
   LiberCom v21.25 — VIP / TOP / Premium promotion
   ========================= */
.promotion-badges{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 8px;position:relative;z-index:3}
.card-image-wrap>.promotion-badges{position:absolute;left:10px;right:10px;bottom:10px;margin:0;align-items:flex-end}
.promotion-badge{display:inline-flex;align-items:center;gap:4px;padding:5px 8px;border-radius:999px;font-size:10px;font-weight:900;letter-spacing:.02em;background:rgba(26,31,41,.88);color:#fff;box-shadow:0 2px 10px rgba(0,0,0,.12);backdrop-filter:blur(7px)}
.promotion-badge.promo-vip{background:rgba(116,64,0,.92)}
.promotion-badge.promo-top{background:rgba(12,92,124,.92)}
.promotion-badge.promo-category{background:rgba(20,110,74,.94)}
.promotion-badge.promo-premium{background:rgba(75,41,128,.94)}
.promotion-badge.promo-urgent{background:rgba(174,42,42,.94)}
.card.is-highlighted{box-shadow:0 0 0 2px color-mix(in srgb,var(--color-primary) 42%,transparent),0 8px 26px rgba(0,0,0,.08)}
.card.is-premium{background:color-mix(in srgb,#8b5cf6 5%,var(--color-bg));}
.card.is-vip{border-color:color-mix(in srgb,#b7791f 48%,var(--color-border));}
.card.is-top{box-shadow:0 7px 24px rgba(0,0,0,.08)}
.card.is-category-boosted{border-color:color-mix(in srgb,#16a34a 38%,var(--color-border));}
.item-promotion-strip{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0 2px}.item-promotion-strip .promotion-badges{margin:0}
.my-item-promotion{font-size:12px;color:var(--color-text-muted);padding:0 12px 7px}
.my-item-performance{display:flex;flex-wrap:wrap;gap:7px 12px;padding:0 12px 10px;font-size:11px;color:var(--color-text-muted)}
.my-item-performance span{white-space:nowrap}
.admin-promo-summary{display:grid;gap:5px;min-width:150px}.admin-promo-summary .promotion-badges{margin:0}.admin-promo-state{font-size:11px;color:var(--color-text-muted)}
.promotion-dialog{width:min(620px,calc(100vw - 28px));border:1px solid var(--color-border);border-radius:18px;padding:0;background:var(--color-bg);color:var(--color-text-main);box-shadow:0 20px 80px rgba(0,0,0,.25)}
.promotion-dialog::backdrop{background:rgba(15,23,42,.48)}
.promotion-dialog-form{padding:20px;display:grid;gap:16px}.promotion-dialog h3{margin:0}.promotion-dialog-subtitle{margin:-8px 0 0;color:var(--color-text-muted);font-size:13px}
.promotion-option-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.promotion-option{display:flex;gap:9px;align-items:flex-start;padding:12px;border:1px solid var(--color-border);border-radius:12px;background:var(--color-bg-soft);cursor:pointer}.promotion-option input{margin-top:2px}.promotion-option strong{display:block;font-size:13px}.promotion-option span{display:block;margin-top:2px;font-size:11px;color:var(--color-text-muted)}
.promotion-date-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.promotion-date-grid label{font-size:12px;color:var(--color-text-muted)}.promotion-date-grid input{width:100%;margin-top:4px}
.promotion-dialog-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.promotion-dialog-actions .button{margin:0}.promotion-dialog-actions .button:first-child{margin-right:auto}
@media(max-width:620px){.promotion-option-grid,.promotion-date-grid{grid-template-columns:1fr}.promotion-dialog-form{padding:15px}.promotion-dialog-actions{display:grid;grid-template-columns:1fr 1fr}.promotion-dialog-actions .button{width:100%}.promotion-dialog-actions .button:first-child{margin-right:0}}

/* =========================
   LiberCom v21.26 — Billing
   ========================= */
.billing-current{display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,.8fr);gap:20px;align-items:center;}
.billing-kicker{display:block;font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.08em;color:var(--color-text-muted,#6b7280);margin-bottom:5px;}
.billing-current h3{font-size:28px;margin:0 0 6px;}
.billing-usage{padding:14px;border:1px solid var(--color-border,#e5e7eb);border-radius:14px;background:var(--color-bg-soft,#f8fafc);}
.billing-usage strong{display:block;font-size:24px;}.billing-usage span,.billing-usage small{display:block;color:var(--color-text-muted,#6b7280);}
.billing-progress{height:9px;border-radius:999px;background:#e5e7eb;overflow:hidden;margin:10px 0 7px;}.billing-progress i{display:block;height:100%;background:var(--color-primary,#2c5eff);border-radius:inherit;}
.billing-heading{margin:28px 0 12px;}.billing-plans{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;}
.billing-plan{position:relative;display:flex;flex-direction:column;gap:12px;border:1px solid var(--color-border,#e5e7eb);border-radius:16px;padding:18px;background:var(--color-surface,#fff);}
.billing-plan.is-recommended{border-width:2px;border-color:var(--color-primary,#2c5eff);}.billing-plan.is-current{box-shadow:0 0 0 2px rgba(44,94,255,.08);}
.billing-plan-tag{position:absolute;top:-10px;right:12px;background:var(--color-primary,#2c5eff);color:#fff;border-radius:999px;padding:4px 8px;font-size:10px;font-weight:800;}
.billing-plan h3{margin:0;font-size:20px;}.billing-price{font-size:24px;font-weight:800;}.billing-price small{display:block;font-size:11px;font-weight:500;color:var(--color-text-muted,#6b7280);}.billing-limit{font-size:13px;}.billing-plan ul{margin:0;padding-left:18px;min-height:112px;color:var(--color-text-muted,#6b7280);font-size:13px;}.billing-plan li+li{margin-top:7px;}.billing-plan .button{margin-top:auto;width:100%;}
.billing-manual-note{margin-top:16px;}.billing-manual-note p{margin:7px 0 0;}.billing-history{overflow-x:auto;}
/* Keep the entire wrapped invoice number clickable, including line gaps. */
.billing-history td a{display:inline-block;}
.billing-status{display:inline-flex;align-items:center;padding:5px 9px;border-radius:999px;font-size:11px;font-weight:800;background:#f3f4f6;white-space:nowrap;}.billing-status.status-paid{background:#dcfce7;color:#166534}.billing-status.status-pending{background:#fff7d6;color:#854d0e}.billing-status.status-cancelled{background:#fee2e2;color:#991b1b}
.admin-billing-plans{display:grid;gap:10px;margin-top:12px}.admin-billing-plan{display:grid;grid-template-columns:minmax(130px,1.2fr) repeat(4,minmax(115px,1fr)) auto;gap:10px;align-items:end;padding:12px;border:1px solid var(--color-border,#e5e7eb);border-radius:12px}.admin-billing-plan>div span{display:block;font-size:11px;color:var(--color-text-muted,#6b7280);margin-top:3px}.admin-billing-plan label{font-size:11px;color:var(--color-text-muted,#6b7280);margin:0}.admin-billing-plan input{width:100%;margin-top:4px}.admin-billing-plan .check-row{align-self:center;white-space:nowrap}.billing-revenue{font-size:24px!important}.admin-table-wrap{overflow-x:auto}
@media(max-width:1100px){.billing-plans{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-billing-plan{grid-template-columns:repeat(3,minmax(0,1fr))}.admin-billing-plan>div{grid-column:1/-1}}
@media(max-width:700px){.billing-current{grid-template-columns:1fr}.billing-plans{grid-template-columns:1fr}.admin-billing-plan{grid-template-columns:1fr}.admin-billing-plan>div{grid-column:auto}.billing-plan ul{min-height:0}}


/* LiberCom v21.27 — seller/admin analytics */
.analytics-stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.analytics-stat-card{padding:16px;border:1px solid var(--color-border,#e5e7eb);border-radius:14px;background:var(--color-surface,#fff)}
.analytics-stat-label{font-size:13px;color:var(--color-text-muted,#6b7280);margin-bottom:7px}
.analytics-stat-value{font-size:28px;font-weight:800;line-height:1.1}
.analytics-stat-note{font-size:11px;color:var(--color-text-muted,#6b7280);margin-top:7px}
.analytics-table-wrap{overflow-x:auto;margin-top:12px}
.analytics-table{width:100%;border-collapse:collapse;min-width:880px}
.analytics-table th,.analytics-table td{padding:10px 9px;border-bottom:1px solid var(--color-border,#e5e7eb);text-align:left;vertical-align:top;white-space:nowrap}
.analytics-table th{font-size:12px;color:var(--color-text-muted,#6b7280)}
.analytics-small{font-size:11px;margin-top:3px}
@media(max-width:900px){.analytics-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.analytics-stat-grid{grid-template-columns:1fr}.analytics-stat-value{font-size:24px}}

/* ===== LiberCom v21.29 billing orders / service cart ===== */
.billing-services{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.billing-service{display:flex;flex-direction:column;gap:12px;padding:16px;border:1px solid var(--color-border,#e5e7eb);border-radius:16px;background:var(--color-surface,#fff)}.billing-service h3{margin:0 0 6px;font-size:18px}.billing-service p{margin:0;color:var(--color-text-muted,#6b7280);font-size:13px;line-height:1.45}.billing-service label{font-size:12px;color:var(--color-text-muted,#6b7280);margin-top:auto}.billing-service select{width:100%;margin-top:5px}.billing-service-price{font-size:22px}.billing-cart-lines{display:grid;gap:8px}.billing-cart-line{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:12px;align-items:center;padding:10px 0;border-bottom:1px solid var(--color-border,#e5e7eb)}.billing-cart-line:last-child{border-bottom:0}.billing-cart-line small{display:block;margin-top:3px;color:var(--color-text-muted,#6b7280)}.billing-cart-total{display:flex;justify-content:flex-end;align-items:center;gap:18px;border-top:2px solid var(--color-border,#e5e7eb);padding-top:14px;margin-top:12px;font-size:18px}.billing-cart-total strong{font-size:24px}.billing-cart-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:14px;flex-wrap:wrap}.billing-cart-actions select{min-width:230px}.billing-provider-note{margin-top:18px}.billing-provider-list{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:12px 0}.billing-provider{display:flex;flex-direction:column;gap:5px;padding:12px;border:1px solid var(--color-border,#e5e7eb);border-radius:12px;background:var(--color-bg-soft,#f8fafc)}.billing-provider>span{font-size:12px;font-weight:800}.billing-provider small{color:var(--color-text-muted,#6b7280);line-height:1.35}.billing-provider code{font-size:11px;color:var(--color-text-muted,#6b7280)}.billing-provider.is-ready{box-shadow:inset 0 0 0 1px rgba(22,101,52,.16)}.billing-provider.is-placeholder{opacity:.72}.billing-legacy{margin-top:16px}.billing-legacy summary{cursor:pointer;font-weight:700}.admin-billing-services{display:grid;gap:10px;margin-top:12px}.admin-billing-service{display:grid;grid-template-columns:minmax(150px,1.5fr) minmax(150px,1.3fr) 120px 110px auto;gap:10px;align-items:end;padding:12px;border:1px solid var(--color-border,#e5e7eb);border-radius:12px}.admin-billing-service>div span{display:block;font-size:11px;color:var(--color-text-muted,#6b7280);margin-top:3px}.admin-billing-service label{font-size:11px;color:var(--color-text-muted,#6b7280);margin:0}.admin-billing-service input{width:100%;margin-top:4px}.admin-billing-service .check-row{align-self:center;white-space:nowrap}.billing-order-sheet{max-width:980px;margin:0 auto}.billing-order-paper{background:var(--color-surface,#fff);border:1px solid var(--color-border,#e5e7eb);border-radius:18px;padding:28px;box-shadow:0 10px 30px rgba(0,0,0,.06)}.billing-order-head{display:flex;justify-content:space-between;gap:24px;align-items:flex-start;border-bottom:2px solid var(--color-border,#e5e7eb);padding-bottom:20px}.billing-order-logo{font-size:30px;font-weight:900;letter-spacing:.02em}.billing-order-logo span{color:var(--color-primary,#2c5eff)}.billing-order-head p{margin:6px 0 0;color:var(--color-text-muted,#6b7280)}.billing-order-number{text-align:right;display:flex;flex-direction:column;gap:3px}.billing-order-number>span,.billing-order-meta span{font-size:11px;text-transform:uppercase;letter-spacing:.07em;color:var(--color-text-muted,#6b7280);font-weight:800}.billing-order-number strong{font-size:20px}.billing-order-number small,.billing-order-meta small{color:var(--color-text-muted,#6b7280)}.billing-order-meta{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:20px 0}.billing-order-meta>div{display:flex;flex-direction:column;gap:4px;padding:12px;border:1px solid var(--color-border,#e5e7eb);border-radius:12px}.billing-order-table{width:100%;border-collapse:collapse;margin-top:14px}.billing-order-table th,.billing-order-table td{padding:12px 10px;border-bottom:1px solid var(--color-border,#e5e7eb);text-align:left;vertical-align:top}.billing-order-table th{font-size:12px;color:var(--color-text-muted,#6b7280)}.billing-order-table td:nth-last-child(-n+3),.billing-order-table th:nth-last-child(-n+3){text-align:right}.billing-order-table td small{display:block;color:var(--color-text-muted,#6b7280);margin-top:3px}.billing-order-table tfoot td{font-size:18px;font-weight:800;border-top:2px solid var(--color-border,#e5e7eb);border-bottom:0}.billing-order-note{margin-top:18px;padding:12px;border-radius:10px;background:var(--color-bg-soft,#f8fafc)}.billing-order-disclaimer{margin-top:18px;font-size:12px;line-height:1.45;color:var(--color-text-muted,#6b7280)}.billing-order-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:22px}
@media(max-width:1000px){.billing-services{grid-template-columns:repeat(2,minmax(0,1fr))}.billing-provider-list{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-billing-service{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-billing-service>div{grid-column:1/-1}}
@media(max-width:700px){.billing-services,.billing-provider-list,.billing-order-meta{grid-template-columns:1fr}.billing-cart-line{grid-template-columns:1fr auto}.billing-cart-line .button{grid-column:1/-1}.billing-order-paper{padding:16px}.billing-order-head{flex-direction:column}.billing-order-number{text-align:left}.billing-order-table{font-size:12px}.admin-billing-service{grid-template-columns:1fr}.admin-billing-service>div{grid-column:auto}}
@media print{.no-print{display:none!important}body{background:#fff!important}.container{max-width:none!important;width:100%!important}.page{padding:0!important;margin:0!important}.billing-order-paper{border:0;box-shadow:none;padding:0}.billing-order-disclaimer{font-size:10px}}

/* ===== LiberCom v21.30 — payment providers ===== */
.payment-settings-grid{display:grid;grid-template-columns:minmax(0,2fr) minmax(260px,1fr);gap:14px}.payment-settings-card{padding:16px;border:1px solid var(--color-border,#e5e7eb);border-radius:14px;background:var(--color-bg-soft,#f8fafc)}.payment-settings-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:14px}.payment-settings-head strong{font-size:20px}.payment-settings-head small{display:block;color:var(--color-text-muted,#6b7280);margin-top:4px}.payment-settings-two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:12px}.payment-settings-two label{font-size:12px;color:var(--color-text-muted,#6b7280)}.payment-settings-two input,.payment-settings-two select{width:100%;margin-top:4px}.payment-readiness{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.payment-readiness span{padding:6px 9px;border-radius:999px;background:var(--color-surface,#fff);border:1px solid var(--color-border,#e5e7eb);font-size:11px;font-weight:700}.payment-next-card .billing-provider{margin-top:10px}.payment-events{margin-top:14px}.payment-events summary{cursor:pointer}.payment-return-note{max-width:980px;margin:0 auto 14px}.billing-status.status-failed{background:#fee2e2;color:#991b1b}.billing-status.status-refunded{background:#e0e7ff;color:#3730a3}@media(max-width:900px){.payment-settings-grid,.payment-settings-two{grid-template-columns:1fr}}

/* LiberCom v21.33 — multi-provider billing / refund UI */
.billing-status.status-requested,.billing-status.status-processing{background:#fef3c7;color:#92400e}.billing-status.status-rejected{background:#fee2e2;color:#991b1b}.billing-refund-block{margin-top:18px;padding:14px;border:1px solid var(--color-border,#e5e7eb);border-radius:12px;background:var(--color-bg-soft,#f8fafc)}.billing-refund-block h3{margin:0 0 10px}.billing-refund-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:12px;align-items:center;padding:9px 0;border-bottom:1px solid var(--color-border,#e5e7eb)}.billing-refund-row:last-of-type{border-bottom:0}.billing-refund-row small{color:var(--color-text-muted,#6b7280)}.billing-refund-row>div small{display:block;margin-top:3px}.billing-refund-total{display:flex;justify-content:flex-end;gap:8px;padding-top:10px;margin-top:6px;border-top:1px solid var(--color-border,#e5e7eb)}@media(max-width:700px){.billing-refund-row{grid-template-columns:1fr auto}.billing-refund-row>small{grid-column:1/-1}}

/* =========================
   LiberCom v21.40 — catalog pagination / render performance
   ========================= */
.catalog-pagination{margin:28px 0 6px;display:flex;align-items:center;justify-content:center;gap:16px;flex-wrap:wrap;padding:14px;border:1px solid var(--color-border);border-radius:14px;background:var(--color-bg-soft)}
.catalog-pagination[hidden]{display:none!important}
.catalog-pagination-controls{display:flex;align-items:center;justify-content:center;gap:6px;flex-wrap:wrap}
.catalog-page-btn{min-width:40px;padding:8px 10px}
.catalog-page-btn.active{background:var(--color-primary);border-color:var(--color-primary);color:#fff}
.catalog-page-btn:disabled{opacity:.45;cursor:not-allowed}
.catalog-page-dots{padding:0 4px;color:var(--color-text-muted)}
.catalog-page-size{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--color-text-muted)}
.catalog-page-size select{width:auto;min-width:70px;padding:8px 30px 8px 10px}
.catalog-page-summary{font-size:12px;color:var(--color-text-muted);white-space:nowrap}
.catalog-card{content-visibility:auto;contain-intrinsic-size:360px}
@media(max-width:650px){.catalog-pagination{justify-content:flex-start}.catalog-page-summary{width:100%;text-align:center}.catalog-page-size{margin-left:auto;margin-right:auto}}


/* =========================
   LiberCom v21.41 — consent / legal
   ========================= */
.liber-consent-layer{position:fixed;inset:0;z-index:10050;display:flex;align-items:flex-end;justify-content:center;padding:22px;background:rgba(15,23,42,.36);backdrop-filter:blur(2px)}
.liber-consent-card{width:min(760px,100%);background:#fff;border:1px solid #dbe5ef;border-radius:18px;box-shadow:0 24px 70px rgba(15,23,42,.28);padding:22px;color:#1f2937}
.liber-consent-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}.liber-consent-head h2{margin:3px 0 8px}.liber-consent-kicker{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:#1593c8}.liber-consent-close{border:0;background:transparent;font-size:30px;line-height:1;cursor:pointer;color:#64748b}
.liber-consent-row{display:flex;align-items:center;justify-content:space-between;gap:18px;border:1px solid #e2e8f0;border-radius:12px;padding:13px 14px;margin-top:10px;background:#fff}.liber-consent-row div{display:grid;gap:3px}.liber-consent-row small{color:#64748b}.liber-consent-row input{width:20px;height:20px}.liber-consent-row.is-required{background:#f8fafc}.liber-consent-row.is-required>span{font-size:12px;font-weight:700;color:#475569;white-space:nowrap}
.liber-consent-links{font-size:13px;margin:12px 0 0}.liber-consent-actions{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap;margin-top:18px}.liber-cookie-settings-button{position:fixed;left:14px;bottom:14px;z-index:4000;border:1px solid #cbd5e1;background:#fff;color:#334155;border-radius:999px;padding:8px 12px;font:600 12px/1.2 inherit;box-shadow:0 5px 18px rgba(15,23,42,.16);cursor:pointer}
.billing-legal-check{display:flex;align-items:flex-start;gap:10px;padding:13px 14px;margin:14px 0;border:1px solid #cbd5e1;border-radius:12px;background:#f8fafc}.billing-legal-check input{width:18px;height:18px;margin-top:2px}.billing-legal-ok{padding:11px 13px;margin:14px 0;border-radius:10px;background:#ecfdf5;color:#166534;font-weight:600}
@media(max-width:640px){.liber-consent-layer{padding:10px}.liber-consent-card{padding:16px;border-radius:14px}.liber-consent-row{align-items:flex-start}.liber-consent-actions .button{flex:1 1 180px}}


/* =========================
   MOBILE / TABLET POLISH — LiberCom v21.42
   ========================= */
@media (max-width:900px){
  .hero{padding:42px 0 34px;}
  .hero h1{font-size:clamp(28px,7vw,36px);}
  .hero p{font-size:16px;margin-bottom:24px;}
  .admin-manager-grid{grid-template-columns:1fr!important;}
  .billing-order-paper{max-width:100%;overflow:hidden;}
}

@media (max-width:760px){
  h1{font-size:1.65rem;overflow-wrap:anywhere;}
  h2{font-size:1.3rem;overflow-wrap:anywhere;}
  h3{overflow-wrap:anywhere;}
  .page{padding-top:16px!important;}
  .admin-box,.checkout-section,.order-card,.seller-review-card{padding:14px!important;border-radius:12px;}

  /* Home: keep every advertising position visible on a phone. */
  .liber-home-layout{display:flex!important;flex-direction:column;gap:16px;}
  .liber-home-center{order:1;width:100%;}
  .liber-ad-right{order:2!important;width:100%;display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;}
  .liber-ad-slot-1{grid-column:1/-1!important;height:96px!important;}
  .liber-ad-right-small{display:contents!important;}
  .liber-ad-slot-small{width:100%!important;min-width:0!important;height:82px!important;}
  .liber-ad-left{order:3!important;display:flex!important;width:100%;flex-direction:row!important;gap:8px!important;overflow-x:auto;scroll-snap-type:x proximity;padding:2px 0 6px;overscroll-behavior-inline:contain;}
  .liber-ad-left-slot{flex:0 0 min(44vw,170px);width:auto!important;height:92px!important;scroll-snap-align:start;}
  .liber-ad-copy{padding:8px;max-width:92%;}
  .liber-ad-copy strong{font-size:13px;}
  .liber-ad-copy small{font-size:10px;}
  .liber-home-hero{margin-bottom:16px;}
  .liber-home-hero h1{font-size:clamp(25px,7.5vw,34px);line-height:1.15;margin-bottom:8px;}
  .liber-home-actions{display:grid!important;grid-template-columns:1fr 1fr;gap:8px!important;margin-bottom:22px!important;}
  .liber-home-actions .button{width:100%;min-width:0;padding:10px 8px!important;font-size:13px;}

  /* Catalog: one clean touch-friendly column. */
  .catalog-toolbar{padding:13px;border-radius:12px;}
  .catalog-search-row{gap:8px;}
  .catalog-smart-search,.catalog-search{min-height:46px;}
  .catalog{grid-template-columns:1fr!important;gap:12px!important;}
  .catalog-card{border-radius:14px;}
  .catalog-card .card-img{min-height:0!important;}
  .card-body{padding:12px;}
  .card-bottom{align-items:flex-start;}
  .categories-grid{flex-wrap:nowrap;overflow-x:auto;padding-bottom:6px;scroll-snap-type:x proximity;}
  .category-card{flex:0 0 auto;scroll-snap-align:start;min-height:42px;display:flex;align-items:center;}
  .catalog-pagination{gap:6px!important;}
  .catalog-pagination .button{min-width:42px;padding:8px 10px;}
  .catalog-page-size{width:100%;justify-content:center!important;}

  /* Item page and seller/contact actions. */
  .item{gap:16px!important;}
  .item-main-image{min-height:190px!important;max-height:54vh!important;}
  .gallery-nav{width:38px;height:38px;font-size:21px;}
  .item-thumbs{flex-wrap:nowrap;overflow-x:auto;padding-bottom:5px;}
  .item-thumb{flex:0 0 68px;width:68px!important;height:68px!important;}
  .seller-contact-actions{display:grid!important;grid-template-columns:1fr 1fr;width:100%;}
  .seller-contact-actions .button{width:100%;min-width:0!important;}

  /* Forms and uploaded photos. */
  .form,.add-listing-form{width:100%;max-width:none!important;}
  .preview-images{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
  .preview-image-card{width:100%!important;min-width:0;}
  .preview-image-card img{width:100%!important;height:auto!important;aspect-ratio:4/3;object-fit:cover;}
  .preview-image-actions button{min-height:38px;}
  .price-entry-grid{grid-template-columns:1fr!important;}

  /* Profile and security. */
  .profile-menu{margin-left:-2px;margin-right:-2px;scroll-snap-type:x proximity;}
  .profile-menu a{scroll-snap-align:start;min-height:42px;display:flex;align-items:center;}
  .security-actions,.seller-review-actions,.order-actions{gap:7px!important;}
  #secRecoveryCodes{overflow-wrap:anywhere;}

  /* Admin: tabs and tables stay usable instead of forcing page width. */
  .admin-tabs{flex-wrap:nowrap!important;overflow-x:auto;padding-bottom:6px;scroll-snap-type:x proximity;overscroll-behavior-inline:contain;}
  .admin-tabs .button{flex:0 0 auto;scroll-snap-align:start;white-space:nowrap;}
  .admin-stats-grid,.admin-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important;}
  .admin-stat-card{min-width:0;}
  .admin-form-grid,.payment-settings-two{grid-template-columns:1fr!important;}
  .admin-table-wrap,.analytics-table-wrap,.compare-scroll{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;overscroll-behavior-inline:contain;}
  .admin-table,.analytics-table{width:max-content!important;min-width:680px!important;}
  .admin-item-actions{min-width:200px!important;}
  .admin-ads-grid{grid-template-columns:1fr!important;}
  .admin-ad-fields{grid-template-columns:1fr!important;}
  .admin-ad-summary{grid-template-columns:1fr 1fr!important;max-width:none!important;}
  .notification-card{min-width:0;}

  /* Billing / order pages. */
  .billing-cart-actions{display:grid!important;grid-template-columns:1fr;}
  .billing-cart-actions select,.billing-cart-actions .button{width:100%!important;min-width:0!important;}
  .billing-order-paper{padding:14px!important;border-radius:12px;}
  .billing-order-table{display:block;width:100%;overflow-x:auto;white-space:nowrap;}
  .billing-order-actions{display:grid!important;grid-template-columns:1fr;}
  .billing-order-actions .button{width:100%;}

  /* Consent becomes a proper mobile bottom sheet and never exceeds viewport. */
  .liber-consent-layer{padding:0!important;align-items:flex-end!important;background:rgba(15,23,42,.42);}
  .liber-consent-card{width:100%!important;max-width:none!important;max-height:min(88dvh,760px);overflow:auto;border-radius:18px 18px 0 0!important;padding:16px 14px calc(16px + env(safe-area-inset-bottom,0px))!important;box-shadow:0 -14px 50px rgba(15,23,42,.28)!important;}
  .liber-consent-head h2{font-size:21px;margin-top:2px;}
  .liber-consent-head p{font-size:13px;line-height:1.45;}
  .liber-consent-row{gap:10px;padding:11px 12px;}
  .liber-consent-row.is-required{align-items:center;}
  .liber-consent-row.is-required>span{white-space:normal;text-align:right;}
  .liber-consent-actions{position:sticky;bottom:calc(-16px - env(safe-area-inset-bottom,0px));z-index:2;display:grid!important;grid-template-columns:1fr 1fr;gap:8px!important;margin:14px -14px calc(-16px - env(safe-area-inset-bottom,0px));padding:10px 14px calc(12px + env(safe-area-inset-bottom,0px));background:#fff;border-top:1px solid #e2e8f0;}
  .liber-consent-actions .button{width:100%;min-width:0;font-size:13px;padding:10px 8px;}
}

@media (max-width:460px){
  .liber-home-actions{grid-template-columns:1fr;}
  .liber-ad-right{grid-template-columns:1fr!important;}
  .liber-ad-slot-1{grid-column:auto!important;height:88px!important;}
  .liber-ad-slot-small{height:76px!important;}
  .liber-ad-left-slot{flex-basis:58vw;}
  .seller-contact-actions{grid-template-columns:1fr;}
  .preview-images{grid-template-columns:1fr 1fr;}
  .admin-stats-grid,.admin-stat-grid,.admin-ad-summary{grid-template-columns:1fr!important;}
  .liber-consent-actions{grid-template-columns:1fr;}
  .liber-consent-row{font-size:13px;}
}

/* =========================
   Stage 4 — compact mobile catalog filters
   ========================= */
.catalog-mobile-filters-btn{display:none;}
@media(max-width:760px){
  .catalog-mobile-filters-btn{display:inline-flex;align-items:center;justify-content:center;}
  main.page:not(.catalog-filters-open) .catalog-filter-detail{display:none!important;}
  main.page.catalog-filters-open .catalog-filter-detail[hidden]{display:none!important;}
  main.page.catalog-filters-open .catalog-filter-detail:not([hidden]){display:block;}
  main.page.catalog-filters-open .catalog-advanced-row.catalog-filter-detail{display:grid;}
  .catalog-filter-actions{align-items:stretch;}
}

/* Stage 5 — listing form/status lifecycle */
.listing-form-actions{display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin-top:18px}
.listing-form-actions .button{min-width:190px}
.listing-schema-warning{margin:0 0 18px;padding:12px 14px;border:1px solid #e0a800;border-radius:12px;background:#fff8db;color:#6b5400}
.my-item-status.status-draft{background:#eef2f7;color:#3d4b5f}
.my-item-status.status-blocked{background:#ffe5e5;color:#8a1f1f}
.item-status-banner.status-draft,.item-status-banner.status-blocked{display:flex;gap:8px;flex-direction:column}
.item-status-banner.status-draft{background:#eef2f7;border-color:#cfd7e3}
.item-status-banner.status-blocked{background:#fff0f0;border-color:#efb4b4}
.admin-status-pill.status-draft{background:#eef2f7}
.admin-status-pill.status-blocked{background:#ffe5e5}
@media(max-width:640px){.listing-form-actions{display:grid;grid-template-columns:1fr}.listing-form-actions .button{width:100%;min-width:0}}

/* =========================
   Stage 8 — catalog performance / UX
   ========================= */
.catalog-card .card-body h3{
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  min-height:2.5em;
  margin-bottom:7px;
}
.catalog-card .card-category{
  min-height:0;
  margin:0 0 7px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  font-size:12px;
}
.catalog-spec-summary{
  display:-webkit-box;
  -webkit-line-clamp:1;
  -webkit-box-orient:vertical;
  overflow:hidden;
  min-height:1.35em;
  margin:0;
  font-size:12px;
}
.catalog-empty{display:grid;justify-items:center;gap:8px;padding:38px 18px;}
.catalog-empty>strong{font-size:20px;}
.catalog-empty>p{max-width:620px;margin:0;line-height:1.5;}
.catalog-empty-icon{display:grid;place-items:center;width:52px;height:52px;border-radius:50%;background:color-mix(in srgb,var(--color-primary) 10%,var(--color-bg));color:var(--color-primary);font-size:30px;font-weight:700;}
.catalog-empty-actions{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin-top:8px;}

@media(max-width:760px){
  main.page:not(.catalog-filters-open) .catalog-filter-detail-inline{display:none!important;}
  main.page.catalog-filters-open .catalog-filter-detail-inline{display:block;flex:1 1 100%;width:100%;}
  .catalog-search-row{align-items:stretch;}
  .catalog-search-row>a.button{flex:1 1 calc(50% - 4px);min-width:0;padding-left:9px;padding-right:9px;}
  #resetCatalogFilters{flex:1 1 100%;}
  .catalog-card .card-body h3{min-height:auto;font-size:16px;}
  .catalog-spec-summary{font-size:11px;}
  .market-card-actions .market-action{font-size:12px;padding:9px 8px;}
  .catalog-empty-actions{width:100%;display:grid;grid-template-columns:1fr;}
  .catalog-empty-actions .button{width:100%;}
}

/* Stage 14 — messaging safety */
.dialog-item > a {
  display:block;
  padding:14px 16px;
  color:inherit;
  text-decoration:none;
  border:1px solid var(--color-border);
  border-radius:12px;
  background:#fff;
}
.dialog-title {
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  font-weight:700;
}
.dialog-item-name { margin-top:4px; font-size:13px; color:var(--color-text-muted); }
.dialog-last { margin-top:7px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.dialog-time { margin-top:5px; font-size:12px; color:var(--color-text-muted); }
.chat-blocked-badge {
  display:inline-flex;
  align-items:center;
  padding:2px 7px;
  border-radius:999px;
  border:1px solid #e0b4b4;
  background:#fff2f2;
  color:#9b2c2c;
  font-size:11px;
  font-weight:600;
}

/* LiberCom Stage 15 — transaction history */
.status-pending_seller{color:#8a5b00;background:color-mix(in srgb,#d7a600 12%,var(--color-bg))}.order-history{margin-top:14px;border-top:1px solid var(--color-border);padding-top:12px}.order-history summary{cursor:pointer;font-weight:750}.order-history-list{display:grid;gap:10px;margin:12px 0 0;padding-left:22px}.order-history-list li{display:grid;gap:2px}.order-history-list li span,.order-history-list li small{font-size:12px;color:var(--color-text-muted)}.order-card.is-focused-order{outline:2px solid color-mix(in srgb,var(--color-primary) 65%,transparent);outline-offset:2px}

/* Stage 17 — inventory / stock */
.stock-entry-section{border:1px solid var(--border,#dfe3e8);border-radius:14px;padding:16px;margin:14px 0;background:var(--card,#fff)}
.stock-entry-section h3{margin:0 0 10px}
.catalog-stock{margin:7px 0 0;font-size:.9rem;font-weight:700;color:#2e6b3e}
.catalog-stock.is-empty{color:#8a5b00}
.checkout-stock-note{display:flex;flex-direction:column;justify-content:center;gap:4px;padding:10px 0}
.checkout-stock-note span{font-size:.85rem;opacity:.7}.checkout-stock-note strong{font-size:1.05rem}

/* Stage 18 — seller controlled fulfillment */
.delivery-seller-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0}.delivery-cost-grid{margin-top:10px}.delivery-seller-grid .checkout-choice{margin:0}.stock-entry-section[hidden]{display:none!important}@media(max-width:720px){.delivery-seller-grid{grid-template-columns:1fr}}

/* Stage 21: marketplace return/problem workflow */
.order-return{margin:14px 0;padding:14px;border:1px solid var(--border,#dfe5ec);border-radius:14px;background:rgba(248,250,252,.92);display:grid;gap:8px}.order-return-head{display:flex;gap:12px;align-items:center;justify-content:space-between}.order-return-status{font-size:.9rem;font-weight:700;padding:4px 9px;border-radius:999px;background:#eef4ff}.order-return-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:4px}

/* Stage 22 — subscriptions */
.seller-follow-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:12px}.subscriptions-section{margin-top:38px}.subscriptions-list{display:grid;gap:12px;margin-top:14px}.subscription-card{display:flex;justify-content:space-between;gap:18px;align-items:center;padding:16px 18px;border:1px solid var(--border,#ddd);border-radius:14px;background:var(--surface,#fff)}.subscription-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}@media(max-width:720px){.subscription-card{align-items:flex-start;flex-direction:column}.subscription-actions{width:100%}.subscription-actions .button{flex:1}}


/* =========================================================
   LiberCom v21.66 — Stage 23
   Promotion / advertising polish / compact LiberBot
   ========================================================= */

/* User-requested: the bot stays useful but no longer dominates the page. */
@media (min-width:641px){
  .liberbot-panel{
    width:min(330px,calc(100vw - 28px))!important;
    height:min(520px,calc(100vh - 120px))!important;
    border-radius:16px;
  }
  .liberbot-head{padding:11px 12px!important;}
  .liberbot-body{padding:11px!important;gap:7px!important;}
  .liberbot-bubble{font-size:12px!important;padding:8px 10px!important;max-width:88%!important;}
  .liberbot-quick-box{padding:7px 9px!important;gap:5px!important;}
  .liberbot-quick{padding:6px 8px!important;font-size:10.5px!important;}
  .liberbot-form{padding:8px 9px 9px!important;grid-template-columns:1fr 38px!important;}
}

/* Homepage: +20% desktop advertising footprint, without squeezing the center. */
.liber-home-layout{max-width:1380px;}
@media (min-width:1281px){
  .liber-home-layout{grid-template-columns:132px minmax(0,1fr) 432px;gap:20px;}
  .liber-ad-left-slot{width:132px;height:173px;}
  .liber-ad-slot-1{height:139px;}
  .liber-ad-slot-small{width:30%;min-width:130px;height:127px;}
}
@media (min-width:1121px) and (max-width:1280px){
  .liber-home-layout{grid-template-columns:116px minmax(0,1fr) 360px;gap:16px;}
  .liber-ad-left-slot{width:116px;height:151px;}
  .liber-ad-slot-1{height:126px;}
  .liber-ad-slot-small{min-width:110px;height:114px;}
}
.liber-ad-slot{transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease;}
.liber-ad-slot:hover{transform:translateY(-2px);box-shadow:0 9px 24px rgba(15,23,42,.09);}
.liber-ad-image{transition:transform .35s ease,filter .35s ease;}
.liber-ad-slot:hover .liber-ad-image{transform:scale(1.035);filter:saturate(1.08) contrast(1.02);}

/* Livelier homepage hero without an extra heavy image download. */
.s12-home-hero{isolation:isolate;}
.s12-home-hero>*:not(.s23-hero-art){position:relative;z-index:2;}
.s23-hero-art{
  position:absolute;right:24px;top:20px;bottom:20px;width:min(34%,300px);
  display:grid;grid-template-columns:1fr 1fr;place-items:center;
  border-radius:26px;opacity:.94;z-index:1;pointer-events:none;
  background:
    radial-gradient(circle at 30% 28%,color-mix(in srgb,var(--color-gold) 34%,transparent),transparent 34%),
    radial-gradient(circle at 72% 68%,color-mix(in srgb,var(--color-primary) 24%,transparent),transparent 38%);
}
.s23-hero-art span{
  display:grid;place-items:center;width:76px;height:76px;border-radius:24px;
  font-size:43px;background:color-mix(in srgb,var(--color-bg) 88%,transparent);
  box-shadow:0 13px 35px rgba(15,23,42,.12);
  transform:rotate(-4deg);
}
.s23-hero-art span:nth-child(2),.s23-hero-art span:nth-child(4){transform:rotate(5deg);}
.s12-home-hero h1,.s12-home-hero .s12-hero-copy,.s12-home-search,.s12-home-actions{max-width:68%;}
@media(max-width:980px){
  .s23-hero-art{opacity:.18;width:42%;}
  .s12-home-hero h1,.s12-home-hero .s12-hero-copy,.s12-home-search,.s12-home-actions{max-width:none;}
}
@media(max-width:620px){.s23-hero-art{display:none;}}

/* Category cards: bigger visual anchors and richer hover motion. */
.s12-category-card{
  position:relative;overflow:hidden;min-height:82px!important;padding:14px 14px!important;
  background:
    radial-gradient(circle at 92% 12%,color-mix(in srgb,var(--color-primary) 11%,transparent),transparent 36%),
    linear-gradient(135deg,var(--s12-surface),color-mix(in srgb,var(--color-primary) 4%,var(--s12-surface)));
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}
.s12-category-card:hover{transform:translateY(-3px)!important;box-shadow:0 12px 28px rgba(15,23,42,.10);}
.s23-category-art{
  width:52px!important;height:52px!important;border-radius:17px!important;font-size:29px!important;
  background:linear-gradient(145deg,#fff,color-mix(in srgb,var(--color-primary) 12%,#fff))!important;
  box-shadow:0 8px 20px rgba(15,23,42,.10);
  transition:transform .2s ease;
}
.s12-category-card:hover .s23-category-art{transform:scale(1.08) rotate(-3deg);}
.s23-category-arrow{
  margin-left:auto;width:28px;height:28px;border-radius:999px;display:grid;place-items:center;
  color:var(--color-primary);background:color-mix(in srgb,var(--color-primary) 9%,var(--color-bg));
  font-weight:900;flex:0 0 auto;
}
.s12-category-label{font-size:14px;}
@media(max-width:600px){
  .s12-category-card{min-height:68px!important;}
  .s23-category-art{width:44px!important;height:44px!important;font-size:24px!important;}
}

/* Dedicated recommendation block for paid VIP/Premium listings. */
.s23-featured-section{margin:28px 0;}
.s23-featured-grid{grid-template-columns:repeat(3,minmax(0,1fr));}
.s23-featured-card{
  border-color:color-mix(in srgb,#8b5cf6 38%,var(--color-border));
  background:linear-gradient(155deg,color-mix(in srgb,#8b5cf6 6%,var(--color-bg)),var(--color-bg));
  box-shadow:0 9px 25px rgba(76,29,149,.08);
}
.s23-featured-reason{
  display:inline-flex;margin-top:7px;padding:4px 8px;border-radius:999px;
  background:color-mix(in srgb,#8b5cf6 10%,var(--color-bg));color:#6d28d9;font-weight:800;
}
@media(max-width:900px){.s23-featured-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:600px){.s23-featured-grid{grid-template-columns:1fr;}}

/* Stage 23 promotion purchase flow. */
.promotion-target-callout{display:flex!important;align-items:center;gap:12px;margin:20px 0 8px!important;border-color:color-mix(in srgb,var(--color-primary) 40%,var(--color-border))!important;}
.promotion-target-icon{width:48px;height:48px;display:grid;place-items:center;border-radius:14px;background:color-mix(in srgb,var(--color-primary) 10%,var(--color-bg));font-size:24px;flex:0 0 auto;}
.promotion-target-callout small{display:block;color:var(--color-text-muted);margin-top:3px;}
.promotion-explainer{margin:-6px 0 13px;}
.billing-services{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;}
.billing-service{display:grid;gap:11px;padding:15px;border:1px solid var(--color-border);border-radius:15px;background:var(--color-bg);box-shadow:0 4px 14px rgba(15,23,42,.035);}
.billing-service-head{display:flex;gap:10px;align-items:flex-start;}
.billing-service-icon{width:40px;height:40px;display:grid;place-items:center;border-radius:12px;background:var(--color-bg-soft);font-size:21px;flex:0 0 auto;}
.billing-service h3{margin:0;font-size:16px}.billing-service p{margin:4px 0 0;color:var(--color-text-muted);font-size:12px;line-height:1.45;}
.billing-service-price{font-size:20px;color:var(--color-primary);}
.billing-service label{font-size:11px;color:var(--color-text-muted);}
.billing-service select{width:100%;margin-top:4px;}
.billing-service-vip,.billing-service-premium{border-color:color-mix(in srgb,#8b5cf6 40%,var(--color-border));}
.billing-service-top{border-color:color-mix(in srgb,var(--color-primary) 35%,var(--color-border));}
.billing-service-highlight{border-color:color-mix(in srgb,#f59e0b 36%,var(--color-border));}
.billing-service-category{border-color:color-mix(in srgb,#16a34a 36%,var(--color-border));}
.promotion-duration-options{display:flex;flex-wrap:wrap;gap:7px}.promotion-duration-options .button{flex:1 1 auto;margin:0;padding:9px 10px;font-size:12px;}
.my-item-promote{border-color:color-mix(in srgb,#8b5cf6 45%,var(--color-border))!important;color:#6d28d9!important;}
@media(max-width:1000px){.billing-services{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:650px){.billing-services{grid-template-columns:1fr;}}

/* Stage 24 — seller profile / trust */
.seller-profile-type{display:inline-flex;align-items:center;padding:5px 9px;border-radius:999px;background:#eef6ff;color:#0b63ce;font-size:.82rem;font-weight:700}.seller-profile-description{max-width:760px;margin:10px 0 4px;line-height:1.55}.seller-profile-meta{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}.seller-verification-notice{margin-top:10px;padding:10px 12px;border-radius:10px;background:#fff7df;color:#6d4f00;font-size:.9rem}.seller-profile-editor textarea{resize:vertical}
fieldset.spec-field { min-width: 0; margin: 0; padding: 0; border: 0; }
fieldset.spec-field legend { padding: 0; }

/* Homepage category polish. Isolated design preview; not in the sealed release ZIP. */
.s12-category-section{
  padding:22px;border:1px solid #ccd8ee;border-radius:24px;
  background:linear-gradient(135deg,#edf3ff 0%,#f7f9ff 65%,#fff7e8 100%);
}
.s12-category-section .s12-section-head h2{color:#102447;letter-spacing:-.02em;scroll-margin-top:100px;}
.s12-category-section .text-muted{color:#475569;}
.s12-category-section .s12-section-head a{color:#214dc4;font-weight:750;}
.s12-category-section .s12-category-grid{
  grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),1fr));gap:12px;
}
.s12-category-section .s12-category-card{
  --category-accent:#365de5;--category-tint:#e8eeff;
  display:grid;grid-template-columns:44px minmax(0,1fr) 24px;align-items:center;gap:10px;
  min-width:0;min-height:104px!important;padding:15px 12px!important;
  border:1px solid #b8c8e6;border-radius:17px;background:#fff;color:#14243e;
  box-shadow:0 4px 12px rgba(30,58,110,.07),0 1px 2px rgba(30,58,110,.05);
  transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;
}
.s12-category-section .s12-category-card:nth-child(4n+2){--category-accent:#b66b18;--category-tint:#fff1db;}
.s12-category-section .s12-category-card:nth-child(4n+3){--category-accent:#17866b;--category-tint:#def6ed;}
.s12-category-section .s12-category-card:nth-child(4n){--category-accent:#7854bc;--category-tint:#f0e8ff;}
.s12-category-section .s12-category-card::before{
  content:"";position:absolute;inset:0 0 auto;height:3px;background:var(--category-accent);
}
.s12-category-section .s23-category-art{
  width:44px!important;height:48px!important;min-width:0;border-radius:14px!important;
  font-size:28px!important;background:var(--category-tint)!important;
  box-shadow:0 3px 8px rgba(30,58,110,.08);transition:transform .2s ease;
}
.s12-category-section .s12-category-label{
  min-width:0;font-size:14px;font-weight:800;line-height:1.35;color:inherit;
  overflow-wrap:anywhere;hyphens:auto;
}
.s12-category-section .s23-category-arrow{
  width:24px;height:24px;margin:0;border-radius:8px;background:#e5ecff;color:#2347b6;
  font-size:16px;line-height:1;transition:transform .2s ease,background .2s ease,color .2s ease;
}
@media(hover:hover){
  .s12-category-section .s12-category-card:hover{
    border-color:var(--category-accent);transform:translateY(-4px)!important;
    box-shadow:0 12px 25px rgba(30,58,110,.15);
  }
  .s12-category-section .s12-category-card:hover .s23-category-art{transform:translateY(-2px) rotate(-4deg);}
  .s12-category-section .s12-category-card:hover .s23-category-arrow{transform:translateX(2px);background:#294fce;color:#fff;}
}
.s12-category-section .s12-category-card:focus-visible{outline:3px solid #254ac7;outline-offset:3px;}
:root[data-theme="dark"] .s12-category-section{background:linear-gradient(135deg,#172640,#141e31);border-color:#405779;}
:root[data-theme="dark"] .s12-category-section .s12-section-head h2{color:#f3f6ff;}
:root[data-theme="dark"] .s12-category-section .text-muted{color:#c5d1e5;}
:root[data-theme="dark"] .s12-category-section .s12-section-head a{color:#adc2ff;}
:root[data-theme="dark"] .s12-category-section .s12-category-card{background:#1d2b43;border-color:#526789;color:#f3f6ff;}
@media(max-width:600px){
  .s12-category-section{padding:16px;border-radius:20px;}
  .s12-category-section .s12-section-head{align-items:flex-start;flex-wrap:wrap;gap:8px;}
  .s12-category-section .s12-category-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
  .s12-category-section .s12-category-card{
    grid-template-columns:minmax(0,1fr) 24px;grid-template-rows:48px auto;align-items:start;
    min-height:136px!important;padding:14px 12px!important;gap:10px 8px;
  }
  .s12-category-section .s23-category-art{grid-column:1;grid-row:1;}
  .s12-category-section .s23-category-arrow{grid-column:2;grid-row:1;align-self:center;}
  .s12-category-section .s12-category-label{grid-column:1/-1;grid-row:2;font-size:14px;}
}
@media(prefers-reduced-motion:reduce){
  .s12-category-section .s12-category-card,.s12-category-section .s23-category-art,.s12-category-section .s23-category-arrow{transition:none!important;transform:none!important;}
}
