body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
    sans-serif;
  background: #f5ede1;
  color: #212121;
}

/* Page Loader Styles */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.page-loader-content {
  text-align: center;
}

.app-shell.content-loading {
  opacity: 0.3;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.app-shell:not(.content-loading) {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.3s ease;
}

/* Rich Text Editor Styles */
.rich-text-editor {
  outline: none;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.rich-text-editor:focus {
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.rich-text-editor p {
  margin-bottom: 0.5rem;
}

.rich-text-editor p:last-child {
  margin-bottom: 0;
}

.rich-text-editor ul,
.rich-text-editor ol {
  margin-left: 1.5rem;
  margin-bottom: 0.5rem;
}

.rich-text-editor img {
  max-width: 100%;
  height: auto;
}

.rich-text-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.rich-text-toolbar .btn {
  border-color: #e65100;
  color: #e65100;
}

.rich-text-toolbar .btn:hover {
  background-color: rgba(230, 81, 0, 0.08);
  color: #e65100;
  border-color: #e65100;
}

.rich-text-toolbar .btn.active {
  background: linear-gradient(135deg, #ffb74d, #e65100);
  color: #121212;
  border-color: #e65100;
  box-shadow: 0 0.25rem 0.5rem rgba(230, 81, 0, 0.25);
}

.rich-text-select {
  border-color: #e65100;
  color: #212121;
}

.rich-text-select:focus {
  border-color: #ffb74d;
  box-shadow: 0 0 0 0.25rem rgba(230, 81, 0, 0.15);
}

.rich-text-block-editor {
  position: relative;
}

.media-item.selected {
  border-color: #ffb74d !important;
  background-color: rgba(255, 183, 77, 0.1);
}

/* Card Image Resize Handles */
.card-image-container {
  position: relative;
  display: inline-block;
}

.card-image-container img {
  display: block;
}

/* Card Element Drag and Drop */
.card-element-draggable {
  transition: opacity 0.2s, transform 0.2s, border-color 0.2s;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  border-radius: 4px;
  padding: 4px;
  margin: 4px 0;
  position: relative;
}

/* Убираем border из placeholder изображения, так как он уже есть в card-element-draggable */
.card-element-draggable[style*="border: 2px dashed"] {
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.card-element-draggable[style*="border: 2px dashed"]:hover {
  border: 1px solid rgba(255, 183, 77, 0.5) !important;
}

.card-element-draggable:hover {
  opacity: 0.9;
  border-color: rgba(255, 183, 77, 0.5) !important;
}

.card-element-draggable.drag-over {
  border: 2px dashed #ffb74d !important;
  background-color: rgba(255, 183, 77, 0.1) !important;
}

.card-element-draggable[draggable="true"] {
  user-select: none;
}

.card-element-draggable.selected {
  border-color: #ffb74d !important;
  background-color: rgba(255, 183, 77, 0.05) !important;
}

.card-element-drag-handle {
  position: absolute;
  top: 4px;
  left: 4px;
  background: rgba(18, 18, 18, 0.8);
  color: #fdf6eb;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  z-index: 20;
  pointer-events: auto;
  cursor: grab;
  opacity: 0;
  transition: opacity 0.2s;
}

.card-element-drag-handle:active {
  cursor: grabbing;
}

.card-element-draggable:hover .card-element-drag-handle {
  opacity: 1;
}

/* Text cursor for text elements */
.card-element-draggable .rich-text-editor {
  cursor: text;
}

.card-column-container.drag-over-column {
  border-color: #ffb74d !important;
  background-color: rgba(255, 183, 77, 0.1) !important;
  border-style: solid !important;
  border-width: 2px !important;
}

.card-nested-element {
  position: relative;
}

.info-card.drag-over-card-container {
  border: 2px dashed #ffb74d !important;
  background-color: rgba(255, 183, 77, 0.05) !important;
}

.card-column-container .btn-xs {
  font-size: 0.75rem;
  padding: 0.125rem 0.25rem;
  line-height: 1.2;
}

/* Image resize handles - универсальные для всех блоков */
.image-resize-handle {
  position: absolute;
  background-color: #ffb74d;
  border: 2px solid white;
  border-radius: 2px;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.image-resize-container:hover .image-resize-handle,
.media-image-container:hover .image-resize-handle,
.card-image-container:hover .image-resize-handle {
  opacity: 1;
}

.image-resize-container,
.media-image-container {
  position: relative;
  display: inline-block;
}

/* В редакторе: контейнер изображения не шире колонки */
.gutenberg-block-content .image-resize-container,
.gutenberg-block-content .card-image-container,
.gutenberg-block-content .media-image-container {
  display: block;
  max-width: 100%;
}

.gutenberg-block-content .image-resize-container img,
.gutenberg-block-content .card-image-container img,
.gutenberg-block-content .media-image-container img {
  max-width: 100%;
  height: auto;
}

/* На сайте: блок «Изображение» и медиа масштабируются по ширине экрана */
.cms-block-image,
.cms-anchor img,
.cms-section img.img-fluid {
  max-width: 100%;
  height: auto;
}

.card-resize-handle {
  position: absolute;
  background-color: #ffb74d;
  border: 2px solid white;
  border-radius: 2px;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.card-image-container:hover .card-resize-handle {
  opacity: 1;
}

/* Resize Tooltip */
.resize-tooltip {
  background-color: #121212;
  color: #fdf6eb;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
  user-select: none;
}

/* Context Menu Styles */
.context-menu {
  position: fixed;
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 0.25rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  z-index: 9999;
  min-width: 200px;
  padding: 0.25rem 0;
}

.context-menu-header {
  padding: 0.5rem 1rem;
  font-weight: 600;
  font-size: 0.875rem;
  border-bottom: 1px solid #dee2e6;
  background-color: #f8f9fa;
}

.context-menu-item {
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
}

.context-menu-item:hover {
  background-color: #f8f9fa;
}

.context-menu-divider {
  height: 1px;
  background-color: #dee2e6;
  margin: 0.25rem 0;
}

.context-menu-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9998;
  background: transparent;
}

.context-menu-submenu {
  min-width: 200px;
}

.context-menu-colors {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 8px;
}

.color-option {
  width: 40px;
  height: 40px;
  border: 2px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s;
}

.color-option:hover {
  transform: scale(1.1);
  border-color: #333;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Image resize handles */
.image-wrapper {
  display: inline-block;
  position: relative;
  margin: 0.25rem;
}

.image-wrapper img {
  display: block;
  max-width: 100%;
  height: auto;
}

.image-wrapper:hover .resize-handle {
  opacity: 1;
}

.image-wrapper.resizing .resize-handle {
  opacity: 1;
}

.resize-handle {
  position: absolute;
  width: 12px;
  height: 12px;
  background-color: #0d6efd;
  border: 2px solid white;
  border-radius: 2px;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.resize-handle[data-resize="nw"] {
  top: 0;
  left: 0;
  cursor: nwse-resize;
}

.resize-handle[data-resize="ne"] {
  top: 0;
  right: 0;
  cursor: nesw-resize;
}

.resize-handle[data-resize="sw"] {
  bottom: 0;
  left: 0;
  cursor: nesw-resize;
}

.resize-handle[data-resize="se"] {
  bottom: 0;
  right: 0;
  cursor: nwse-resize;
}

.resize-handle:hover {
  background-color: #0b5ed7;
  opacity: 1 !important;
}

.resize-handle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  border-top: 3px solid white;
  border-bottom: 3px solid white;
}

/* Draggable elements in rich text editor */
.rich-text-editor i[class*="bi-"] {
  cursor: move;
  display: inline-block;
  user-select: none;
}

.rich-text-editor i[class*="bi-"]:hover {
  outline: 2px dashed #0d6efd;
  outline-offset: 2px;
}

.rich-text-editor img {
  cursor: move;
  user-select: none;
}

.rich-text-editor img:hover {
  outline: 2px dashed #0d6efd;
  outline-offset: 2px;
}

.rich-text-editor .image-wrapper {
  display: inline-block;
  position: relative;
  margin: 0.25rem;
  vertical-align: middle;
}

.rich-text-editor .image-wrapper img {
  display: block;
  max-width: 100%;
  height: auto;
}

.rich-text-editor .image-wrapper:hover .resize-handle {
  opacity: 1;
}

.rich-text-editor .image-wrapper.resizing .resize-handle {
  opacity: 1;
}

.rich-text-editor .resize-handle {
  position: absolute;
  width: 12px;
  height: 12px;
  background-color: #0d6efd;
  border: 2px solid white;
  border-radius: 2px;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.rich-text-editor .resize-handle[data-resize="nw"] {
  top: 0;
  left: 0;
  cursor: nwse-resize;
}

.rich-text-editor .resize-handle[data-resize="ne"] {
  top: 0;
  right: 0;
  cursor: nesw-resize;
}

.rich-text-editor .resize-handle[data-resize="sw"] {
  bottom: 0;
  left: 0;
  cursor: nesw-resize;
}

.rich-text-editor .resize-handle[data-resize="se"] {
  bottom: 0;
  right: 0;
  cursor: nwse-resize;
}

.rich-text-editor .resize-handle:hover {
  background-color: #0b5ed7;
  opacity: 1 !important;
}

.rich-text-editor .resize-handle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  border-top: 3px solid white;
  border-bottom: 3px solid white;
}

.rich-text-editor .dragging {
  opacity: 0.5;
}

.theme-body {
  min-height: 100vh;
}

.app-shell {
  display: flex;
  min-height: 100vh;
  background: radial-gradient(circle at top left, #fdf6eb, #f1e1cb);
}

.side-nav {
  width: 270px;
  background: #121212;
  color: #fdf6eb;
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}

.side-nav-inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 1.25rem 1rem;
  min-height: 100%;
}

.side-nav-header {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}

.logo-circle {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffb74d, #e65100);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #121212;
  margin-right: 0.75rem;
}

.logo-image-wrapper {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  overflow: hidden;
  background: #ffffff;
}

.logo-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.logo-circle i {
  font-size: 1.3rem;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.cursor-pointer {
  cursor: pointer;
}

.logo-title {
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.logo-subtitle {
  font-size: 0.78rem;
  opacity: 0.7;
}

.side-nav-menu {
  flex-grow: 1;
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
}

.nav-btn {
  width: 100%;
  border: none;
  background: transparent;
  color: #f5f5f5;
  text-align: left;
  padding: 0.55rem 0.6rem;
  border-radius: 0.55rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  transition: all 0.16s ease-in-out;
}

.nav-btn i {
  font-size: 1rem;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.nav-btn-active {
  background: linear-gradient(135deg, rgba(255, 183, 77, 0.15), #1c1c1c);
  color: #ffe0b2;
  box-shadow: 0 0.6rem 1.6rem rgba(230, 81, 0, 0.4);
}

.nav-btn-child {
  font-size: 0.85rem;
  padding: 0.4rem 0.5rem;
  margin-left: 0.5rem;
}

/* Dropdown меню для пунктов с подменю */
.nav-menu-item {
  position: relative;
}

.nav-menu-item-has-children .nav-btn {
  display: flex;
  align-items: center;
}

.nav-menu-item-has-children .nav-btn .dropdown-arrow {
  font-size: 0.75rem;
  transition: transform 0.2s;
  margin-left: auto;
}

.nav-dropdown-menu {
  position: absolute;
  left: 100%;
  top: 0;
  min-width: 200px;
  background: #1c1c1c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  padding: 8px 0;
  margin-left: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-10px);
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
  z-index: 1000;
  white-space: nowrap;
}

.nav-menu-item:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.nav-menu-item:hover .nav-btn .dropdown-arrow {
  transform: rotate(90deg);
}

.nav-dropdown-item {
  display: block;
  width: 100%;
  padding: 0.55rem 0.6rem;
  text-align: left;
  background: transparent;
  border: none;
  color: #f5f5f5;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.16s ease-in-out;
  text-decoration: none;
  display: flex;
  align-items: center;
  border-radius: 0.55rem;
  margin: 0 4px;
}

.nav-dropdown-item i {
  font-size: 1rem;
}

.nav-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f5f5f5;
}

.nav-dropdown-item-active {
  background: linear-gradient(135deg, rgba(255, 183, 77, 0.15), #1c1c1c);
  color: #ffe0b2;
  box-shadow: 0 0.6rem 1.6rem rgba(230, 81, 0, 0.4);
}

.nav-dropdown-item-active:hover {
  background: linear-gradient(135deg, rgba(255, 183, 77, 0.2), #1c1c1c);
  color: #ffe0b2;
}

.side-nav-footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
  color: #b0bec5;
}

.side-contact {
  margin-bottom: 0.25rem;
}

.main-layout {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  margin-left: 270px;
}

.main-header {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  padding: 0.75rem 1.5rem;
  border-color: rgba(0, 0, 0, 0.06) !important;
  position: relative;
  /* z-index будет установлен в медиа-запросах для десктопа и мобильных */
}

.breadcrumb-wrapper .breadcrumb {
  font-size: 0.88rem;
}

.breadcrumb-item + .breadcrumb-item::before {
  color: #757575;
}

.breadcrumb a {
  color: #e65100;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.main-content {
  flex-grow: 1;
}

.cms-section {
  width: 100%;
  box-sizing: border-box;
}

.cms-section h1,
.cms-section h2,
.cms-section h3,
.cms-section h4,
.cms-section h5,
.cms-section h6,
.cms-section p,
.cms-section .mb-3 {
  color: inherit;
}

.cms-section[id],
.cms-anchor {
  scroll-margin-top: 88px;
}

.main-content--admin {
  padding-top: 0.75rem;
  padding-bottom: 1rem;
}

@media (min-width: 768px) {
  .main-content--admin {
    padding-top: 1rem;
    padding-bottom: 1.5rem;
  }
}

.admin-top-bar {
  flex-wrap: wrap;
  width: 100%;
}

.admin-top-bar__title {
  flex-shrink: 0;
}

.admin-internal-notice {
  flex: 1 1 12rem;
  min-width: 0;
  font-size: 0.8125rem;
  line-height: 1.4;
}

.admin-internal-notice__text {
  color: inherit;
}

.admin-top-bar__user {
  flex-shrink: 0;
}

@media (max-width: 991.98px) {
  .admin-internal-notice {
    flex: 1 1 100%;
    order: 3;
  }

  .admin-top-bar__user {
    order: 2;
  }
}

.text-accent {
  color: #e65100 !important;
}

.bg-accent-soft {
  background: rgba(230, 81, 0, 0.06);
}

.btn-accent {
  background: linear-gradient(135deg, #ffb74d, #e65100);
  border: none;
  color: #121212 !important;
  box-shadow: 0 0.5rem 1.5rem rgba(230, 81, 0, 0.35);
}

.btn-accent:hover {
  background: linear-gradient(135deg, #ffcc80, #ff9800);
  color: #121212 !important;
}

.btn-outline-accent {
  border-color: #e65100;
  color: #e65100;
  background: transparent;
}

.btn-outline-accent:hover {
  background-color: rgba(230, 81, 0, 0.08);
  color: #e65100;
  border-color: #e65100;
}

/* Стили для btn-outline-accent на темном фоне (шапка редактора) */
.gutenberg-editor-header .btn-outline-accent {
  border-color: rgba(255, 255, 255, 0.3);
  color: #fdf6eb;
}

.gutenberg-editor-header .btn-outline-accent:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #fdf6eb;
  border-color: rgba(255, 255, 255, 0.4);
}

.hero-card {
  border-radius: 1.5rem;
  background: radial-gradient(circle at top left, #ffe0b2, #ffffff);
  box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.15);
  overflow: hidden;
  position: relative;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 0, #ffe0b2, transparent 55%);
  opacity: 0.8;
}

.hero-content {
  position: relative;
}

.hero-logo {
  width: 3rem;
  height: 3rem;
}

.info-card {
  background: #ffffff;
  border-radius: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(0, 0, 0, 0.04);
  box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.08);
}

.product-list {
  max-height: 260px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.product-card {
  background: #fafafa;
  border-radius: 0.6rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

@media (max-width: 992px) {
  .app-shell {
    flex-direction: column;
  }

  .side-nav {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    position: relative;
    height: auto;
  }

  .side-nav-inner {
    flex-direction: row;
    align-items: center;
    padding: 0.75rem 1rem;
    position: relative;
    min-height: auto;
    flex-wrap: nowrap;
  }
  
  .main-layout {
    margin-left: 0;
  }

  /* Шапка на мобильных устройствах должна быть ниже меню */
  .main-header {
    z-index: 100 !important; /* Ниже меню (1002) */
    position: relative;
  }

  .side-nav-header {
    margin-bottom: 0;
    margin-right: 0.75rem;
    width: 100%;
    height: 60px; /* Фиксированная высота для боковой панели с кнопкой меню */
    flex-shrink: 0;
    position: relative;
    z-index: 1003; /* Выше меню (1002), чтобы кнопка меню была доступна */
  }

  /* На мобильных устройствах меню скрыто по умолчанию */
  .side-nav-menu {
    display: none !important;
    flex-direction: column;
    position: fixed;
    top: 60px; /* Под боковой панелью с кнопкой меню */
    left: 0;
    right: 0;
    width: 100vw;
    background: #1a1a1a;
    padding: 1rem;
    box-shadow: 0 0.75rem 1.8rem rgba(0, 0, 0, 0.5);
    z-index: 1002 !important; /* Выше контента, но ниже кнопки меню */
    max-height: calc(100vh - 60px); /* Вычитаем высоту боковой панели */
    overflow-y: auto;
    margin: 0;
  }

  .side-nav-menu.side-nav-menu-open {
    display: flex !important;
  }

  .nav-btn {
    white-space: normal;
    font-size: 0.85rem;
    padding-inline: 0.4rem;
  }

  /* Мобильное dropdown меню */
  .nav-dropdown-menu {
    position: static;
    left: auto;
    top: auto;
    min-width: auto;
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0.25rem 0 0.25rem 1rem;
    margin-left: 0;
    margin-top: 0.25rem;
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    overflow: hidden;
    transform: none;
    transition: opacity 0.2s, visibility 0.2s, max-height 0.3s, padding 0.3s;
  }

  .nav-menu-item-expanded .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    max-height: 500px;
    padding: 0.5rem 0 0.5rem 1rem;
  }

  .nav-menu-item-expanded .nav-btn .dropdown-arrow {
    transform: rotate(90deg);
  }

  .nav-dropdown-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.4rem 0.5rem;
    margin: 0.15rem 0;
  }

  .side-nav-footer {
    display: none;
  }

  .mobile-menu-toggle {
    margin-left: auto;
    border: none;
    background: transparent;
    color: #f5f5f5;
    font-size: 1.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 992px) {
  /* Скрываем весь header (шапку) на мобильных устройствах */
  .main-header {
    display: none !important;
  }
  
  /* Скрываем хлебные крошки на мобильных устройствах (на случай, если header используется где-то еще) */
  .breadcrumb-wrapper {
    display: none;
  }
  
  /* Скрываем корзину в шапке на мобильных устройствах (на случай, если header используется где-то еще) */
  .cart-header-button {
    display: none;
  }
}

@media (max-width: 576px) {
  /* Стили для очень маленьких экранов */
}

@media (min-width: 993px) {
  .mobile-menu-toggle {
    display: none;
  }
  
  /* На десктопе шапка должна быть выше контента */
  .main-header {
    z-index: 1000;
  }
  
  /* На десктопе меню должно отображаться нормально (вертикально) */
  .side-nav-menu {
    display: flex !important;
    flex-direction: column !important;
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    width: auto !important;
    background: transparent !important;
    padding: 0 !important;
    padding-top: 0 !important;
    box-shadow: none !important;
    z-index: auto !important;
    max-height: none !important;
    overflow-y: visible !important;
    margin: 0 !important;
    margin-top: 0.75rem !important;
  }
}

/* Плавающая кнопка корзины для мобильных устройств */
.floating-cart-button {
  display: none; /* По умолчанию скрыта */
}

@media (max-width: 992px) {
  .floating-cart-button {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffb74d, #e65100);
    border: none;
    color: #121212;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(230, 81, 0, 0.4);
    z-index: 1000;
    cursor: pointer;
    transition: all 0.3s ease;
  }
  
  .floating-cart-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(230, 81, 0, 0.5);
  }
  
  .floating-cart-button:active {
    transform: scale(0.95);
  }
  
  .floating-cart-button-active {
    background: linear-gradient(135deg, #ffcc80, #ff9800);
  }
  
  .floating-cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    border: 2px solid #1a1a1a;
  }
}

/* Setup Wizard Styles */
.setup-wizard-body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at top left, #fdf6eb, #f1e1cb) !important;
}

.setup-wizard-body #setup-wizard-app {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

/* Admin Login Page Styles */
.admin-login-body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at top left, #fdf6eb, #f1e1cb) !important;
}

.admin-login-body #admin-login-app {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.setup-wizard {
  width: 100%;
  max-width: 800px;
}

.setup-container {
  width: 100%;
}

.setup-header {
  margin-bottom: 2rem;
}

.setup-header .logo-circle {
  width: 80px;
  height: 80px;
  margin-right: 0;
  margin-bottom: 1rem;
}

.setup-header .logo-circle i {
  font-size: 2.5rem;
}

.setup-content {
  background: #ffffff;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.1);
}

.setup-form .info-card {
  background: #fafafa;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.setup-form .form-label {
  font-weight: 500;
  color: #424242;
  margin-bottom: 0.5rem;
}

.setup-form .form-control,
.setup-form .form-select {
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 0.5rem;
}

.setup-form .form-control:focus,
.setup-form .form-select:focus {
  border-color: #e65100;
  box-shadow: 0 0 0 0.2rem rgba(230, 81, 0, 0.15);
}

@media (max-width: 768px) {
  .setup-content {
    padding: 1.5rem;
  }
}

/* Modal styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  outline: 0;
  display: none;
}

.modal.show {
  display: flex !important;
  align-items: center;
  justify-content: center;
}

.modal-dialog {
  position: relative;
  width: auto;
  margin: 0.5rem;
  pointer-events: none;
  max-width: 500px;
}

.modal-dialog.modal-lg {
  max-width: 800px;
}

.modal.contact-form-modal .modal-dialog {
  width: 50vw;
  max-width: 50vw;
}

.modal.contact-form-modal .modal-title {
  color: #1e1e1e;
  font-weight: 600;
}

@media (max-width: 768px) {
  .modal.contact-form-modal .modal-dialog {
    width: 95vw;
    max-width: 95vw;
  }
}

.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  pointer-events: auto;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 0.375rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  outline: 0;
}

.modal-header {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1rem;
  border-bottom: 1px solid #dee2e6;
  border-top-left-radius: calc(0.375rem - 1px);
  border-top-right-radius: calc(0.375rem - 1px);
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 22px;
  line-height: 1;
  color: #666;
  padding: 0;
  cursor: pointer;
}

.modal-close-btn:hover {
  color: #000;
}

.modal-title {
  margin-bottom: 0;
  line-height: 1.5;
}

.modal-body {
  position: relative;
  flex: 1 1 auto;
  padding: 1rem;
}

.modal-footer {
  display: flex;
  flex-wrap: wrap;
  flex-shrink: 0;
  align-items: center;
  justify-content: flex-end;
  padding: 0.75rem;
  border-top: 1px solid #dee2e6;
  border-bottom-right-radius: calc(0.375rem - 1px);
  border-bottom-left-radius: calc(0.375rem - 1px);
}

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1040;
  width: 100vw;
  height: 100vh;
  background-color: #000;
}

.modal-backdrop.show {
  opacity: 0.5;
}

/* WordPress Gutenberg Style Editor */
.gutenberg-editor {
  display: flex;
  height: calc(100vh - 60px);
  background: #f5ede1;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.gutenberg-editor-left-menu {
  width: var(--gutenberg-left-menu-width, 300px);
  min-width: var(--gutenberg-left-menu-width, 300px);
  flex-shrink: 0;
  background: #121212;
  color: #fdf6eb;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  overflow-y: auto;
  padding: 0;
}

@media (min-width: 1200px) {
  .gutenberg-editor-left-menu {
    --gutenberg-left-menu-width: 340px;
  }
}

@media (min-width: 1600px) {
  .gutenberg-editor-left-menu {
    --gutenberg-left-menu-width: 380px;
  }
}

.gutenberg-editor-content {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 20px;
  margin: 0;
  min-width: 0;
  width: auto;
  max-width: none;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.gutenberg-container {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box;
  display: block;
  margin-left: 0 !important;
  margin-right: 0 !important;
  overflow: visible;
}

.gutenberg-editor-content > div {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box;
  flex: 1 1 auto;
  align-self: stretch;
}

.gutenberg-editor-content > div > div {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.gutenberg-column {
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
  overflow: visible;
}

.gutenberg-block {
  background: white;
  border: 1px solid transparent;
  border-radius: 4px;
  margin-bottom: 1rem;
  position: relative;
  transition: all 0.2s;
  padding: 0;
  overflow: visible;
}

.gutenberg-block:hover {
  border-color: #ffb74d;
  box-shadow: 0 2px 8px rgba(255, 183, 77, 0.2);
}

.gutenberg-block.selected {
  border-color: #ffb74d;
  box-shadow: 0 0 0 2px #ffb74d;
}

.gutenberg-block.drag-over {
  border-top: 3px solid #ffb74d;
}

.gutenberg-container.selected {
  border-color: #ffb74d;
  box-shadow: 0 0 0 2px rgba(255, 183, 77, 0.2);
}

.gutenberg-container.drag-over {
  border-color: #ffb74d;
  box-shadow: 0 0 0 2px rgba(255, 183, 77, 0.3);
}

/* Toolbar stack — floats above element, does not cover content */
.gutenberg-toolbar-stack {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  z-index: 25;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin-bottom: 2px;
  max-width: 100%;
  pointer-events: auto;
}

.gutenberg-toolbar-stack--column {
  left: 0;
  right: 0;
}

.gutenberg-toolbar-stack--block {
  position: relative;
  left: 0;
  right: 0;
  bottom: auto;
  margin-bottom: 6px;
}

.gutenberg-toolbar-row {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  background: #121212;
  color: #fdf6eb;
  padding: 5px 8px;
  border-radius: 4px 4px 0 0;
  min-height: 32px;
}

.gutenberg-toolbar-title {
  font-size: 11px;
  font-weight: 600;
  color: #fdf6eb;
  margin-right: 4px;
  white-space: nowrap;
}

.gutenberg-toolbar-spacer {
  flex: 1;
  min-width: 8px;
}

.gutenberg-toolbar-settings {
  background: #1a1a1a;
  color: #fdf6eb;
  padding: 6px 10px;
  border-radius: 0 0 4px 4px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-size: 11px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.gutenberg-toolbar-settings--block {
  max-height: min(200px, 40vh);
  overflow-x: hidden;
  overflow-y: auto;
  align-items: center;
  gap: 4px 8px;
  padding: 4px 8px;
}

.gutenberg-toolbar-settings .tb-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.gutenberg-toolbar-settings .tb-label {
  color: rgba(253, 246, 235, 0.65);
  font-size: 10px;
  white-space: nowrap;
}

.gutenberg-toolbar-settings .tb-control,
.gutenberg-toolbar-settings .tb-num {
  background: #2a2a2a;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fdf6eb;
  border-radius: 3px;
  padding: 2px 6px;
  font-size: 11px;
  max-width: 100px;
}

.gutenberg-toolbar-settings .tb-num {
  width: 44px;
}

.gutenberg-toolbar-settings .tb-color {
  width: 26px;
  height: 22px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 3px;
  cursor: pointer;
}

.gutenberg-toolbar-settings .tb-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fdf6eb;
  border-radius: 3px;
  padding: 1px 6px;
  font-size: 11px;
  line-height: 1.2;
  cursor: pointer;
}

.gutenberg-toolbar-settings .tb-btn:hover {
  border-color: #ffb74d;
  color: #ffb74d;
}

.gutenberg-toolbar-settings .tb-icon-btn {
  background: #2a2a2a;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(253, 246, 235, 0.85);
  border-radius: 3px;
  padding: 2px 5px;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  min-width: 24px;
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.gutenberg-toolbar-settings .tb-icon-btn:hover {
  border-color: #ffb74d;
  color: #ffb74d;
}

.gutenberg-toolbar-settings .tb-icon-btn--active {
  background: #e65100;
  border-color: #ffb74d;
  color: #fff;
}

.gutenberg-toolbar-settings .tb-icon-muted {
  color: rgba(253, 246, 235, 0.5);
  font-size: 12px;
}

.gutenberg-toolbar-settings .tb-select {
  width: auto;
  min-width: 36px;
  max-width: 52px;
  padding: 2px 4px;
}

.gutenberg-toolbar-settings .tb-control--alt {
  width: min(120px, 22vw);
  max-width: 120px;
}

.gutenberg-toolbar-settings .tb-num--xs {
  width: 36px;
  min-width: 36px;
  padding: 2px 4px;
}

.gutenberg-toolbar-settings .tb-corners-grid {
  display: inline-flex;
  gap: 4px;
  flex-wrap: wrap;
}

.gutenberg-toolbar-settings .tb-corner-cell {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.gutenberg-toolbar-settings .tb-check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: rgba(253, 246, 235, 0.85);
  margin: 0;
  font-size: 11px;
  cursor: pointer;
}

.tb-visibility-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.tb-vis-btn {
  background: #2a2a2a;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fdf6eb;
  border-radius: 3px;
  padding: 2px 6px;
  font-size: 12px;
  cursor: pointer;
}

.tb-vis-btn--active {
  background: #e65100;
  border-color: #ffb74d;
}

/* Block settings in dark toolbar */
.gutenberg-toolbar-settings--block .gutenberg-sidebar-field,
.gutenberg-toolbar-settings--block .gutenberg-sidebar-section-title,
.gutenberg-toolbar-settings--block label {
  color: rgba(253, 246, 235, 0.75);
  font-size: 11px;
  margin-bottom: 4px;
}

.gutenberg-toolbar-settings--block .gutenberg-sidebar-section-title {
  color: #ffb74d;
  font-size: 11px;
  margin: 8px 0 4px;
  width: 100%;
}

.gutenberg-toolbar-settings--block input:not([type="checkbox"]):not([type="color"]),
.gutenberg-toolbar-settings--block select,
.gutenberg-toolbar-settings--block textarea {
  background: #2a2a2a;
  border-color: rgba(255, 255, 255, 0.2);
  color: #fdf6eb;
  font-size: 11px;
}

.gutenberg-toolbar-settings--block .btn-outline-accent {
  border-color: #ffb74d;
  color: #ffb74d;
  font-size: 11px;
  padding: 2px 8px;
}

.gutenberg-toolbar-settings--block .btn-outline-secondary {
  border-color: rgba(255, 255, 255, 0.3);
  color: #fdf6eb;
  font-size: 11px;
}

.gutenberg-toolbar-settings--block .gutenberg-sidebar-field {
  margin-bottom: 8px;
  min-width: 140px;
  flex: 1 1 140px;
}

.gutenberg-toolbar-settings--block .row {
  margin-left: -4px;
  margin-right: -4px;
}

.gutenberg-toolbar-settings--block .image-settings-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  width: 100%;
  flex: 1 1 100%;
}

.gutenberg-toolbar-settings--block .image-border-settings--compact {
  display: contents;
}

.gutenberg-toolbar-settings--block .image-border-settings {
  width: auto;
  flex: 1 1 auto;
}

.container-columns-selector {
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fdf6eb;
  padding: 4px 8px;
  border-radius: 3px;
  font-size: 12px;
  margin-right: 8px;
  cursor: pointer;
}

.container-columns-selector:hover {
  background: #2a2a2a;
}

.container-columns-selector:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.4);
  background: #2a2a2a;
}

.container-columns-selector option {
  background: #1a1a1a;
  color: #fdf6eb;
}

.toolbar-btn {
  background: none;
  border: none;
  color: #fdf6eb;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 12px;
  transition: opacity 0.2s;
}

.toolbar-btn:hover {
  opacity: 0.8;
}

.toolbar-btn-delete {
  color: #ff6b6b;
}

.toolbar-btn-delete:hover {
  color: #ff5252;
}

.gutenberg-block-content {
  padding: 0;
  min-height: 60px;
}

.gutenberg-block-preview {
  pointer-events: none;
}

.gutenberg-block-insert {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  z-index: 5;
}

.gutenberg-block-insert-top {
  top: -20px;
}

.gutenberg-block-insert-bottom {
  bottom: -20px;
  top: auto;
}

.gutenberg-block:hover .gutenberg-block-insert {
  display: block;
}


.gutenberg-block-insert-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ffb74d;
  color: white;
  border: 2px solid white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  padding: 0;
  line-height: 1;
}

.gutenberg-block-insert-btn i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 20px;
  line-height: 1;
}

.gutenberg-block-insert-btn:hover {
  background: #e65100;
}

.gutenberg-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

/* Стили для .gutenberg-empty-state-btn удалены - используется btn-accent */

/* Left Menu Styles - Similar to Admin Panel */
.gutenberg-left-menu-inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 1.25rem 1.15rem;
  height: 100%;
}

.gutenberg-left-menu-header {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.gutenberg-left-menu-nav {
  flex-grow: 1;
  margin-top: 0.75rem;
}

.gutenberg-left-menu-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s;
  border-radius: 0.55rem;
}

.gutenberg-left-menu-category-header:hover {
  background-color: rgba(255, 183, 77, 0.1);
}

.gutenberg-left-menu-category-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fdf6eb;
}

.gutenberg-left-menu-category-items {
  padding-left: 0.5rem;
}

.gutenberg-left-menu-item {
  width: 100%;
  border: none;
  background: transparent;
  color: #f5f5f5;
  text-align: left;
  padding: 0.55rem 0.75rem 0.55rem 1.5rem;
  border-radius: 0.55rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
  transition: all 0.16s ease-in-out;
  white-space: normal;
  line-height: 1.35;
}

.gutenberg-left-menu-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.gutenberg-left-menu-item i {
  font-size: 1rem;
  margin-right: 0.5rem;
  width: 20px;
  text-align: center;
}

.gutenberg-editor-sidebar {
  width: 360px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border-left: 1px solid #ddd;
  overflow-y: auto;
  padding: 24px;
  position: fixed;
  right: 0;
  top: 60px;
  height: calc(100vh - 60px);
  z-index: 100;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
}

.gutenberg-sidebar-section {
  margin-bottom: 24px;
}

.gutenberg-sidebar-section-title {
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  color: #1e1e1e;
  margin-bottom: 12px;
}

.gutenberg-sidebar-field {
  margin-bottom: 16px;
}

.gutenberg-sidebar-field label {
  display: block;
  font-weight: 500;
  font-size: 13px;
  margin-bottom: 6px;
  color: #1e1e1e;
}

.gutenberg-sidebar-field input,
.gutenberg-sidebar-field select,
.gutenberg-sidebar-field textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.gutenberg-sidebar-field input:focus,
.gutenberg-sidebar-field select:focus,
.gutenberg-sidebar-field textarea:focus {
  border-color: #ffb74d;
  box-shadow: 0 0 0 0.25rem rgba(255, 183, 77, 0.15);
  outline: none;
}

.block-type-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.notification {
  position: fixed;
  top: 80px;
  right: 20px;
  background: #121212;
  color: #fdf6eb;
  padding: 12px 20px;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 250px;
  animation: slideIn 0.3s ease-out, fadeOut 0.3s ease-in 2.7s;
  opacity: 1;
}

.notification.success {
  border-left: 4px solid #4caf50;
}

.notification.error {
  border-left: 4px solid #f44336;
}

.notification-icon {
  font-size: 20px;
}

.notification.success .notification-icon {
  color: #4caf50;
}

.notification.error .notification-icon {
  color: #f44336;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* Menu Tree Styles */
.menu-tree {
  user-select: none;
}

.menu-tree-node {
  position: relative;
}

.menu-tree-node-content {
  transition: all 0.2s;
}

.menu-tree-node-content:hover {
  background: #f8f9fa !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.menu-tree-node-dragged .menu-tree-node-content {
  opacity: 0.5;
}

.menu-tree-node-drag-target .menu-tree-node-content {
  border-color: #ffb74d !important;
  box-shadow: 0 0 0 2px rgba(255, 183, 77, 0.3) !important;
}

.menu-tree-node-handle {
  user-select: none;
}

.menu-tree-node-handle:active {
  cursor: grabbing;
}

.menu-tree-node-children {
  margin-top: 4px;
}

/* CMS: видимость блоков/секций на сайте */
.cms-visibility-wrap {
  display: block;
}

@media (max-width: 767.98px) {
  .cms-hide-mobile.cms-visibility-wrap {
    display: none !important;
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .cms-hide-tablet.cms-visibility-wrap {
    display: none !important;
  }
}

@media (min-width: 992px) {
  .cms-hide-desktop.cms-visibility-wrap {
    display: none !important;
  }
}

/* Редактор: симуляция ширины экрана */
.editor-canvas-scroll {
  background: #e0d6c8;
}

.editor-canvas-frame {
  width: 100%;
  padding: 48px 16px 32px;
  box-sizing: border-box;
  transition: max-width 0.25s ease;
}

.editor-canvas-frame--tablet,
.editor-canvas-frame--mobile {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  background: #f5ede1;
  border-radius: 8px;
  margin-top: 12px;
  margin-bottom: 12px;
}

.editor-canvas-frame--mobile .gutenberg-column {
  flex: 1 1 100% !important;
  max-width: 100% !important;
  width: 100% !important;
}

.gutenberg-container--hidden-viewport,
.gutenberg-block--hidden-viewport {
  opacity: 0.42;
  outline: 2px dashed #ff9800;
  outline-offset: 2px;
}

.editor-viewport-hidden-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 50;
  background: #ff9800;
  color: #121212;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  pointer-events: none;
}

.editor-viewport-hidden-badge--block {
  top: auto;
  bottom: 4px;
  left: 4px;
}

/* Превью редактора: ширина viewport */
.preview-viewport-wrap {
  margin: 0 auto;
  transition: max-width 0.25s ease;
  width: 100%;
}

.preview-viewport-wrap--tablet {
  max-width: 768px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.preview-viewport-wrap--mobile {
  max-width: 375px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

/* SEO-панель в редакторе */
.page-seo-panel {
  padding-bottom: 24px;
}

.seo-snippet-preview {
  background: #fff;
  border-radius: 8px;
  padding: 12px 14px;
  font-family: Arial, sans-serif;
  border: 1px solid #e8e0d4;
}

.seo-snippet-url {
  font-size: 12px;
  color: #5f6368;
  line-height: 1.4;
  word-break: break-all;
  margin-bottom: 2px;
}

.seo-snippet-title {
  font-size: 18px;
  color: #1a0dab;
  line-height: 1.3;
  margin-bottom: 4px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.image-inline-toolbar {
  font-size: 0.875rem;
}

.text-inline-image-wrap img {
  vertical-align: top;
}

.image-block-editor .image-resize-container {
  display: block;
  max-width: 100%;
  line-height: 0;
}

.image-block-editor .image-resize-container img {
  max-width: 100%;
  height: auto;
}

.text-inline-image-wrap {
  line-height: 0;
  max-width: 100%;
}

.text-inline-image-wrap img {
  max-width: 100%;
  height: auto;
}


.seo-snippet-desc {
  font-size: 13px;
  color: #4d5156;
  line-height: 1.45;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

