/* =============================================
   Inn-Book App Store — Chrome Web Store style
   ============================================= */

:root {
  --app-primary: #FF8605;
  --app-primary-dark: #e04a0f;
  --app-bg: #f4f5f9;
  --app-card-bg: #ffffff;
  --app-text: #1a1a2e;
  --app-text-secondary: #6b7280;
  --app-border: #e5e7eb;
  --app-radius: 12px;
  --app-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* ========== GLOBAL ========== */
body {
  margin: 0;
  padding: 0;
  background: var(--app-bg);
  color: var(--app-text);
  line-height: 1.6;
  overflow-y: scroll;
  overflow-x: hidden;
}

/* ========== HERO ========== */
.appstore-hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: #fff;
  padding: 60px 24px;
  text-align: center;
  position: relative;
}

.appstore-hero-content {
  max-width: 720px;
  margin: 0 auto;
}

.appstore-hero h1 {
  font-size: 42px;
  font-weight: 800;
  margin: 0 0 12px;
  letter-spacing: -1px;
}

.appstore-hero p {
  font-size: 18px;
  opacity: .85;
  margin: 0;
  line-height: 1.6;
}

/* ========== CONTAINER ========== */
.appstore-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px 60px;
}

/* ========== SEARCH BAR ========== */
.appstore-search {
  position: relative;
  z-index: 20;
  max-width: 1280px;
  margin: -28px auto 0;
  padding: 0 24px;
}

.appstore-search-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--app-card-bg);
  border-radius: 16px;
  padding: 6px 6px 6px 18px;
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  transition: box-shadow .2s;
  position: relative;
}

.appstore-search-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 2px;
  background: #d1d1d1;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  transition: background .3s;
}

.appstore-search-inner:focus-within {
  box-shadow: 0 6px 28px rgba(255,90,31,.20);
}

.appstore-search-inner:focus-within::before {
  background: #cfcfcf;
}

.appstore-search .search-icon {
  font-size: 18px;
  line-height: 1;
  color: var(--app-text-secondary);
  flex-shrink: 0;
}

.appstore-search input {
  flex: 1;
  min-width: 0;
  padding: 10px 6px;
  border: none;
  border-radius: 0;
  font-size: 15px;
  background: transparent;
  color: var(--app-text);
  outline: none;
}

.appstore-search input::placeholder {
  color: #9ca3af;
}

.search-clear {
  display: none;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: none;
  background: var(--app-bg);
  border-radius: 50%;
  cursor: pointer;
  font-size: 13px;
  color: var(--app-text-secondary);
  transition: background .2s, color .2s;
  flex-shrink: 0;
  line-height: 1;
}

.search-clear:hover {
  background: #e5e7eb;
  color: var(--app-text);
}

.search-clear.visible {
  display: flex;
}

/* ========== BREADCRUMBS ========== */
.appstore-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  margin-bottom: 20px;
  color: var(--app-text-secondary);
}

.appstore-breadcrumbs a {
  color: var(--app-text-secondary);
  text-decoration: none;
  transition: color .2s;
  font-weight: 500;
}

.appstore-breadcrumbs a:hover {
  color: var(--app-primary);
}

.appstore-breadcrumbs .breadcrumb-sep {
  font-size: 18px;
  line-height: 1;
  color: #9ca3af;
}

.appstore-breadcrumbs .breadcrumb-current {
  color: var(--app-text);
  font-weight: 600;
}

/* ========== CATEGORIES ========== */
.appstore-categories {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

/* ========== FILTERS ========== */
.appstore-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--app-border);
  padding-bottom: 16px;
}

.appstore-filter {
  padding: 7px 18px;
  border: 1px solid var(--app-border);
  border-radius: 20px;
  background: transparent;
  color: var(--app-text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all .2s;
  font-weight: 500;
}

.appstore-filter:hover {
  border-color: var(--app-primary);
  color: var(--app-primary);
}

.appstore-filter.active {
  background: var(--app-primary);
  color: #fff;
  border-color: var(--app-primary);
}

.appstore-category {
  padding: 8px 18px;
  border: 1px solid var(--app-border);
  border-radius: 20px;
  background: transparent;
  color: var(--app-text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: all .2s;
  font-weight: 500;
}

.appstore-category:hover {
  border-color: var(--app-primary);
  color: var(--app-primary);
}

.appstore-category.active {
  background: var(--app-primary);
  color: #fff;
  border-color: var(--app-primary);
}

/* ========== PRERELEASE SECTION ========== */
.appstore-prerelease-section {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 2px dashed var(--app-border);
}

.appstore-section-subtitle {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--app-text-secondary);
}

/* Prerelease badge on card */
.ext-prerelease-badge {
  position: absolute;
  top: -9px;
  left: 12px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 8px;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  box-shadow: 0 2px 8px rgba(139,92,246,.35);
  pointer-events: none;
  white-space: nowrap;
}

.ext-card.prerelease {
  border-color: #8b5cf640;
}

.ext-card.prerelease:hover {
  border-color: #8b5cf6;
  box-shadow: 0 6px 18px rgba(139,92,246,.12);
}

/* ========== RESULT BAR ========== */
.appstore-result-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.appstore-result-bar span {
  font-size: 15px;
  color: var(--app-text-secondary);
  font-weight: 500;
}

/* ========== SECTION TITLE ========== */
.appstore-section-title {
  margin-bottom: 16px;
}

.appstore-section-title h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
}

/* ===================================================
   EXTENSION CARDS — Chrome Web Store Style
   =================================================== */
.appstore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

/* <a> as card — reset link styles */
a.ext-card {
  display: block;
  text-decoration: none;
  color: inherit;
}

.ext-card {
  background: var(--app-card-bg);
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  box-shadow: var(--app-shadow);
  transition: all .25s;
  cursor: pointer;
  position: relative;
}

.ext-card:hover {
  box-shadow: 0 6px 18px rgba(0,0,0,.1);
  transform: translateY(-2px);
  border-color: var(--app-primary);
}

.ext-card.recommended::before {
  content: "⭐ Рекомендовано";
  position: absolute;
  top: -9px;
  left: 12px;
  z-index: 10;
  background: var(--app-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
  line-height: 1.4;
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}

.ext-card-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: var(--app-radius);
  overflow: hidden;
}

/* Info section — horizontal layout */
.ext-info {
  display: flex;
  gap: 12px;
  padding: 16px 16px 8px;
  flex: 1;
  align-items: flex-start;
}

.ext-info-left {
  flex: 1;
  min-width: 0;
}

/* Icon section — right side */
.ext-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 16px;
}

.ext-icon {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 14px;
}

.ext-name {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}

.ext-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.ext-rating .star {
  font-size: 14px;
  color: #d1d5db;
  line-height: 1;
}

.ext-rating .star.filled {
  color: #f59e0b;
}

.ext-rating-num {
  font-size: 12px;
  font-weight: 600;
  color: var(--app-text-secondary);
}

.ext-desc {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--app-text-secondary);
  line-height: 1.5;
}

/* Publisher */
.ext-publisher {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--app-text-secondary);
  flex-wrap: wrap;
}

.ext-publisher .publisher-icon {
  font-size: 12px;
  line-height: 1;
}

.ext-publisher .publisher-name {
  font-weight: 500;
  color: var(--app-text);
}

.ext-publisher .publisher-sep {
  color: #d1d5db;
}

.ext-publisher .publisher-org {
  color: var(--app-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color .2s;
}

.ext-publisher .publisher-org:hover {
  text-decoration: underline;
  color: var(--app-primary-dark);
}

/* Footer section */
.ext-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 14px;
  border-top: 1px solid var(--app-border);
  margin-top: auto;
}

.ext-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--app-primary);
}

.ext-price.free {
  color: #10b981;
}

.ext-install-btn {
  display: inline-block;
  padding: 6px 18px;
  border-radius: 20px;
  background: var(--app-card-bg);
  color: var(--app-text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
  border: 1px solid var(--app-border);
  text-align: center;
  letter-spacing: .3px;
}

.ext-install-btn:hover {
  border-color: var(--app-primary);
  color: var(--app-primary);
  background: #fff5f0;
}

/* Installed badge on card — top-right corner */
.ext-card.installed {
  border-color: #10b98140;
}
.ext-card.installed:hover {
  border-color: #10b981;
}

.ext-installed-badge {
  position: absolute;
  top: -9px;
  right: 12px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 8px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  box-shadow: 0 2px 8px rgba(16,185,129,.35);
  pointer-events: none;
  white-space: nowrap;
}

.ext-installed-badge .badge-icon {
  font-size: 11px;
  line-height: 1;
}

.ext-installed-badge .badge-date {
  opacity: .85;
  font-weight: 500;
}

/* ========== EMPTY STATE ========== */
.appstore-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--app-text-secondary);
  grid-column: 1 / -1;
}

.appstore-empty .empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.appstore-empty h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 600;
}

.appstore-empty p {
  margin: 0;
  font-size: 14px;
}

/* ========== MODAL ========== */
.appstore-modal-overlay {
  display: flex;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: background .6s ease, opacity .6s ease, visibility 0s .6s;
  will-change: opacity, background;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
}

.appstore-modal-overlay.active {
  background: rgba(0,0,0,.5);
  opacity: 1;
  visibility: visible;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background .6s ease, opacity .6s ease, visibility 0s 0s, backdrop-filter .6s ease;
}

.appstore-modal {
  background: var(--app-card-bg);
  border-radius: 16px;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 30px 80px rgba(0,0,0,.4);
  opacity: 0;
  transform: scale(0.7) translateY(60px);
  transition: transform .65s cubic-bezier(0.34, 1.56, 0.64, 1), opacity .5s ease;
  will-change: transform, opacity;
}

.appstore-modal-overlay.active .appstore-modal {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.appstore-modal-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--app-border);
}

.appstore-modal-header .modal-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  object-fit: cover;
  flex-shrink: 0;
}

.modal-title-group {
  flex: 1;
}

.modal-title-group h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.modal-title-group .modal-version {
  font-size: 13px;
  color: var(--app-text-secondary);
  margin-top: 2px;
}

.appstore-modal-close {
  background: var(--app-bg);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--app-text-secondary);
  transition: background .2s, transform .2s;
}

.appstore-modal-close:hover {
  background: #e5e7eb;
  transform: rotate(90deg);
}


.appstore-modal-body {
  padding: 20px 24px;
}

.modal-description {
  font-size: 14px;
  line-height: 1.7;
  color: var(--app-text);
  margin-bottom: 20px;
}

.modal-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.modal-meta-item {
  background: var(--app-bg);
  padding: 10px 14px;
  border-radius: 8px;
}

.modal-meta-item .meta-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--app-text-secondary);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 2px;
}

.modal-meta-item .meta-value {
  font-size: 14px;
  font-weight: 600;
}

.modal-meta-item .meta-value.free {
  color: #10b981;
}

.appstore-modal-footer {
  padding: 14px 24px 20px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  border-top: 1px solid var(--app-border);
}

.appstore-modal-footer .btn-primary,
.appstore-modal-footer .btn-secondary {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s, transform .15s;
  border: none;
}

.appstore-modal-footer .btn-primary:active,
.appstore-modal-footer .btn-secondary:active {
  transform: scale(0.96);
}

.appstore-modal-footer .btn-primary {
  background: var(--app-primary);
  color: #fff;
}

.appstore-modal-footer .btn-primary:hover {
  background: var(--app-primary-dark);
}

.appstore-modal-footer .btn-secondary {
  background: var(--app-bg);
  color: var(--app-text);
}

.appstore-modal-footer .btn-secondary:hover {
  background: #e5e7eb;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 700px) {
  .appstore-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 701px) and (max-width: 1024px) {
  .appstore-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1025px) {
  .appstore-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 599px) {
  .appstore-hero h1 { font-size: 28px; }
  .appstore-hero p { font-size: 15px; }
  .appstore-hero { padding: 40px 16px; }
  .appstore-search { padding: 0 16px; }
  .appstore-search-inner { flex-wrap: wrap; padding: 10px 14px; }
  .appstore-search input { width: 100%; padding: 8px 0; }
  .modal-meta { grid-template-columns: 1fr; }
}

/* =============================================
   CARD MODULE (cartModule.php) — Old Styles
   ============================================= */
.card-solid {
  border: 1px solid var(--app-border);
  box-shadow: var(--app-shadow);
}
.card-solid .card-body {
  padding: 20px;
}
.product-image-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.product-image-thumb {
  width: 80px;
  height: 56px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .2s;
  opacity: .6;
  flex-shrink: 0;
}
.product-image-thumb:hover {
  opacity: .85;
}
.product-image-thumb.active {
  border-color: var(--app-primary);
  opacity: 1;
}
.product-image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.product-image-thumbs .minImg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.info-box {
  min-height: 50px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.info-box-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  min-width: 50px;
  height: 50px;
  font-size: 18px;
  background: rgba(0,0,0,.1);
  color: #fff;
}
.info-box-content {
  flex: 1;
  padding: 8px 12px;
}
.info-box-content h4 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}
.info-box-text {
  font-size: 12px;
  color: rgba(255,255,255,.85);
}
/* User block */
.user-block {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.user-block .img-circle {
  width: 36px;
  height: 36px;
  object-fit: cover;
  flex-shrink: 0;
}
.user-block .username {
  display: block;
  font-size: 14px;
  font-weight: 600;
}
.user-block .username a {
  color: var(--app-text);
  text-decoration: none;
}
.user-block .username a:hover {
  color: var(--app-primary);
}
.user-block .description {
  display: block;
  font-size: 12px;
  color: var(--app-text-secondary);
}
/* Nav tabs */
.nav-tabs {
  border-bottom: 1px solid var(--app-border);
}
.nav-tabs .nav-link {
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--app-text-secondary);
  border: none;
  border-bottom: 2px solid transparent;
  transition: all .2s;
  background: transparent;
  cursor: pointer;
}
.nav-tabs .nav-link:hover {
  color: var(--app-text);
  border-color: transparent;
}
.nav-tabs .nav-link.active {
  color: var(--app-primary);
  border-bottom-color: var(--app-primary);
  background: transparent;
}
.tab-content {
  padding: 16px 0;
}
.tab-pane {
  display: none;
}
.tab-pane.fade.show.active {
  display: block;
}
/* Post block for reviews */
.post {
  padding: 14px 0;
  border-bottom: 1px solid var(--app-border);
}
.post:last-child {
  border-bottom: none;
}
.post .user-block {
  margin-bottom: 6px;
}
.post .user-block .img-circle {
  width: 32px;
  height: 32px;
}
.post p {
  margin: 8px 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--app-text-secondary);
}
.post .link-black {
  color: var(--app-text-secondary);
  text-decoration: none;
  font-size: 13px;
  transition: color .2s;
}
.post .link-black:hover {
  color: var(--app-text);
}
/* Buttons */
.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  transition: all .2s;
  border: none;
  cursor: pointer;
}
.btn-sm.btn-primary {
  background: var(--app-primary);
  color: #fff;
}
.btn-sm.btn-primary:hover {
  background: var(--app-primary-dark);
}
.bg-danger {
  background: #dc2626;
  color: #fff;
}
.bg-danger:hover {
  background: #b91c1c;
}
.bg-success {
  background: #10b981;
  color: #fff;
}
.bg-success:hover {
  background: #059669;
}
.dellModuleSever, .addModuleModal {
  text-decoration: none;
}
hr {
  border: none;
  border-top: 1px solid var(--app-border);
  margin: 16px 0;
}
.text-right {
  text-align: right;
}
.fa-star.text-warning {
  color: #f59e0b;
}
.fa-star {
  font-size: 16px;
}

/* =============================================
   МОДАЛКА УСТАНОВКИ МОДУЛЯ (своя, без Bootstrap)
   ============================================= */
#modalInnBook {
  display: none;
  position: fixed;
  z-index: 5;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(2px);
  align-items: center;
  justify-content: center;
}
#modalInnBook.show {
  display: flex;
}
#modalInnBook .modal-dialog {
  position: relative;
  width: 100%;
  max-width: 40%;
  max-height: 85vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  margin: 20px;
  animation: innModalIn 0.25s ease-out;
}
@keyframes innModalIn {
  from { opacity: 0; transform: scale(0.95) translateY(-10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
#modalInnBook .modal-content {
  background: #fff;
  border-radius: 12px;
}
#modalInnBook .modal-body {
  padding: 0 !important;
  max-height: 70vh;
  overflow-y: auto;
}
#modalInnBook .modal-header {
  display: none;
}

/* Карточка модуля внутри модалки */
#modalInnBook .card-solid {
  border: none;
  box-shadow: none;
  margin: 0;
}
#modalInnBook .card-solid .card-body {
  padding: 28px 32px;
}
#modalInnBook .card-solid h4 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 16px;
}
#modalInnBook .card-solid hr {
  margin: 20px 0;
}

/* Блок пользователя (иконка + название + рейтинг) */
#modalInnBook .user-block {
  display: flex !important;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 8px;
}
#modalInnBook .user-block .img-circle {
  width: 70px !important;
  height: 70px !important;
  border-radius: 16px;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--app-border);
}
#modalInnBook .user-block .username {
  margin-left: 0 !important;
  display: block;
  font-size: 14px;
  font-weight: 600;
}
#modalInnBook .user-block .username .fa-star {
  color: #f59e0b;
  font-size: 14px;
}
#modalInnBook .user-block .description {
  margin-left: 0 !important;
  display: block;
  font-size: 13px;
  color: var(--app-text-secondary);
  margin-top: 4px;
}

/* Скрытые инпуты */
#modalInnBook input[type="hidden"] {
  display: none;
}

/* Выбор тарифа */
#modalInnBook .form-group {
  margin-bottom: 0;
}
#modalInnBook #selectModuleTariff {
  border: 1px solid var(--app-border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  background: var(--app-card-bg);
  color: var(--app-text);
  width: 100%;
  max-width: 320px;
  transition: border-color .2s;
  cursor: pointer;
}
#modalInnBook #selectModuleTariff:focus {
  outline: none;
  border-color: var(--app-primary);
  box-shadow: 0 0 0 3px rgba(255,134,5,.15);
}

/* Баланс и оплата */
#modalInnBook h6 {
  font-size: 15px;
  font-weight: 500;
  margin: 0 0 8px;
}
#modalInnBook h6 b {
  font-weight: 700;
}
#modalInnBook #payTariffModule {
  color: var(--app-primary);
}

/* Блок чекбокса и кнопки */
#modalInnBook .form-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding: 0;
  min-height: auto;
}
#modalInnBook .form-check-input {
  margin-top: 2px;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  accent-color: var(--app-primary);
  cursor: pointer;
}
#modalInnBook .form-check small {
  font-size: 12px;
  line-height: 1.5;
  color: var(--app-text-secondary);
}
#modalInnBook .form-check small a {
  color: var(--app-primary);
  text-decoration: none;
  font-weight: 500;
}
#modalInnBook .form-check small a:hover {
  text-decoration: underline;
}

/* Кнопка установить */
#modalInnBook .btn-success {
  background: var(--app-primary);
  border: none;
  border-radius: 8px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: background .2s, transform .15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
#modalInnBook .btn-success:hover {
  background: var(--app-primary-dark);
  transform: translateY(-1px);
}
#modalInnBook .btn-success:active {
  transform: translateY(0);
}
#modalInnBook .btn-success i {
  font-style: normal;
}
#modalInnBook .btn-block {
  width: auto;
  min-width: 160px;
}

/* Ряд с чекбоксом и кнопкой */
#modalInnBook .col-12 > div[style*="flex"] {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 16px;
}
#modalInnBook .text-right {
  text-align: right;
}

/* Адаптация */
@media (max-width: 768px) {
  #modalInnBook .modal-dialog {
    max-width: 95% !important;
    margin: 10px auto;
  }
  #modalInnBook .card-solid .card-body {
    padding: 20px;
  }
  #modalInnBook .col-12 > div[style*="flex"] {
    flex-direction: column;
    align-items: stretch;
  }
  #modalInnBook .btn-block {
    width: 100%;
  }
  #modalInnBook .text-right {
    text-align: center;
  }
}

/* =============================================
   CART MODULE (cartModule.php) — Premium View
   ============================================= */
:root {
  --cm-radius: 12px;
  --cm-card-bg: #ffffff;
  --cm-text: #1a1a2e;
  --cm-text-secondary: #6b7280;
  --cm-border: #e5e7eb;
  --cm-bg: #f8f9fc;
  --cm-shadow: 0 1px 2px rgba(0,0,0,0.05);
  --cm-shadow-hover: 0 4px 12px rgba(0,0,0,0.07);
}
.cm-package {
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--cm-text);
}
/* ===== CONTENT ===== */
.cm-content {
  margin-top: 0;
}
.cm-content-main {
  min-width: 0;
}
/* ===== GALLERY ===== */
.cm-gallery {
  background: var(--cm-card-bg);
  border: 1px solid var(--cm-border);
  border-radius: var(--cm-radius);
  overflow: hidden;
  box-shadow: var(--cm-shadow);
  margin-bottom: 24px;
}
.cm-gallery-main {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #f0f1f5;
  overflow: hidden;
}
.cm-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity .3s;
}
.cm-gallery-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--cm-text-secondary);
  font-size: 14px;
  font-weight: 500;
  background: #f0f1f5;
}
.cm-gallery-empty-icon {
  font-size: 40px;
  opacity: .4;
}
.cm-gallery-empty-state {
  border: 1px dashed var(--cm-border);
  background: var(--cm-card-bg);
}
/* ===== DIVIDER (appstore-hero style, полная ширина) ===== */
.cm-divider {
  position: relative;
  text-align: center;
  padding: 56px 32px;
  margin-bottom: 36px;
  overflow: visible;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
}
.cm-divider::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  z-index: -2;
}
.cm-divider::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 40px,
    rgba(255,255,255,.02) 40px,
    rgba(255,255,255,.02) 41px
  );
  pointer-events: none;
  z-index: -1;
}
.cm-divider-content {
  max-width: 900px;
  margin: 0 auto;
  color: #fff;
  position: relative;
  z-index: 1;
}
.cm-divider h3 {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 6px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.cm-divider-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255,255,255,.4);
  margin-bottom: 12px;
  border: 1px solid rgba(255,255,255,.1);
  padding: 4px 14px;
}
.cm-divider .cm-divider-sub {
  font-size: 15px;
  opacity: .65;
  margin: 0 0 28px;
  letter-spacing: 0.3px;
}
.cm-divider-features {
  display: flex;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 28px;
}
.cm-divider-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
  padding: 0 36px;
  border-right: 1px solid rgba(255,255,255,.06);
}
.cm-divider-feature:last-child {
  border-right: none;
}
.cm-divider-feature-icon {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  transition: background .25s;
}
.cm-divider-feature:hover .cm-divider-feature-icon {
  background: rgba(255,255,255,.18);
}
.cm-divider-feature span:last-child {
  line-height: 1.4;
}
/* ===== CARD HEADER ===== */
.cm-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--cm-card-bg);
  border: 1px solid var(--cm-border);
  border-radius: var(--cm-radius);
  padding: 20px 24px;
  box-shadow: var(--cm-shadow);
  margin-bottom: 20px;
}
.cm-card-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}
.cm-card-icon-wrap {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 0px;
  background: var(--cm-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--cm-border);
}
.cm-card-icon {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 0px;
}
.cm-card-header-info {
  min-width: 0;
}
.cm-card-title {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 800;
  color: var(--cm-text);
  letter-spacing: -0.5px;
  line-height: 1.2;
}
.cm-card-rating {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cm-card-rating .cm-star {
  font-size: 16px;
  color: #d1d5db;
}
.cm-card-rating .cm-star.filled { color: #f59e0b; }
.cm-card-rating .cm-rating-num {
  font-size: 14px;
  font-weight: 700;
  color: var(--cm-text);
}
.cm-card-rating .cm-rating-count {
  font-size: 13px;
  color: var(--cm-text-secondary);
}
.cm-card-header-right {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  min-width: 200px;
}
.cm-card-price {
  text-align: right;
}
.cm-card-price .cm-price-amount {
  display: block;
  font-size: 26px;
  font-weight: 800;
  color: var(--cm-accent, var(--app-primary));
  line-height: 1.3;
}
.cm-card-price .cm-price-free { color: #10b981; }
/* ===== CARD SECTIONS ===== */
.cm-card-section {
  padding: 22px 24px;
  margin-bottom: 16px;
}
.cm-section-heading {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 700;
  color: var(--cm-text);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--cm-accent, var(--app-primary));
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.cm-card-desc {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--cm-text-secondary);
}
.cm-description-text {
  font-size: 15px;
  line-height: 1.8;
  color: var(--cm-text);
}
.cm-link-block {
  margin-top: 18px;
}
.cm-external-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 0px;
  background: var(--cm-accent, var(--app-primary));
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all .2s;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.cm-external-link:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
}
.cm-external-link svg { flex-shrink: 0; }
/* Developer block */
.cm-developer-block {
  display: flex;
  align-items: center;
  gap: 12px;
}
.cm-dev-img {
  width: 48px;
  height: 48px;
  border-radius: 0px;
  object-fit: cover;
  flex-shrink: 0;
}
.cm-dev-block-info {
  display: flex;
  flex-direction: column;
}
.cm-dev-block-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--cm-text);
}
.cm-dev-block-name a {
  color: var(--cm-accent, var(--app-primary));
  text-decoration: none;
}
.cm-dev-block-name a:hover {
  text-decoration: underline;
}
.cm-dev-block-user {
  font-size: 13px;
  color: var(--cm-text-secondary);
  margin-top: 2px;
}
/* Price bar */
.cm-price-bar {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
}
.cm-price-bar-item {
  background: var(--cm-bg);
  padding: 12px 14px;
  border-radius: 0px;
}
.cm-price-bar-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--cm-text-secondary);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 4px;
}
.cm-price-bar-value {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--cm-text);
}
.cm-status-published { color: #10b981 !important; }
.cm-status-draft { color: #f59e0b !important; }
.cm-status-archived { color: #9ca3af !important; }
/* Permissions */
.cm-permissions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cm-permission-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 0px;
  background: var(--cm-bg);
  transition: background .2s;
}
.cm-permission-item:hover { background: #eef0f5; }
.cm-perm-icon {
  width: 36px;
  height: 36px;
  border-radius: 0px;
  background: var(--cm-accent, var(--app-primary))12;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.cm-perm-info {
  display: flex;
  flex-direction: column;
}
.cm-perm-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--cm-text);
}
.cm-perm-desc {
  font-size: 12px;
  color: var(--cm-text-secondary);
}
/* Permissions pills — modern grid style */
.cm-pills-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.cm-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--cm-text);
  background: var(--cm-card-bg);
  border: 1px solid var(--cm-border);
  border-radius: 10px;
  white-space: nowrap;
  line-height: 1.3;
  position: relative;
  transition: all .25s;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
  overflow: hidden;
  letter-spacing: 0.2px;
}
.cm-pill::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--cm-accent, var(--app-primary));
  opacity: .5;
}
.cm-pill:hover {
  border-color: var(--cm-accent, var(--app-primary));
  box-shadow: 0 3px 10px rgba(0,0,0,.08);
  transform: translateY(-1px);
  background: linear-gradient(135deg, var(--cm-card-bg) 60%, color-mix(in srgb, var(--cm-accent, var(--app-primary)) 6%, transparent));
}
.cm-pill-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--cm-accent, var(--app-primary)) 12%, transparent);
  border-radius: 7px;
  font-size: 14px;
  color: var(--cm-accent, var(--app-primary));
}
.cm-pill-text {
  flex: 1;
  min-width: 0;
}
.cm-pill-text .pill-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--cm-text);
  line-height: 1.3;
}
.cm-pill-text .pill-hint {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: var(--cm-text-secondary);
  margin-top: 1px;
  letter-spacing: 0.1px;
}
@media (max-width: 599px) {
  .cm-pills-list {
    grid-template-columns: 1fr;
  }
}
/* Empty state */
.cm-empty-state {
  text-align: center;
  padding: 30px 20px;
  color: var(--cm-text-secondary);
}
.cm-empty-state .cm-empty-icon {
  font-size: 42px;
  display: block;
  margin-bottom: 10px;
  opacity: .4;
}
.cm-empty-state p {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}
/* Reviews */
.cm-review-card {
  padding: 16px 0;
  border-bottom: 1px solid var(--cm-border);
}
.cm-review-card:last-child { border-bottom: none; }
.cm-review-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.cm-review-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--cm-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.cm-review-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.cm-review-author {
  font-size: 14px;
  font-weight: 600;
  color: var(--cm-text);
}
.cm-review-date {
  font-size: 12px;
  color: var(--cm-text-secondary);
}
.cm-review-stars {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}
.cm-review-stars .cm-star {
  font-size: 14px;
  color: #d1d5db;
}
.cm-review-stars .cm-star.filled { color: #f59e0b; }
.cm-review-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--cm-text-secondary);
  padding-left: 52px;
}
.cm-btn-review {
  margin-top: 14px;
}
/* Buttons */
.cm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  border: 1px solid transparent;
  text-decoration: none;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.cm-btn-primary {
  background: var(--cm-accent, var(--app-primary));
  color: #fff;
  border-color: var(--cm-accent, var(--app-primary));
}
.cm-btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.cm-btn-primary:disabled {
  opacity: .6;
  cursor: default;
  filter: none;
  transform: none;
  box-shadow: none;
}
.cm-btn-danger {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fecaca;
}
.cm-btn-danger:hover {
  background: #fecaca;
}
.cm-btn-outline {
  background: transparent;
  color: var(--cm-text);
  border-color: var(--cm-border);
}
.cm-btn-outline:hover {
  border-color: var(--cm-accent, var(--app-primary));
  color: var(--cm-accent, var(--app-primary));
}
.cm-btn-block { width: 100%; justify-content: center; text-align: center; }
/* Stars (shared) */
.cm-stars-display {
  display: flex;
  gap: 2px;
}
.cm-star {
  font-size: 16px;
  color: #d1d5db;
  line-height: 1;
}
.cm-star.filled { color: #f59e0b; }
.cm-rating-num {
  font-size: 14px;
  font-weight: 700;
  color: var(--cm-text);
}
.cm-rating-count {
  font-size: 13px;
  color: var(--cm-text-secondary);
}
/* ===== CART MODULE — TOP ROW: фото слева + информация справа ===== */
.cm-package {
  margin: 0 auto;
}
.cm-top-row {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  margin-bottom: 36px;
}
.cm-gallery {
  flex: 0 0 52%;
  max-width: 52%;
}
.cm-gallery-main {
  position: relative;
  border-radius: 0px;
  overflow: hidden;
  background: #f3f4f6;
  aspect-ratio: 16 / 11;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Слайды */
.cm-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .45s ease;
  pointer-events: none;
}
.cm-slide.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}
.cm-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Кнопки ◀ ▶ */
.cm-slide-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 0px;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(0,0,0,.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #374151;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  transition: all .2s;
  opacity: 0;
}
.cm-gallery-main:hover .cm-slide-btn { opacity: 1; }
.cm-slide-btn:hover {
  background: #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
  color: var(--cm-accent, var(--app-primary));
}
.cm-slide-prev { left: 12px; }
.cm-slide-next { right: 12px; }
/* Точки */
.cm-slide-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 8px;
}
.cm-dot {
  width: 10px;
  height: 10px;
  border-radius: 0px;
  background: rgba(255,255,255,.5);
  cursor: pointer;
  transition: all .25s;
}
.cm-dot.active {
  background: #fff;
  box-shadow: 0 0 6px rgba(0,0,0,.25);
  width: 28px;
  border-radius: 0px;
}
/* Миниатюры */
.cm-gallery-thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.cm-gallery-main .cm-gallery-thumbs {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 5;
  padding: 12px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.6));
  justify-content: center;
  margin-top: 0;
  overflow-x: auto;
  border-top: none;
}
.cm-gallery-main .cm-gallery-thumb {
  width: 64px;
  height: 42px;
  border: 2px solid rgba(255,255,255,0.5);
  opacity: 0.75;
  margin-bottom: 0;
}
.cm-gallery-main .cm-gallery-thumb.active {
  border-color: var(--cm-accent, var(--app-primary));
  opacity: 1;
}
.cm-gallery-main .cm-gallery-thumb:hover {
  opacity: 1;
}
.cm-gallery-main .cm-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Правая панель информации */
.cm-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cm-info-header {
  display: flex;
  align-items: center;
  gap: 16px;
}
.cm-card-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 11px;
  background: var(--cm-bg);
  border: 1px solid var(--cm-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  padding: 4px;
}
.cm-card-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0px;
}
.cm-card-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--cm-text);
  margin: 0;
  line-height: 1.2;
}
.cm-rating-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.cm-mini-desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--cm-text-secondary);
  margin: 0;
}
/* Мета-информация */
.cm-info-meta {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.cm-info-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cm-meta-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--cm-text-secondary);
  font-weight: 500;
}
.cm-meta-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--cm-text);
}
/* Цена */
.cm-info-price {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.cm-price-big {
  font-size: 28px;
  font-weight: 800;
  color: var(--cm-accent, var(--app-primary));
}
.cm-price-big.cm-price-free { color: #10b981; }
.cm-price-hint {
  font-size: 13px;
  color: var(--cm-text-secondary);
}
/* Кнопки */
.cm-info-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.cm-info-actions .cm-btn {
  flex: 1;
  min-width: 160px;
}
/* Разработчик */
.cm-dev-wrap {
  padding-top: 20px;
  border-top: 1px solid var(--cm-border);
}
.cm-dev-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--cm-text-secondary);
  margin-bottom: 12px;
}
.cm-developer-block {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: none;
  background: none;
}
.cm-dev-img {
  width: 44px;
  height: 44px;
  border-radius: 0px;
  object-fit: cover;
  flex-shrink: 0;
}
.cm-dev-block-info {
  display: flex;
  flex-direction: column;
}
.cm-dev-block-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--cm-text);
}
.cm-dev-block-name a { color: inherit; }
.cm-dev-block-name a:hover { color: var(--cm-accent, var(--app-primary)); }
.cm-dev-block-user {
  font-size: 13px;
  color: var(--cm-text-secondary);
}

/* ===== МОДАЛКА АВТОРИЗАЦИИ ===== */
.cm-auth-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  transition: background .4s ease, backdrop-filter .4s ease;
  pointer-events: none;
}
.cm-auth-modal-overlay.active {
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  pointer-events: auto;
}
.cm-auth-modal {
  background: #fff;
  max-width: 420px;
  width: calc(100% - 32px);
  padding: 40px 32px 32px;
  position: relative;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0,0,0,0.3);
  transform: scale(0.92) translateY(20px);
  opacity: 0;
  transition: transform .35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity .3s ease;
}
.cm-auth-modal-overlay.active .cm-auth-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}
.cm-auth-modal-shield {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  background: #fef2f2;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cm-auth-modal-shield-icon {
  color: #ef4444;
}
.cm-auth-modal-title {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 8px;
  letter-spacing: -0.3px;
}
.cm-auth-modal-text {
  font-size: 14px;
  line-height: 1.6;
  color: #6b7280;
  margin: 0 0 24px;
}
.cm-auth-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cm-auth-btn-login {
  font-size: 14px;
  font-weight: 600;
  padding: 12px 20px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border: none;
  border-radius: 8px;
  color: #fff;
  text-decoration: none;
  transition: all .2s;
  text-transform: none;
  letter-spacing: normal;
  box-sizing: border-box;
}
.cm-auth-btn-login:hover {
  box-shadow: 0 6px 20px rgba(37,99,235,0.35);
  transform: translateY(-1px);
  filter: brightness(1.05);
}
.cm-auth-modal-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #9ca3af;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.cm-auth-modal-divider::before,
.cm-auth-modal-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}
.cm-auth-modal-hint {
  font-size: 13px;
  color: #9ca3af;
  line-height: 1.5;
  margin: 0;
}
.cm-auth-modal-hint strong {
  color: #374151;
}
.cm-auth-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  background: #f3f4f6;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
}
.cm-auth-modal-close:hover {
  background: #e5e7eb;
  color: #111827;
}

/* ===== CART MODULE — BOTTOM GRID: 2 колонки ===== */
.cm-bottom-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  margin-top: 0;
}
.cm-section-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.cm-reviews-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--cm-text-secondary);
  background: var(--cm-bg);
  padding: 2px 10px;
  border-radius: 20px;
}
.cm-external-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--cm-accent, var(--app-primary));
  text-decoration: none;
  transition: gap .2s;
}
.cm-external-link:hover { gap: 10px; text-decoration: underline; }
/* Публикация */
.cm-pub-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.cm-pub-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 0px;
  background: var(--cm-bg);
}
.cm-pub-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--cm-text-secondary);
  font-weight: 500;
}
.cm-pub-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--cm-text);
}

/* ===== RESPONSIVE CART MODULE ===== */
@media (max-width: 960px) {
  .cm-top-row {
    flex-direction: column;
  }
  .cm-gallery {
    flex: none;
    max-width: 100%;
    width: 100%;
  }
  .cm-bottom-grid {
    grid-template-columns: 1fr;
  }
  .cm-divider {
    padding: 36px 24px;
  }
  .cm-divider h3 {
    font-size: 22px;
  }
  .cm-divider-features {
    gap: 24px;
  }
}
@media (max-width: 768px) {
  .cm-gallery-thumb { width: 64px; height: 44px; }
  .cm-card-title { font-size: 22px; }
  .cm-pub-grid { grid-template-columns: 1fr 1fr; }
  .cm-card-header {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  .cm-card-header-left {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .cm-card-header-info {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .cm-card-header-right {
    align-items: stretch;
    min-width: 0;
  }
  .cm-card-price { text-align: center; }
  .cm-price-bar { grid-template-columns: 1fr 1fr; }
  .cm-package { max-width: 100%; }
  .cm-divider-features {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }
}
@media (max-width: 599px) {
  .cm-info-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .cm-rating-line {
    justify-content: center;
  }
  .cm-card-title { font-size: 20px; }
  .cm-review-text { padding-left: 0; }
  .cm-pub-grid { grid-template-columns: 1fr; }
  .cm-info-meta { justify-content: center; }
  .cm-price-bar { grid-template-columns: 1fr; }
  .cm-divider {
    padding: 28px 16px;
  }
  .cm-divider h3 {
    font-size: 18px;
  }
}

/* ===== ТАБЫ Описание / Инструкция ===== */
.cm-tabs-nav {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--cm-border);
  padding-bottom: 0;
}
.cm-tab-btn {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  color: var(--cm-text-secondary);
  cursor: pointer;
  transition: all .2s;
  line-height: 1.3;
}
.cm-tab-btn:hover {
  color: var(--cm-text);
}
.cm-tab-btn.active {
  color: var(--cm-accent, var(--app-primary));
  border-bottom-color: var(--cm-accent, var(--app-primary));
}
.cm-tab-panel {
  display: none;
}
.cm-tab-panel.active {
  display: block;
}

/* ===== ИНСТРУКЦИЯ (manual) ===== */
.cm-manual-content {
  font-size: 15px;
  line-height: 1.7;
  color: var(--cm-text-secondary);
}
.cm-manual-step {
  margin: 16px 0 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--cm-text);
  letter-spacing: 0.3px;
}
.cm-manual-step:first-child {
  margin-top: 0;
}
.cm-manual-content p {
  margin: 0 0 12px;
  padding-left: 4px;
}
.cm-manual-notice {
  margin-top: 20px;
  padding: 14px 18px;
  background: #fef9e6;
  border: 1px solid #fde68a;
  font-size: 14px;
  color: #92400e;
  line-height: 1.5;
}

/* ===== ТАРИФЫ (pricing) ===== */
.cm-pricing {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cm-pricing-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border: 1px solid var(--cm-border);
  cursor: pointer;
  transition: all .25s;
  background: var(--cm-card-bg);
  border-radius: var(--cm-radius);
  position: relative;
}
.cm-pricing-card:hover {
  border-color: #d1d5db;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  transform: none;
}
.cm-pricing-card.active {
  border-color: #d1d5db;
  background: var(--cm-bg);
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.cm-pricing-card.popular {
  border-color: #d1d5db;
  background: var(--cm-bg);
}
.cm-pricing-card.popular::after {
  content: '🔥 Популярный';
  position: absolute;
  top: -1px;
  right: 16px;
  background: #10b981;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 14px;
  border-radius: 0px 0px 6px 6px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  line-height: 1.4;
}
.cm-pricing-card-inner {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cm-pricing-period {
  font-size: 15px;
  font-weight: 700;
  color: var(--cm-text);
  letter-spacing: 0.3px;
}
.cm-pricing-sub {
  font-size: 12px;
  color: var(--cm-text-secondary);
}
.cm-pricing-right {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.cm-pricing-price {
  font-size: 20px;
  font-weight: 800;
  color: var(--cm-accent, var(--app-primary));
  line-height: 1.3;
}
.cm-pricing-per {
  font-size: 12px;
  color: var(--cm-text-secondary);
}
/* ===== ОТЗЫВЫ НА ВСЮ ШИРИНУ ===== */
.cm-reviews-full {
  padding: 40px 0 50px;
  margin-top: 36px;
  width: 100%;
}
.cm-reviews-full .cm-package {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.cm-reviews-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--cm-border);
}
.cm-reviews-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--cm-text);
}
.cm-reviews-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.cm-reviews-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 28px;
  padding: 0 10px;
  background: var(--cm-bg);
  border: 1px solid var(--cm-border);
  font-size: 13px;
  font-weight: 700;
  color: var(--cm-text-secondary);
}
.cm-review-open-btn.cm-btn {
  padding: 8px 16px;
  font-size: 13px;
}
.cm-reviews-list-full .cm-review-card {
  padding: 18px 0;
  border-bottom: 1px solid var(--cm-border);
}
.cm-reviews-list-full .cm-review-card:last-child {
  border-bottom: none;
}

/* ===== МОДАЛКА ===== */
.cm-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(0,0,0,0);
  align-items: center;
  justify-content: center;
  padding: 20px;
  display: flex;
  visibility: hidden;
  opacity: 0;
  transition: background .3s ease, opacity .3s ease, visibility .3s ease;
}
.cm-modal-overlay.active {
  background: rgba(0,0,0,.55);
  visibility: visible;
  opacity: 1;
}
.cm-modal {
  background: var(--cm-card-bg);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0,0,0,.25);
  transform: translateY(20px) scale(.96);
  transition: transform .35s cubic-bezier(.34,1.56,.64,1);
}
.cm-modal-overlay.active .cm-modal {
  transform: translateY(0) scale(1);
}
.cm-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--cm-border);
}
.cm-modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--cm-text);
}
.cm-modal-close {
  width: 36px;
  height: 36px;
  background: var(--cm-bg);
  border: none;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cm-text-secondary);
  transition: background .2s;
}
.cm-modal-close:hover {
  background: #e5e7eb;
  color: var(--cm-text);
}
.cm-modal-body {
  padding: 22px;
}

/* ===== МОДАЛКА ПОДТВЕРЖДЕНИЯ УДАЛЕНИЯ ===== */
.cm-delete-icon-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}
.cm-delete-title {
  font-size: 17px;
  font-weight: 700;
  color: #111827;
  text-align: center;
  margin: 0 0 10px;
  line-height: 1.35;
}
.cm-delete-text {
  font-size: 14px;
  line-height: 1.6;
  color: #6b7280;
  text-align: center;
  margin: 0 0 24px;
}
.cm-delete-actions {
  display: flex;
  gap: 12px;
}
.cm-delete-actions .cm-btn {
  flex: 1;
}

/* ===== ФОРМА В МОДАЛКЕ ===== */
.cm-form-group {
  margin-bottom: 18px;
}
.cm-form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--cm-text);
}
.cm-form-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--cm-border);
  font-size: 14px;
  line-height: 1.6;
  color: var(--cm-text);
  background: var(--cm-card-bg);
  resize: vertical;
  font-family: inherit;
  transition: border-color .2s;
  box-sizing: border-box;
}
.cm-form-textarea:focus {
  border-color: var(--cm-accent, var(--app-primary));
  outline: none;
}

/* ===== ЗВЁЗДЫ ВЫБОРА ===== */
.cm-star-rating {
  display: flex;
  gap: 6px;
  cursor: pointer;
}
.cm-star-input {
  font-size: 30px;
  line-height: 1;
  color: #d1d5db;
  transition: color .15s;
  user-select: none;
}
.cm-star-input.active,
.cm-star-input:hover,
.cm-star-input:hover ~ .cm-star-input {
  color: #f59e0b;
}

@media (max-width: 599px) {
  .cm-tabs-nav {
    gap: 0;
  }
  .cm-tab-btn {
    padding: 10px 14px;
    font-size: 13px;
  }
  .cm-pricing-card {
    flex-wrap: wrap;
    gap: 6px;
  }
  .cm-reviews-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .cm-reviews-full .cm-package {
    padding: 0 16px;
  }
}

/* =============================================
   LIGHTBOX / FULLSCREEN SLIDER
   ============================================= */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.lightbox-overlay.active {
  display: flex;
}

.lightbox-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  border: none;
  background: rgba(255,255,255,0.12);
  border-radius: 50%;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  z-index: 10;
  line-height: 1;
}

.lightbox-close:hover {
  background: rgba(255,255,255,0.25);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border: none;
  background: rgba(255,255,255,0.10);
  border-radius: 50%;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  z-index: 10;
  line-height: 1;
}

.lightbox-nav:hover {
  background: rgba(255,255,255,0.25);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-nav-prev {
  left: 20px;
}

.lightbox-nav-next {
  right: 20px;
}

.lightbox-img-wrap {
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img-wrap img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  transition: transform .3s ease;
}

.lightbox-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  font-weight: 500;
  background: rgba(0,0,0,0.4);
  padding: 6px 16px;
  border-radius: 20px;
  letter-spacing: .5px;
}

@media (max-width: 700px) {
  .lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
  .lightbox-nav-prev {
    left: 10px;
  }
  .lightbox-nav-next {
    right: 10px;
  }
  .lightbox-close {
    top: 12px;
    right: 14px;
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
}

/* ========== ADMINTE ALERT SUCCESS (для resultAddModule) ========== */
.alert {
  position: relative;
  padding: 0.75rem 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  border-radius: 0.25rem;
}

.alert-success {
  color: #155724;
  background-color: #d4edda;
  border-color: #c3e6cb;
}

.alert-dismissible {
  padding-right: 4rem;
}

.alert h5 {
  font-size: 1.0625rem;
  font-weight: 500;
  margin-top: 0;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.alert h5 i {
  margin-right: 5px;
}

.alert .icon {
  margin-right: 10px;
}
