/* ─── Shop Layout ─────────────────────────────────────────────────── */
.shop-body { background: var(--bg-base); }

.shop-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 16px rgba(0,0,0,.3);
}
.shop-header__inner {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 24px; max-width: 1400px; margin: 0 auto;
}
.shop-logo {
  font-size: 18px; font-weight: bold; color: var(--cyan);
  text-decoration: none; white-space: nowrap;
}
.shop-logo:hover { text-decoration: none; }

.shop-search { display: flex; flex: 1; max-width: 520px; }
.shop-search__input {
  flex: 1; padding: 8px 14px;
  background: var(--bg-base); border: 1px solid var(--border);
  border-right: none; border-radius: var(--radius) 0 0 var(--radius);
  color: var(--text-pri); font-family: var(--font); font-size: 14px;
}
.shop-search__input:focus { outline: none; border-color: var(--cyan); }
.shop-search__btn {
  padding: 8px 14px; background: var(--cyan); border: none;
  border-radius: 0 var(--radius) var(--radius) 0; cursor: pointer; font-size: 15px;
}
.shop-search__btn:hover { opacity: .85; }

/* Category nav */
.shop-nav { border-top: 1px solid var(--border); background: var(--bg-panel); }
.shop-nav__inner {
  display: flex; gap: 2px; padding: 0 24px;
  max-width: 1400px; margin: 0 auto; overflow-x: auto;
  scrollbar-width: none;
}
.shop-nav__inner::-webkit-scrollbar { display: none; }
.shop-nav__link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 14px; color: var(--text-sec); font-size: 13px;
  text-decoration: none; white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.shop-nav__link:hover { color: var(--text-pri); text-decoration: none; }
.shop-nav__link.active { color: var(--cyan); border-bottom-color: var(--cyan); }

/* Main content */
.shop-main { min-height: calc(100vh - 120px); }
.shop-container { max-width: 1400px; margin: 0 auto; padding: 24px; }

/* Hero */
.shop-hero {
  background: linear-gradient(135deg, #0d1b2a 0%, #1a1d27 50%, #0d1225 100%);
  border-bottom: 1px solid var(--border);
  padding: 60px 24px;
  text-align: center;
}
.shop-hero__content { max-width: 600px; margin: 0 auto; }
.shop-hero__title { font-size: 42px; font-weight: bold; color: var(--text-pri); margin-bottom: 12px; }
.shop-hero__sub { font-size: 16px; color: var(--text-sec); margin-bottom: 28px; }

/* Section header */
.shop-section-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 20px; flex-wrap: wrap;
}
.shop-section-title { font-size: 20px; font-weight: bold; color: var(--text-pri); }

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform .15s, border-color .15s, box-shadow .15s;
  display: flex; flex-direction: column;
}
.product-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0,212,255,.3);
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
}

.product-card__img {
  position: relative;
  height: 180px;
  background: var(--bg-hover);
  overflow: hidden;
}
.product-card__img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .3s;
}
.product-card:hover .product-card__img img { transform: scale(1.04); }
.product-card__no-img {
  display: flex; align-items: center; justify-content: center;
  height: 100%; font-size: 52px; color: var(--text-mut);
}
.product-card__badges {
  position: absolute; top: 8px; left: 8px;
  display: flex; flex-wrap: wrap; gap: 4px;
}

.product-card__body { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.product-card__category { font-size: 11px; color: var(--text-mut); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .5px; }
.product-card__title { font-size: 15px; font-weight: bold; color: var(--text-pri); margin-bottom: 6px; line-height: 1.3; }
.product-card__desc { font-size: 12px; color: var(--text-sec); line-height: 1.5; flex: 1; margin-bottom: 10px; }
.product-card__footer { display: flex; justify-content: space-between; align-items: flex-end; }
.product-card__price { }
.price-value { font-size: 18px; font-weight: bold; color: var(--text-pri); }
.price-unit { font-size: 11px; color: var(--text-mut); margin-left: 2px; }
.product-card__meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.product-card__seller { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }

/* Pagination */
.shop-pagination { display: flex; justify-content: center; gap: 4px; margin-top: 24px; }

/* Empty state */
.shop-empty { text-align: center; padding: 80px 24px; }

/* Modal sizes */
.shop-modal { max-width: 820px !important; }
.pm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* ─── Product Page ─────────────────────────────────────────────── */
.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-sec); margin-bottom: 20px;
}
.breadcrumb a { color: var(--cyan); }

.product-page-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-bottom: 32px;
}

.product-page__main-img {
  width: 100%; border-radius: var(--radius);
  border: 1px solid var(--border); max-height: 420px; object-fit: cover;
}
.product-page__thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.product-page__thumb {
  width: 72px; height: 56px; object-fit: cover;
  border-radius: 6px; border: 2px solid var(--border); cursor: pointer;
  transition: border-color .2s;
}
.product-page__thumb.active,
.product-page__thumb:hover { border-color: var(--cyan); }
.product-page__no-img {
  display: flex; align-items: center; justify-content: center;
  height: 300px; background: var(--bg-card); border-radius: var(--radius);
  font-size: 72px; color: var(--text-mut);
}

.product-page__title { font-size: 26px; font-weight: bold; color: var(--text-pri); margin-bottom: 12px; }
.product-page__price-box {
  display: flex; align-items: baseline; gap: 6px; margin-bottom: 20px;
  padding: 16px; background: var(--bg-card); border-radius: var(--radius); border: 1px solid var(--border);
}
.product-page__price { font-size: 32px; font-weight: bold; color: var(--text-pri); }
.product-page__price-unit { font-size: 14px; color: var(--text-sec); }

.product-page__seller-card {
  display: flex; align-items: center; gap: 12px;
  padding: 14px; background: var(--bg-card); border-radius: var(--radius);
  border: 1px solid var(--border); margin-bottom: 16px;
}
.product-page__contact-box {
  padding: 14px; background: rgba(0,212,255,.05);
  border: 1px solid rgba(0,212,255,.2); border-radius: var(--radius);
}

.product-page__description {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin-bottom: 24px;
}
.product-page__desc-content {
  color: var(--text-sec); line-height: 1.8; font-size: 15px; margin-top: 12px;
}

.product-page__reviews { margin-bottom: 32px; }

/* Review summary */
.review-summary {
  display: flex; gap: 32px; align-items: center;
  padding: 20px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); margin: 16px 0;
}
.review-summary__avg { text-align: center; min-width: 80px; }
.review-summary__bars { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.review-bar { display: flex; align-items: center; gap: 8px; }
.review-bar__track {
  flex: 1; height: 8px; background: var(--border); border-radius: 4px; overflow: hidden;
}
.review-bar__fill { height: 100%; background: var(--amber); border-radius: 4px; }

/* Review items */
.review-item {
  padding: 16px 0; border-bottom: 1px solid var(--border);
}
.review-item:last-child { border-bottom: none; }
.review-item__header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }

/* Star picker */
.star-picker { display: flex; gap: 8px; }
.star-opt {
  font-size: 32px; cursor: pointer; color: var(--border);
  transition: color .15s; user-select: none;
}
.star-opt:hover,
.star-opt.selected { color: var(--amber); }

/* ─── API Docs ──────────────────────────────────────────────────── */
.api-grid { display: grid; grid-template-columns: 200px 1fr; gap: 24px; }
.api-nav { position: sticky; top: 120px; height: fit-content; }
.api-nav__title { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-mut); margin-bottom: 8px; }
.api-nav__link {
  display: block; padding: 7px 12px; color: var(--text-sec); font-size: 13px;
  text-decoration: none; border-radius: var(--radius); transition: background .15s;
}
.api-nav__link:hover { background: var(--bg-hover); color: var(--text-pri); text-decoration: none; }

.api-content { min-width: 0; }
.api-section { margin-bottom: 40px; padding-bottom: 40px; border-bottom: 1px solid var(--border); }
.api-section:last-child { border-bottom: none; }
.api-h2 { font-size: 22px; font-weight: bold; color: var(--text-pri); margin-bottom: 12px; }

.api-badge {
  display: inline-block; padding: 2px 8px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 4px;
  font-size: 11px; color: var(--text-mut); letter-spacing: 1px;
  text-transform: uppercase; margin-bottom: 8px;
}

.code-block {
  background: #0a0c11; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; font-family: monospace; font-size: 13px; color: #a8d8a8;
  white-space: pre; overflow-x: auto; margin: 8px 0;
}

.api-method-block {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; margin-bottom: 16px;
}
.api-method-header { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.api-path { font-family: monospace; font-size: 14px; color: var(--text-pri); }
.api-tab-label { font-size: 11px; text-transform: uppercase; color: var(--text-mut); letter-spacing: .5px; margin-top: 12px; margin-bottom: 4px; }

.method-badge {
  padding: 3px 10px; border-radius: 4px; font-size: 12px;
  font-weight: bold; font-family: monospace;
}
.method-get  { background: rgba(0,212,255,.15); color: var(--cyan); }
.method-post { background: rgba(0,230,118,.15); color: var(--green); }
.method-put  { background: rgba(255,193,7,.15);  color: var(--amber); }
.method-delete { background: rgba(255,61,90,.15); color: var(--red); }

.api-params-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
.api-params-table th { background: var(--bg-panel); padding: 8px 12px; text-align: left; color: var(--text-mut); font-size: 11px; text-transform: uppercase; }
.api-params-table td { padding: 8px 12px; border-bottom: 1px solid var(--border); color: var(--text-sec); }
.api-params-table td code { background: var(--bg-panel); padding: 2px 6px; border-radius: 4px; color: var(--cyan); font-family: monospace; }

.api-try { margin-top: 12px; }
.api-result { margin-top: 8px; background: #0a0c11; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; font-size: 12px; color: #a8d8a8; max-height: 300px; overflow: auto; }
.api-result.hidden { display: none; }

/* ─── Footer ─────────────────────────────────────────────────────── */
.shop-footer {
  background: var(--bg-panel); border-top: 1px solid var(--border);
  padding: 16px 24px; margin-top: 40px;
}
.shop-footer__inner {
  max-width: 1400px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: var(--text-mut);
}

/* ─── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .product-page-grid { grid-template-columns: 1fr; }
  .pm-grid { grid-template-columns: 1fr; }
  .review-summary { flex-direction: column; }
  .api-grid { grid-template-columns: 1fr; }
  .api-nav { position: static; }
}
@media (max-width: 600px) {
  .shop-header__inner { flex-wrap: wrap; }
  .shop-search { order: 3; flex-basis: 100%; max-width: 100%; }
  .product-grid { grid-template-columns: 1fr; }
  .shop-hero__title { font-size: 28px; }
}

/* ─── Geo Blocked Page ───────────────────────────────────────────── */
.geo-blocked-page {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  overflow: hidden;
}

.geo-emoji-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.geo-blocked-card {
  position: relative;
  z-index: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 48px 40px;
  max-width: 520px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0,0,0,.4);
}

.geo-blocked-icon {
  font-size: 72px;
  margin-bottom: 20px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.08); }
}

.geo-blocked-title {
  font-size: 22px;
  font-weight: bold;
  color: var(--text-pri);
  margin-bottom: 16px;
  line-height: 1.3;
}

.geo-blocked-reason {
  color: var(--text-sec);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 24px;
  padding: 14px 16px;
  background: rgba(255,61,90,.06);
  border: 1px solid rgba(255,61,90,.15);
  border-radius: var(--radius);
}

.geo-blocked-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 28px;
  text-align: left;
}

.geo-meta-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--bg-hover);
  border-radius: var(--radius);
  font-size: 13px;
}

.geo-meta-label { color: var(--text-mut); }
.geo-meta-value { color: var(--text-pri); font-weight: bold; }

.geo-blocked-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── Geo Blocked Page (v2) ─────────────────────────────────────── */
.geo-page {
  position: relative;
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 50% at 50% 40%, rgba(255,61,90,.06) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 20% 80%, rgba(156,92,255,.05) 0%, transparent 60%);
}

.geo-emoji-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.geo-card {
  position: relative;
  z-index: 1;
  background: var(--bg-card);
  border: 1px solid rgba(255,61,90,.2);
  border-radius: 20px;
  padding: 52px 44px 40px;
  max-width: 540px;
  width: 100%;
  text-align: center;
  box-shadow:
    0 0 0 1px rgba(255,61,90,.08),
    0 32px 80px rgba(0,0,0,.5),
    0 0 60px rgba(255,61,90,.04);
}

/* Иконка с анимированными кольцами */
.geo-icon-wrap {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 auto 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.geo-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255,61,90,.3);
  animation: geoRing 3s ease-in-out infinite;
}
.geo-ring--1 { width: 96px; height: 96px; animation-delay: 0s;   border-color: rgba(255,61,90,.25); }
.geo-ring--2 { width: 72px; height: 72px; animation-delay: .4s;  border-color: rgba(255,61,90,.18); }
.geo-ring--3 { width: 48px; height: 48px; animation-delay: .8s;  border-color: rgba(255,61,90,.12); }

@keyframes geoRing {
  0%, 100% { transform: scale(1);    opacity: .6; }
  50%       { transform: scale(1.12); opacity: 1;  }
}

.geo-icon {
  font-size: 36px;
  z-index: 1;
  animation: geoFloat 4s ease-in-out infinite;
}

@keyframes geoFloat {
  0%, 100% { transform: translateY(0);   }
  50%       { transform: translateY(-6px);}
}

.geo-title {
  font-size: 26px;
  font-weight: bold;
  color: var(--text-pri);
  line-height: 1.3;
  margin-bottom: 16px;
}

.geo-reason {
  font-size: 14px;
  color: var(--text-sec);
  line-height: 1.7;
  margin-bottom: 28px;
  padding: 14px 18px;
  background: rgba(255,61,90,.05);
  border: 1px solid rgba(255,61,90,.12);
  border-radius: 10px;
  text-align: left;
}

/* Инфо сетка */
.geo-info-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 28px;
  text-align: left;
}

.geo-info-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.geo-info-icon { font-size: 22px; flex-shrink: 0; }

.geo-info-label {
  font-size: 11px;
  color: var(--text-mut);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 2px;
}

.geo-info-value {
  font-size: 14px;
  font-weight: bold;
  color: var(--text-pri);
}

.geo-country-code {
  font-size: 12px;
  color: var(--text-mut);
  font-weight: normal;
}

.geo-status {
  color: var(--red);
  font-family: monospace;
}

/* Кнопки */
.geo-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.geo-footer-note {
  font-size: 12px;
  color: var(--text-mut);
  line-height: 1.5;
}

@media (max-width: 480px) {
  .geo-card { padding: 36px 20px 28px; }
  .geo-title { font-size: 20px; }
}

/* ─── Compact list template ────────────────────────────────────────── */
.product-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.product-compact-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.product-compact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.product-compact-row:hover {
  border-color: rgba(0,212,255,.3);
  background: var(--bg-hover);
}
.pcr-main  { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.pcr-title { font-weight: bold; color: var(--text-pri); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcr-seller{ font-size: 12px; flex-shrink: 0; }
.pcr-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.pcr-price { font-weight: bold; color: var(--text-pri); white-space: nowrap; }
.pcr-badges{ display: flex; gap: 3px; }

@media (max-width: 600px) {
  .pcr-seller { display: none; }
  .pcr-badges { display: none; }
}

/* ─── Default: горизонтальный список ────────────────────────────────── */
.product-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.product-list-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.product-list-row:hover {
  border-color: rgba(0, 212, 255, .3);
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
}

/* Миниатюра */
.plr-img {
  flex-shrink: 0;
  width: 100px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-hover);
}
.plr-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.plr-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--text-mut);
}

/* Основное содержимое */
.plr-body {
  flex: 1;
  min-width: 0;
}
.plr-top {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 5px;
  flex-wrap: wrap;
}
.plr-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-pri);
  margin: 0;
  line-height: 1.35;
}
.plr-badges {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.plr-desc {
  font-size: 13px;
  color: var(--text-sec);
  line-height: 1.6;
  margin: 0 0 8px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.plr-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-mut);
}

/* Правая: цена */
.plr-right {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  min-width: 90px;
}
.plr-price {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-pri);
  white-space: nowrap;
}
.plr-unit {
  font-size: 11px;
  color: var(--text-mut);
  white-space: nowrap;
}
.plr-btn {
  white-space: nowrap;
}

/* ── Mobile: list-row becomes stacked ──────────────────────────────── */
@media (max-width: 600px) {
  .product-list-row { flex-wrap: wrap; }
  .plr-img { width: 60px; height: 52px; }
  .plr-right { flex-direction: row; align-items: center; width: 100%; justify-content: space-between; border-top: 1px solid var(--border); padding-top: 10px; margin-top: 4px; }
  .plr-btn { margin-left: auto; }
}
