:root {
  --shop-primary: #1a4f8b;
  --shop-primary-dark: #0b2847;
  --shop-primary-light: #e8f0fa;
  --shop-primary-hover: #153f70;
  --shop-text: #111;
  --shop-muted: #6b7280;
  --shop-border: #e5e7eb;
  --shop-shadow: 0 2px 8px rgba(11, 40, 71, 0.1);
  --shop-header-h: 56px;
  --shop-panel-z: 400;
  --shop-overlay-z: 350;
  /* Как в CRM: системный sans (размеры — отдельно, не трогаем) */
  --shop-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --shop-font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body.shop-body {
  margin: 0;
  font-family: "Montserrat", system-ui, sans-serif;
  background: #fff;
  color: var(--shop-text);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--shop-primary-dark);
  text-decoration: none;
}

body.shop-modal-open {
  overflow: hidden;
}

/* Header */
.shop-header {
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  height: var(--shop-header-h);
  max-height: 72px;
  padding: 0 3.5rem;
  background: var(--shop-primary-dark);
  box-shadow: 0 2px 12px rgba(11, 40, 71, 0.35);
}

.shop-header__left,
.shop-header__right {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-shrink: 0;
}

.shop-header__brand {
  display: flex;
  align-items: center;
  flex-shrink: 1;
  min-width: 0;
  color: #fff;
  text-decoration: none;
}

.shop-header__brand-logo {
  display: block;
  height: 30px;
  width: auto;
  max-width: min(46vw, 220px);
  object-fit: contain;
}

.shop-header__menu-btn,
.shop-header__icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
}

.shop-header__menu-btn {
  color: #fff;
}

.shop-header__menu-btn:hover,
.shop-header__icon-btn:hover {
  color: #b8d4f5;
}

.shop-header__search {
  flex: 1;
  display: flex;
  justify-content: center;
  max-width: 500px;
  margin: 0 2rem;
}

.shop-search-form {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.shop-search-form__icon {
  position: absolute;
  left: 14px;
  color: var(--shop-muted);
  pointer-events: none;
}

.shop-search-form__input {
  width: 100%;
  padding: 10px 14px 10px 42px;
  border: 1px solid #e0e0e0;
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  background: #fafafa;
}

.shop-search-form__input:focus {
  outline: none;
  border-color: var(--shop-primary);
  background: #fff;
}

.shop-search-suggest {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 300;
  max-height: min(360px, 50vh);
  overflow-y: auto;
  border: 1px solid var(--shop-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  -webkit-overflow-scrolling: touch;
}

.shop-search-suggest[hidden] {
  display: none !important;
}

.shop-search-suggest__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid #f0f0f0;
  background: #fff;
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.shop-search-suggest__item:last-child {
  border-bottom: 0;
}

.shop-search-suggest__item:hover,
.shop-search-suggest__item.is-active {
  background: var(--shop-primary-light);
}

.shop-search-suggest__thumb {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  background: #f5f5f5;
}

.shop-search-suggest__thumb--empty {
  display: block;
}

.shop-search-suggest__body {
  min-width: 0;
  flex: 1;
}

.shop-search-suggest__name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.shop-search-suggest__name mark {
  padding: 0 1px;
  border-radius: 2px;
  background: #fff3bf;
  color: inherit;
}

.shop-search-suggest__meta {
  margin-top: 2px;
  font-size: 12px;
  color: var(--shop-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-search-suggest__price {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--shop-primary-dark);
}

.shop-search-suggest__empty,
.shop-search-suggest__hint {
  padding: 12px 14px;
  font-size: 13px;
  color: var(--shop-muted);
}

.shop-lang,
.shop-currency__trigger {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
}

.shop-lang--stub {
  cursor: default;
  color: rgba(255, 255, 255, 0.9);
}

.shop-currency {
  position: relative;
}

.shop-currency__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 250;
  min-width: 120px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.shop-currency__menu[hidden] {
  display: none !important;
}

.shop-currency__item {
  display: block;
  padding: 10px 14px;
  color: #333;
  font-size: 14px;
}

.shop-currency__item:hover,
.shop-currency__item.is-active {
  background: #f5f5f5;
  color: var(--shop-primary-dark);
}

.shop-header__login {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  white-space: nowrap;
}

a.shop-header__login:hover {
  color: #b8d4f5;
}

button.shop-header__login {
  padding: 6px 12px;
  border: 1px solid rgba(184, 212, 245, 0.55);
  border-radius: 8px;
  background: transparent;
  font: inherit;
  cursor: pointer;
  color: #b8d4f5;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

button.shop-header__login:hover {
  background: rgba(184, 212, 245, 0.12);
  border-color: #b8d4f5;
  color: #fff;
}

.shop-header__cart-btn {
  position: relative;
}

.shop-header__admin-btn {
  position: relative;
  text-decoration: none;
}

.shop-header__orders-badge--on-icon {
  position: absolute;
  top: -4px;
  right: -6px;
}

.shop-header__cart-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: #e11d48;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.shop-header__cart-badge[hidden] {
  display: none !important;
}

.shop-header__cart-badge.is-bump {
  animation: shop-cart-badge-bump 0.45s ease;
}

@keyframes shop-cart-badge-bump {
  0% { transform: scale(1); }
  35% { transform: scale(1.35); }
  70% { transform: scale(0.92); }
  100% { transform: scale(1); }
}

.shop-cart-toast {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: calc(var(--shop-overlay-z) + 2);
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 14px 18px;
  border-radius: 14px;
  background: #111827;
  color: #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 16px) scale(0.96);
  transition: opacity 0.28s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.28s ease;
  pointer-events: none;
}

.shop-cart-toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0) scale(1);
}

.shop-cart-toast__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--shop-primary);
  color: #fff;
  animation: shop-cart-toast-icon-pop 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.shop-cart-toast__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.shop-cart-toast__title {
  font-size: 13px;
  font-weight: 600;
  color: #f9fafb;
}

.shop-cart-toast__text {
  font-size: 12px;
  color: #d1d5db;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@keyframes shop-cart-toast-icon-pop {
  0% { transform: scale(0.4); opacity: 0; }
  60% { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1); }
}

/* Overlays & panels */
.shop-drawer-overlay,
.shop-cart-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--shop-overlay-z);
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.shop-drawer-overlay.is-open,
.shop-cart-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.shop-drawer {
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--shop-panel-z);
  display: flex;
  flex-direction: column;
  width: min(300px, 85vw);
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  background: #fff;
  box-shadow: 4px 0 20px rgba(11, 40, 71, 0.2);
  transform: translateX(-100%);
  transition: transform 0.28s ease;
  visibility: hidden;
  pointer-events: none;
  overflow: hidden;
}

.shop-drawer.is-open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

.shop-drawer__head {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--shop-primary-dark);
  color: #fff;
}

.shop-drawer__title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.shop-drawer__close {
  flex-shrink: 0;
  padding: 4px 8px;
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
}

.shop-drawer__scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.shop-drawer__nav {
  display: flex;
  flex-direction: column;
}

.shop-drawer__link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 24px;
  border-bottom: 1px solid #f0f0f0;
  color: #333;
  font-size: 16px;
  font-weight: 500;
  transition: background 0.15s;
}

.shop-drawer__link:last-child {
  margin-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}

.shop-drawer__link:hover {
  background: var(--shop-primary-light);
  color: var(--shop-primary-dark);
  font-weight: 500;
}

.shop-drawer__link--button {
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.shop-cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: var(--shop-panel-z);
  display: flex;
  flex-direction: column;
  width: min(400px, 100vw);
  height: 100vh;
  background: #fff;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
  transform: translateX(100%);
  transition: transform 0.28s ease;
  visibility: hidden;
  pointer-events: none;
}

.shop-cart-panel.is-open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

.shop-cart-panel__head,
.shop-cart-panel__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--shop-border);
  flex-shrink: 0;
}

.shop-cart-panel__foot {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin-top: auto;
  border-bottom: 0;
  border-top: 1px solid var(--shop-border);
}

.shop-cart-panel__head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.shop-cart-panel__close {
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  color: #555;
  cursor: pointer;
}

.shop-cart-panel__body {
  flex: 1;
  overflow: auto;
  padding: 12px 20px;
}

.shop-cart-panel__total {
  font-size: 16px;
}

.shop-cart-panel__total strong {
  color: var(--shop-primary);
  font-size: 20px;
}

.shop-cart-item {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 28px 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.shop-cart-item__remove {
  position: absolute;
  top: 10px;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #9ca3af;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.shop-cart-item__remove:hover {
  background: #fef2f2;
  color: #dc2626;
}

.shop-cart-item__thumb {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 6px;
  background: #fafafa;
}

.shop-cart-item__thumb--empty {
  background: #f0f0f0;
}

.shop-cart-item__name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

.shop-cart-item__meta {
  color: var(--shop-muted);
  font-size: 12px;
  margin-top: 2px;
}

.shop-cart-item__line-total {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--shop-primary);
}

.shop-cart-panel__subtotal,
.shop-cart-panel__discount {
  font-size: 14px;
  margin-bottom: 4px;
}

.shop-cart-panel__discount {
  color: #059669;
  line-height: 1.4;
}

.shop-cart-panel__discount strong {
  color: #047857;
}

.shop-checkout__discount {
  font-size: 14px;
  color: #059669;
  margin: 8px 0;
  line-height: 1.4;
}

.shop-checkout__total--pay {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--shop-border);
}

.shop-cart-item__qty {
  display: flex;
  align-items: center;
  gap: 6px;
}

.shop-cart-item__qty button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--shop-border);
  border-radius: 6px;
  background: #fff;
  font-size: 16px;
  cursor: pointer;
}

.shop-cart-item__qty button:hover {
  border-color: var(--shop-primary);
  color: var(--shop-primary);
}

/* Main */
.shop-main {
  min-height: 80vh;
  padding-bottom: 80px;
}

.shop-main:has(> .shop-account) {
  padding-top: 28px;
}

.shop-footer {
  padding: 32px 1.5rem 48px;
  text-align: center;
  color: var(--shop-muted);
  font-size: 14px;
  border-top: 1px solid var(--shop-border);
}

.shop-muted {
  color: var(--shop-muted);
  font-size: 13px;
}

.shop-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--shop-primary-dark);
}

/* Hero */
.shop-hero {
  padding: 48px 3.5rem 56px;
  text-align: center;
  background: linear-gradient(180deg, #eef4fb 0%, #fff 100%);
}

.shop-hero__badge {
  display: inline-block;
  margin-bottom: 16px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--shop-primary-light);
  color: var(--shop-primary-dark);
  font-size: 13px;
  font-weight: 600;
}

.shop-hero__title {
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  line-height: 1.15;
  color: #111;
}

.shop-hero__lead {
  margin: 0 auto 28px;
  max-width: 520px;
  color: var(--shop-muted);
  font-size: 16px;
  line-height: 1.5;
}

.shop-hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.shop-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 0;
  transition: background 0.2s, color 0.2s;
}

.shop-btn--lg {
  padding: 14px 28px;
  font-size: 15px;
}

.shop-btn--primary {
  background: var(--shop-primary);
  color: #fff;
}

.shop-btn--primary:hover:not(:disabled) {
  background: var(--shop-primary-hover);
}

.shop-btn--outline {
  background: #fff;
  color: var(--shop-primary-dark);
  border: 1.5px solid var(--shop-primary);
}

.shop-btn--outline:hover {
  background: var(--shop-primary-light);
}

.shop-btn--whatsapp {
  gap: 8px;
  background: #25d366;
  color: #fff;
}

.shop-btn--whatsapp:hover:not(:disabled) {
  background: #1ebe57;
}

.shop-btn--whatsapp:active:not(:disabled) {
  background: #128c7e;
}

.shop-btn__wa-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.shop-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Categories */
.shop-home-categories,
.shop-home-featured,
.shop-home-promo {
  padding: 32px 3.5rem;
}

.shop-section-title {
  margin: 0 0 20px;
  font-size: 22px;
  font-weight: 700;
}

.shop-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.shop-category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 140px;
  padding: 24px 16px;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shop-shadow);
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
}

.shop-category-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.shop-category-card__icon {
  font-size: 36px;
}

.shop-category-card__title {
  font-size: 16px;
  font-weight: 600;
  text-align: center;
}

.shop-home-featured__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.shop-home-promo {
  margin: 0 3.5rem 32px;
  padding: 32px;
  border-radius: 16px;
  background: linear-gradient(135deg, #0b2847 0%, #1a4f8b 100%);
  color: #fff;
}

.shop-home-promo__title {
  margin: 0 0 8px;
  font-size: 22px;
}

.shop-home-promo__text {
  margin: 0;
  opacity: 0.9;
  font-size: 14px;
}

/* Catalog */
.shop-catalog {
  padding: 20px 3.5rem 40px;
}

.shop-catalog__types {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.shop-type-tab {
  padding: 8px 16px;
  border: 1px solid var(--shop-border);
  border-radius: 999px;
  color: #333;
  font-size: 14px;
  font-weight: 500;
  background: #fff;
}

.shop-type-tab.is-active,
.shop-type-tab:hover {
  border-color: var(--shop-primary);
  background: var(--shop-primary-light);
  color: var(--shop-primary-dark);
}

.shop-catalog__summary {
  margin: 0 0 16px;
  color: var(--shop-muted);
  font-size: 14px;
}

.shop-catalog__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.shop-catalog__toolbar-label {
  font-size: 13px;
  color: var(--shop-muted);
  margin-right: 4px;
}

.shop-catalog__toolbar-sep {
  width: 1px;
  height: 20px;
  background: var(--shop-border);
  margin: 0 4px;
}

.shop-sort-tab {
  padding: 6px 12px;
  border: 1px solid var(--shop-border);
  border-radius: 8px;
  color: #333;
  font-size: 13px;
  font-weight: 500;
  background: #fff;
}

.shop-sort-tab.is-active,
.shop-sort-tab:hover {
  border-color: var(--shop-primary);
  background: var(--shop-primary-light);
  color: var(--shop-primary-dark);
}

.shop-type-tab--new.is-active,
.shop-type-tab--new:hover {
  border-color: var(--shop-primary-dark);
  background: var(--shop-primary-dark);
  color: #fff;
}

/* Product grid — карточки как Fragrancia */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.shop-card {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shop-shadow);
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.shop-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.shop-card__image-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 170px;
  background: #fff;
}

.shop-card__zoom-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--shop-primary-dark);
  box-shadow: 0 2px 10px rgba(11, 40, 71, 0.18);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.shop-card__zoom-btn:active {
  transform: scale(0.96);
}

.shop-card__zoom-btn svg {
  display: block;
}

.shop-card__image {
  max-width: 100%;
  max-height: 150px;
  object-fit: contain;
}

.shop-card__image--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--shop-muted);
  font-size: 13px;
}

.shop-card__badges {
  position: absolute;
  bottom: 8px;
  left: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.shop-card__badge {
  width: fit-content;
  padding: 2px 5px;
  border-radius: 5px;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
}

.shop-card__badge--article {
  background: var(--shop-primary);
  font-size: 12px;
}

.shop-card__badge--category {
  background: #3d5a80;
}

.shop-card__badge--new {
  background: var(--shop-primary-dark);
}

.shop-card__badge--discount {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  padding: 3px 8px;
  border-radius: 6px;
  background: linear-gradient(135deg, #e63946 0%, #b5179e 100%);
  box-shadow: 0 2px 8px rgba(230, 57, 70, 0.35);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.shop-card__badge--new.shop-card__badge--top {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  padding: 3px 8px;
  border-radius: 6px;
  background: linear-gradient(135deg, #ff6b35 0%, #f72585 100%);
  box-shadow: 0 2px 8px rgba(247, 37, 133, 0.35);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.2;
}

.shop-card__info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px 12px;
  flex: 1;
}

.shop-card__name-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: center;
  color: inherit;
}

.shop-card__brand {
  color: var(--shop-muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-card__name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}

.shop-card__price-block {
  text-align: center;
}

.shop-card__price-row {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 4px;
}

.shop-card__price {
  color: var(--shop-primary);
  font-size: 16px;
  font-weight: 700;
}

.shop-card__price--old {
  color: var(--shop-muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: line-through;
}

.shop-card__price--sale {
  color: #c62828;
  font-size: 17px;
  font-weight: 800;
}

.shop-card__price-live {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.shop-card__price-live.is-volume-discount .shop-card__price--old {
  animation: shop-price-strike-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.shop-card__price-live.is-volume-discount .shop-card__price--sale {
  color: #1b5e20;
}

.shop-card__price-live.is-animating .shop-card__price--sale {
  animation: shop-price-sale-pop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.shop-card__price-live.is-volume-pulse .shop-card__price--sale {
  animation: shop-price-sale-pulse 0.4s ease-out;
}

.shop-card__volume-badge {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  color: #2e7d32;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateY(4px) scale(0.92);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.shop-card__price-live.is-volume-discount + .shop-card__unit {
  opacity: 0.85;
}

.shop-card__price-block:has(.shop-card__price-live.is-volume-discount) .shop-card__volume-badge:not([hidden]) {
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: shop-volume-badge-in 0.5s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}

@keyframes shop-price-strike-in {
  from {
    opacity: 0;
    transform: translateX(6px);
    text-decoration-color: transparent;
  }
  to {
    opacity: 1;
    transform: translateX(0);
    text-decoration-color: currentColor;
  }
}

@keyframes shop-price-sale-pop {
  0% {
    opacity: 0;
    transform: scale(0.75) translateY(8px);
  }
  60% {
    transform: scale(1.08) translateY(-2px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes shop-price-sale-pulse {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.06);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes shop-volume-badge-in {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.85);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.shop-card__unit {
  color: var(--shop-muted);
  font-size: 14px;
  font-weight: 600;
}

.shop-card__stock--out {
  display: block;
  margin-top: 4px;
  color: #c62828;
  font-size: 12px;
}

.shop-card__controls {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.shop-card__meta-line {
  margin: 0;
  font-size: 11px;
  color: var(--shop-muted);
  line-height: 1.35;
  text-align: center;
}

.shop-card__chars {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shop-card__desc {
  margin: 0;
  font-size: 12px;
  color: #555;
  line-height: 1.4;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shop-card__stock--in {
  display: block;
  margin-top: 4px;
  color: var(--shop-primary-dark);
  font-size: 11px;
}

.shop-card__qty-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.shop-card__stepper {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  gap: 6px;
  align-items: stretch;
}

.shop-card__stepper-btn {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--shop-border);
  border-radius: 8px;
  background: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.shop-card__stepper-btn:hover:not(:disabled) {
  border-color: var(--shop-primary);
  color: var(--shop-primary);
}

.shop-card__stepper-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.shop-card__stepper-input {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 0 6px;
  border: 1px solid var(--shop-border);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  -moz-appearance: textfield;
  appearance: textfield;
}

.shop-card__stepper-input::-webkit-outer-spin-button,
.shop-card__stepper-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.shop-card__stepper-input:focus {
  outline: none;
  border-color: var(--shop-primary);
  box-shadow: 0 0 0 2px rgba(26, 79, 139, 0.15);
}

.shop-card__stepper-input:disabled {
  background: #f3f4f6;
  color: var(--shop-muted);
  cursor: not-allowed;
}

.shop-card__qty-presets {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 4px;
  width: 100%;
}

.shop-card__qty-preset {
  flex: 1 1 0;
  min-width: 0;
  padding: 6px 2px;
  border: 1px solid var(--shop-border);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--shop-primary-dark);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  min-height: 32px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.shop-card__qty-preset:hover:not(:disabled) {
  border-color: var(--shop-primary);
  background: var(--shop-primary-light);
}

.shop-card__qty-preset:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  background: #f3f4f6;
  color: #9ca3af;
  border-color: #e5e7eb;
}

.shop-card__qty-preset.is-active {
  border-color: var(--shop-primary);
  background: var(--shop-primary);
  color: #fff;
}

.shop-card__line-total {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  min-height: 22px;
  margin-top: 2px;
  padding-top: 5px;
  border-top: 1px dashed var(--shop-border);
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
}

.shop-card__line-total.is-empty {
  visibility: hidden;
}

.shop-card__line-total-label {
  flex-shrink: 0;
  color: var(--shop-muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.85;
}

.shop-card__line-total-prices {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.shop-card__line-total-old {
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--shop-muted);
  font-size: 10px;
  font-weight: 600;
  text-decoration: line-through;
  font-variant-numeric: tabular-nums;
}

.shop-card__line-total-value {
  flex-shrink: 0;
  color: var(--shop-primary-dark);
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.shop-card__line-total.is-volume-discount .shop-card__line-total-value {
  color: #1b5e20;
}

.shop-header__user {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-auth {
  display: flex;
  justify-content: center;
  padding: 40px 1rem 60px;
}

.shop-auth__card {
  width: min(400px, 100%);
  padding: 28px 24px;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shop-shadow);
}

.shop-auth__title {
  margin: 0 0 8px;
  font-size: 22px;
}

.shop-auth__form {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.shop-field {
  display: grid;
  gap: 6px;
}

.shop-field__label {
  font-size: 13px;
  font-weight: 600;
}

.shop-field__control {
  padding: 10px 12px;
  border: 1px solid var(--shop-border);
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
}

.shop-btn--block {
  width: 100%;
}

.shop-alert {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
}

.shop-alert--error {
  background: #ffebee;
  color: #c62828;
}

.shop-alert--ok {
  background: #ecfdf5;
  color: #166534;
}

.shop-auth__hint {
  margin: 16px 0 0;
  text-align: center;
  font-size: 13px;
}

.shop-auth__step[hidden] {
  display: none !important;
}

.shop-auth__sent-to {
  margin: 0 0 12px;
}

.shop-card__cart-btn {
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: var(--shop-primary);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.shop-card__cart-btn:hover:not(:disabled) {
  background: var(--shop-primary-hover);
}

.shop-card__cart-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.shop-card__cart-btn.is-in-cart {
  color: #e09201;
  background: #fff7f1;
  border: 1px solid #e09201;
}

.shop-card__cart-btn.is-added {
  animation: shop-cart-btn-added 0.55s ease;
}

@keyframes shop-cart-btn-added {
  0% { transform: scale(1); }
  40% { transform: scale(0.94); }
  100% { transform: scale(1); }
}

.shop-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
}

.shop-pager--numbered {
  flex-wrap: wrap;
  gap: 8px;
}

.shop-pager__btn {
  padding: 8px 16px;
  border: 1px solid var(--shop-border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--shop-primary-dark);
}

.shop-pager__btn--disabled {
  opacity: 0.45;
  pointer-events: none;
}

.shop-pager__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border: 1px solid var(--shop-border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--shop-primary-dark);
  text-decoration: none;
}

.shop-pager__num:hover {
  border-color: var(--shop-primary, #8b6b4a);
}

.shop-pager__num--active {
  background: var(--shop-primary, #8b6b4a);
  border-color: var(--shop-primary, #8b6b4a);
  color: #fff;
}

.shop-pager__dots {
  color: var(--shop-muted, #888);
  padding: 0 2px;
}

.shop-account__orders-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 16px;
}

.shop-account__orders-summary {
  margin: 0;
}

.shop-account__per-page {
  margin: 0;
}

.shop-account__per-page-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--shop-muted, #666);
}

.shop-account__per-page-select {
  width: auto;
  min-width: 72px;
  padding: 6px 10px;
}

.shop-empty {
  padding: 64px 16px;
  text-align: center;
}

/* Product page */
.shop-product {
  padding: 20px 3.5rem 40px;
}

.shop-product__back {
  display: inline-block;
  margin-bottom: 20px;
  font-size: 14px;
}

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

.shop-product__image {
  width: 100%;
  max-height: 480px;
  object-fit: contain;
}

.shop-product__image--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
  border: 1px solid var(--shop-border);
  border-radius: 12px;
  color: var(--shop-muted);
}

.shop-product__brand {
  margin: 0 0 8px;
  color: var(--shop-muted);
  font-size: 14px;
}

.shop-product__title {
  margin: 0 0 12px;
  font-size: clamp(24px, 4vw, 32px);
  line-height: 1.2;
}

.shop-product__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.shop-product__price {
  margin-bottom: 8px;
  color: var(--shop-primary);
  font-size: 28px;
  font-weight: 700;
}

.shop-product__stock {
  margin: 0 0 20px;
  font-size: 14px;
}

.shop-product__stock--out {
  color: #c62828;
}

.shop-product__cart-btn {
  max-width: 300px;
  margin-bottom: 28px;
}

.shop-product__description,
.shop-product__chars {
  margin-top: 28px;
}

.shop-product__description h2,
.shop-product__chars h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.shop-product__chars dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.shop-product__chars dt {
  font-weight: 600;
  font-size: 13px;
}

.shop-product__chars dd {
  margin: 0;
  color: #444;
  font-size: 14px;
}

.shop-header__account {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #b8d4f5;
  text-decoration: none;
  white-space: nowrap;
}

.shop-header__orders-badge,
.shop-drawer__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #e11d48;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.shop-header__orders-badge[hidden],
.shop-drawer__badge[hidden] {
  display: none !important;
}

.shop-drawer__badge {
  margin-left: auto;
}

.shop-admin-notify-toast {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: calc(var(--shop-panel-z) + 40);
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(440px, calc(100vw - 24px));
  padding: 14px 16px;
  border-radius: 14px;
  background: #0b2847;
  color: #fff;
  box-shadow: 0 14px 40px rgba(11, 40, 71, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 18px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  pointer-events: none;
}

.shop-admin-notify-toast--show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.shop-admin-notify-toast__body {
  min-width: 0;
  flex: 1 1 auto;
}

.shop-admin-notify-toast__title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 650;
}

.shop-admin-notify-toast__sub {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
}

.shop-admin-notify-toast__btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.shop-required {
  color: #dc2626;
}

.shop-account {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 3.5rem 48px;
}

.shop-account--wide {
  max-width: min(1320px, 100%);
}

.shop-account__head {
  margin-top: 8px;
  margin-bottom: 1.25rem;
}

.shop-account__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 1.5rem;
}

body.shop-admin-new-order-open {
  overflow: hidden;
}

.shop-admin-new-order {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  background: rgba(11, 40, 71, 0.45);
}

.shop-admin-new-order[hidden] {
  display: none !important;
}

.shop-admin-new-order__dialog {
  width: min(520px, 100%);
  max-height: min(90vh, 720px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.shop-admin-new-order__panel {
  padding: 20px 18px 18px;
  border-radius: 18px 18px 14px 14px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(11, 40, 71, 0.22);
}

.shop-admin-new-order__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.shop-admin-new-order__title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 650;
}

.shop-admin-new-order__hint {
  margin: 0 0 14px;
  font-size: 0.9rem;
}

.shop-admin-new-order__alert {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff1f0;
  color: #a61d24;
  font-size: 0.875rem;
}

.shop-admin-new-order__fieldset {
  margin: 0 0 12px;
  padding: 0;
  border: 0;
}

.shop-admin-new-order__radio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 14px;
  font-size: 0.9rem;
}

.shop-admin-new-order__results {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0 0;
  max-height: 240px;
  overflow: auto;
}

.shop-admin-new-order__item {
  display: block;
  width: 100%;
  padding: 12px 14px;
  text-align: left;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #f8fbff;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.shop-admin-new-order__item:hover,
.shop-admin-new-order__item:focus-visible {
  border-color: #8eb5e0;
  background: #eef5fc;
  outline: none;
}

.shop-admin-new-order__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.shop-admin-new-order__foot .shop-btn {
  flex: 1 1 auto;
  min-height: 44px;
}

.shop-admin-new-order .shop-field {
  margin-bottom: 12px;
}

.shop-admin-new-order .shop-field__control {
  font-size: 16px;
}

@media (min-width: 641px) {
  .shop-admin-new-order {
    align-items: center;
    padding: 24px;
  }

  .shop-admin-new-order__panel {
    border-radius: 16px;
    padding: 22px 22px 20px;
  }
}

.shop-account-export {
  margin-bottom: 1.75rem;
  padding: 1.25rem 1.5rem;
  border-radius: 16px;
  border: 1px solid #dbe4f0;
  background: linear-gradient(135deg, #f8fbff 0%, #fff 60%, #f3f7fc 100%);
  box-shadow: 0 8px 24px rgba(11, 40, 71, 0.06);
}

.shop-account-export__hint {
  margin: 0 0 1rem;
  font-size: 0.875rem;
}

.shop-account-export__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.shop-account-export__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}

.shop-account__section-title {
  margin: 0 0 1rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.shop-account__order-search {
  position: relative;
  margin: 0 0 14px;
  z-index: 5;
}

.shop-account__order-search-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
}

.shop-account__order-search-field {
  flex: 1 1 240px;
  min-width: 0;
  display: grid;
  gap: 6px;
}

.shop-account__order-search-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--shop-muted);
}

.shop-account__order-search-input {
  width: 100%;
  min-height: 44px;
  font-size: 16px;
}

.shop-account__order-search-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  max-height: min(50vh, 320px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(11, 40, 71, 0.16);
  z-index: 30;
}

.shop-account__order-search-list[hidden] {
  display: none !important;
}

.shop-account__order-search-empty {
  padding: 14px 16px;
  color: var(--shop-muted);
  font-size: 14px;
}

.shop-account__order-search-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid #eef2f7;
  background: #fff;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.shop-account__order-search-item:last-child {
  border-bottom: 0;
}

.shop-account__order-search-item:hover,
.shop-account__order-search-item.is-active {
  background: #f4f8fc;
}

.shop-account__order-search-item-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.shop-account__order-search-item-name {
  font-weight: 600;
  font-size: 14px;
}

.shop-account__order-search-item-meta {
  font-size: 12px;
  color: var(--shop-muted);
}

.shop-account__order-search-item-sum {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.shop-account__order-filters {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 0 8px;
}

.shop-account__order-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 16px;
}

.shop-account__order-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid #dbe4f0;
  border-radius: 999px;
  background: #fff;
  color: var(--shop-text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.shop-account__order-tab.is-active {
  border-color: #fca5a5;
  background: #fff5f5;
  color: #b91c1c;
}

.shop-account__order-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  padding: 0 6px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
}

.shop-account__order-tab.is-active .shop-account__order-tab-count {
  background: #fecaca;
  color: #991b1b;
}

.shop-bonus-card {
  margin-bottom: 1.75rem;
  padding: 1.25rem 1.5rem;
  border-radius: 16px;
  border: 1px solid #e8dfd0;
  background: linear-gradient(135deg, #fffaf3 0%, #fff 55%, #f8f4ee 100%);
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.06);
}

.shop-bonus-card__label {
  margin: 0 0 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--shop-muted);
}

.shop-bonus-card__balance {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  line-height: 1.1;
  color: #7c5c2b;
}

.shop-bonus-card__hint {
  margin: 0;
  font-size: 0.9375rem;
}

.shop-bonus-card__hint strong {
  color: var(--shop-text);
}

.shop-bonus-card__note {
  margin: 1rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(124, 92, 43, 0.12);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.shop-bonus-card__pending,
.shop-bonus-card__expires {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
}

.shop-bonus-card__tiers {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(124, 92, 43, 0.12);
}

.shop-bonus-card__tiers-title {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--shop-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.shop-bonus-tiers {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.shop-bonus-tiers li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.875rem;
}

.shop-bonus-lots {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.shop-bonus-lots__item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.875rem;
}

.shop-bonus-lots__amount {
  font-weight: 600;
  color: #7c5c2b;
}

.shop-bonus-lots__meta {
  color: var(--shop-muted);
  font-size: 0.8125rem;
}

.shop-cart-cashback,
.shop-checkout__cashback {
  margin: 0.5rem 0 0.75rem;
  padding: 0.75rem 0.875rem;
  border-radius: 12px;
  background: #fffaf3;
  border: 1px solid #efe4d4;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #5c4a32;
}

.shop-cart-cashback strong,
.shop-checkout__cashback strong {
  color: #7c5c2b;
}

.shop-bonus-card__history {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(124, 92, 43, 0.12);
}

/* Полноэкранный просмотр фото (pinch-zoom, как в Фото на iPhone) */
.shop-photo-zoom {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #000;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.shop-photo-zoom[hidden] {
  display: none !important;
}

.shop-photo-zoom__backdrop {
  position: absolute;
  inset: 0;
}

.shop-photo-zoom__close {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  z-index: 3;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.shop-photo-zoom__stage {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.shop-photo-zoom__img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform-origin: center center;
  will-change: transform;
  pointer-events: none;
}

.shop-photo-zoom__hint {
  position: absolute;
  bottom: max(16px, env(safe-area-inset-bottom));
  left: 50%;
  z-index: 2;
  margin: 0;
  padding: 0 16px;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  text-align: center;
  pointer-events: none;
  transition: opacity 0.2s;
}

.shop-photo-zoom.is-zoomed .shop-photo-zoom__hint {
  opacity: 0;
}

.shop-account__back {
  margin-bottom: 1rem;
}

.shop-orders-table-wrap {
  overflow-x: auto;
}

.shop-orders-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.shop-orders-table--admin {
  min-width: 1280px;
  table-layout: fixed;
}

.shop-orders-table--admin th:nth-child(1),
.shop-orders-table--admin td:nth-child(1) {
  width: 4%;
}

.shop-orders-table--admin th:nth-child(2),
.shop-orders-table--admin td:nth-child(2) {
  width: 6%;
}

.shop-orders-table--admin th:nth-child(3),
.shop-orders-table--admin td:nth-child(3) {
  width: 10%;
}

.shop-orders-table--admin th:nth-child(4),
.shop-orders-table--admin td:nth-child(4) {
  width: 12%;
}

.shop-orders-table--admin th:nth-child(5),
.shop-orders-table--admin td:nth-child(5) {
  width: 9%;
}

.shop-orders-table--admin th:nth-child(6),
.shop-orders-table--admin td:nth-child(6) {
  width: 10%;
}

.shop-orders-table--admin th:nth-child(7),
.shop-orders-table--admin td:nth-child(7) {
  width: 7%;
}

.shop-orders-table--admin th:nth-child(8),
.shop-orders-table--admin td:nth-child(8) {
  width: 9%;
}

.shop-orders-table--admin th:nth-child(9),
.shop-orders-table--admin td:nth-child(9) {
  width: 10%;
}

.shop-orders-table--admin th:nth-child(10),
.shop-orders-table--admin td:nth-child(10) {
  width: 9%;
}

.shop-orders-table--admin th:nth-child(11),
.shop-orders-table--admin td:nth-child(11) {
  width: 14%;
  white-space: nowrap;
}

.shop-orders-table--admin td:nth-child(4),
.shop-orders-table--admin td:nth-child(5),
.shop-orders-table--admin td:nth-child(6) {
  overflow-wrap: anywhere;
}

.shop-orders-table--admin tr[data-order-href] {
  cursor: pointer;
}

.shop-orders-table--admin tr[data-order-href]:hover td {
  background: #f8fafc;
}

.shop-orders-table--admin tr[data-order-href].shop-order-row--unopened:hover td {
  background: #ffe8e8;
}

.shop-orders-table th,
.shop-orders-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--shop-border);
  text-align: left;
}

.shop-orders-table th {
  font-weight: 600;
  color: var(--shop-muted);
  font-size: 12px;
  text-transform: uppercase;
}

.shop-order-row--unopened td {
  background: #fff5f5;
}

.shop-order-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.shop-order-status--new {
  background: #dbeafe;
  color: #1d4ed8;
}

.shop-order-status--processing {
  background: #fef3c7;
  color: #92400e;
}

.shop-order-status--completed {
  background: #d1fae5;
  color: #065f46;
}

.shop-order-status--cancelled {
  background: #fee2e2;
  color: #991b1b;
}

.shop-account__admin-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 600;
}

.shop-account__admin-note {
  margin: -4px 0 12px;
}

.shop-order-card--unopened {
  background: #fff5f5;
  border-color: #fecaca;
}

.shop-invoice {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 16px 32px;
}

.shop-invoice__head {
  margin-bottom: 20px;
}

.shop-invoice__meta {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}

.shop-invoice__meta > div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px;
}

.shop-invoice__meta dt {
  color: var(--shop-muted);
  font-size: 13px;
}

.shop-invoice__meta dd {
  margin: 0;
  font-weight: 600;
}

.shop-invoice__table-wrap {
  overflow-x: auto;
  margin-bottom: 20px;
  -webkit-overflow-scrolling: touch;
}

.shop-invoice-lines {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.35;
}

.shop-invoice-lines th,
.shop-invoice-lines td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--shop-border);
  vertical-align: middle;
}

.shop-invoice-lines th {
  font-weight: 600;
  color: var(--shop-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.shop-invoice-lines__col-no {
  width: 32px;
}

.shop-invoice-lines__col-photo {
  width: 48px;
}

.shop-invoice-lines__col-name {
  width: auto;
}

.shop-invoice-lines__col-price {
  width: 108px;
}

.shop-invoice-lines__col-qty {
  width: 52px;
}

.shop-invoice-lines__col-sum {
  width: 108px;
}

.shop-invoice-lines__no {
  text-align: center;
  color: var(--shop-muted);
  font-weight: 600;
}

.shop-invoice-lines__photo {
  text-align: center;
  padding-left: 4px;
  padding-right: 4px;
}

.shop-invoice-photo {
  display: block;
  width: 40px;
  height: 40px;
  margin: 0 auto;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--shop-border);
  background: #f8fafc;
}

.shop-invoice-photo--placeholder {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.shop-invoice-lines__name {
  overflow: hidden;
  word-break: break-word;
}

.shop-invoice-lines__title {
  display: block;
}

.shop-invoice-lines__sku {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.25;
  font-weight: 500;
  color: var(--shop-muted);
}

.shop-invoice-lines__price,
.shop-invoice-lines__qty,
.shop-invoice-lines__sum {
  text-align: right;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
}

.shop-invoice-lines__qty {
  text-align: center;
  white-space: nowrap;
}

.shop-invoice-lines__hint {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-invoice-lines__hint--was {
  text-decoration: line-through;
}

.shop-invoice-lines__empty {
  text-align: center;
  padding: 20px 12px;
}

.shop-invoice--embedded {
  max-width: 920px;
  margin: 0;
  padding: 0;
}

.shop-account--order .shop-invoice--embedded {
  max-width: 1080px;
}

.shop-invoice__totals {
  max-width: 360px;
  margin-left: auto;
  margin-bottom: 20px;
}

.shop-invoice__total-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
}

.shop-invoice__total-row--discount {
  color: #059669;
}

.shop-invoice__total-row--grand {
  font-size: 18px;
  border-top: 1px solid var(--shop-border);
  padding-top: 10px;
  margin-top: 4px;
}

.shop-invoice__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.shop-invoice__note {
  font-size: 13px;
}

.shop-invoice__copy {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--shop-border);
}

.shop-invoice__copy-label {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
}

.shop-invoice__copy-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}

.shop-invoice__copy-input {
  flex: 1 1 220px;
  min-width: 0;
  background: #f8fafc;
}

.shop-order-cards {
  display: none;
}

.shop-order-card {
  border: 1px solid var(--shop-border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
  background: #fff;
}

.shop-order-card[data-order-href] {
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.shop-order-card[data-order-href]:hover {
  border-color: #94a3b8;
  box-shadow: 0 2px 8px rgb(15 23 42 / 0.06);
}

.shop-order-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}

.shop-order-card__id {
  font-weight: 700;
  font-size: 16px;
}

.shop-order-card__meta {
  display: grid;
  gap: 4px;
  font-size: 13px;
  color: var(--shop-muted);
  margin-bottom: 10px;
}

.shop-order-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.shop-checkout {
  max-width: 1040px;
  margin: 0 auto;
  padding: 28px 3.5rem 56px;
}

.shop-checkout__intro {
  margin-bottom: 28px;
}

.shop-checkout__intro .shop-section-title {
  margin-bottom: 10px;
}

.shop-checkout__intro .shop-muted {
  margin: 0;
  max-width: 42rem;
  line-height: 1.5;
}

.shop-checkout__layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: start;
}

.shop-checkout__form,
.shop-checkout__summary {
  background: #fff;
  border: 1px solid #d4dbe5;
  border-radius: 12px;
  padding: 28px 24px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.shop-checkout__form {
  display: flex;
  flex-direction: column;
}

.shop-checkout .shop-field {
  gap: 8px;
  margin-bottom: 20px;
}

.shop-checkout .shop-field:last-of-type {
  margin-bottom: 24px;
}

.shop-checkout .shop-field__label {
  color: var(--shop-muted);
  letter-spacing: 0.01em;
  line-height: 1.35;
}

.shop-checkout .shop-field__control {
  padding: 11px 14px;
  line-height: 1.45;
  border-color: #d4dbe5;
  border-radius: 6px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.shop-checkout .shop-field__control:focus {
  outline: 2px solid rgba(26, 79, 139, 0.32);
  outline-offset: 0;
  border-color: var(--shop-primary);
}

.shop-checkout .shop-field__control--area {
  min-height: 104px;
  resize: vertical;
}

.shop-checkout .shop-field__hint {
  margin-top: 6px;
  line-height: 1.4;
}

.shop-checkout .shop-alert {
  margin-bottom: 20px;
}

.shop-checkout #shop-checkout-submit {
  margin-top: 4px;
}

.shop-checkout__summary-title {
  margin: 0 0 16px;
  padding-bottom: 14px;
  font-size: 18px;
  border-bottom: 1px solid var(--shop-border);
}

.shop-checkout__items {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--shop-border);
}

.shop-checkout__line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  font-size: 14px;
  line-height: 1.45;
  padding: 2px 0;
}

.shop-checkout__total {
  font-size: 18px;
  margin-bottom: 16px;
  padding-top: 4px;
  line-height: 1.4;
}

.shop-checkout__summary .shop-link {
  display: inline-block;
  margin-top: 4px;
  line-height: 1.45;
}

.shop-field__hint {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--shop-muted);
}

.shop-field__control--area {
  min-height: 96px;
  resize: vertical;
}

.shop-cart-panel__checkout {
  margin: 12px 0;
}

.shop-order-detail__meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px 14px;
  margin: 0 0 12px;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid var(--shop-border);
  border-radius: 10px;
}

.shop-order-detail__meta-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.shop-order-detail__meta-item--wide {
  grid-column: 1 / -1;
}

.shop-order-detail__meta dt {
  flex: 0 0 auto;
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  color: var(--shop-muted);
  white-space: nowrap;
}

.shop-order-detail__meta dd {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.shop-order-detail__meta .shop-muted {
  font-size: 12px;
  font-weight: 500;
}

.shop-order-detail__meta .shop-order-status {
  padding: 1px 6px;
  font-size: 11px;
  vertical-align: middle;
}

.shop-order-admin {
  margin: 12px 0;
  padding: 10px 12px;
  border: 1px solid var(--shop-border);
  border-radius: 12px;
  background: #fff;
  overflow: visible;
}

.shop-order-admin__head {
  margin-bottom: 8px;
}

.shop-order-admin__head .shop-account__section-title {
  margin-bottom: 4px;
}

.shop-order-admin__form {
  display: grid;
  gap: 8px;
}

.shop-order-admin__subtitle {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 600;
}

.shop-order-admin__subtitle--sm {
  font-size: 0.95rem;
}

.shop-order-admin__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.shop-order-admin__comment {
  grid-column: 1 / -1;
}

.shop-order-admin__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.shop-order-admin__actions [data-shop-send-invoice-error] {
  flex: 1 0 100%;
  margin: 0;
}

.shop-order-admin__counterparty {
  display: grid;
  gap: 6px;
  margin: 0 0 8px;
  padding: 6px 8px;
  border: 1px solid var(--shop-border, #e2e8f0);
  border-radius: 8px;
  background: #fff;
}

.shop-order-admin__counterparty [hidden] {
  display: none !important;
}

.shop-order-admin__cp-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 10px;
}

.shop-order-admin__cp-now {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  margin: 0;
  min-width: 0;
  font-size: 13px;
  line-height: 1.3;
  color: var(--shop-muted);
}

.shop-order-admin__cp-now strong {
  color: var(--shop-text, #0f172a);
  font-size: 13px;
}

.shop-order-admin__cp-now span {
  min-width: 0;
}

.shop-order-admin__cp-confirm-form {
  margin: 0;
}

.shop-order-admin__cp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}

.shop-order-admin__cp-find {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
}

.shop-order-admin__counterparty .shop-field {
  gap: 2px;
}

.shop-order-admin__counterparty .shop-field__label {
  font-size: 11px;
  font-weight: 500;
  color: var(--shop-muted);
}

.shop-order-admin__counterparty .shop-field__control {
  padding: 6px 8px;
  font-size: 13px;
  border-radius: 6px;
}

.shop-order-admin__counterparty .shop-btn {
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 8px;
  white-space: nowrap;
}

.shop-order-admin__cp-results:not([hidden]) {
  display: grid;
  gap: 4px;
}

.shop-order-admin__cp-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 6px 8px;
  border: 1px solid var(--shop-border, #e2e8f0);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
}

.shop-order-admin__cp-item:hover,
.shop-order-admin__cp-item:focus-visible {
  border-color: var(--shop-accent, #0f766e);
  outline: none;
}

.shop-order-admin__cp-create:not([hidden]) {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 0.8fr) auto;
  gap: 6px;
  align-items: end;
  margin: 0;
}

.shop-order-admin__lines {
  display: grid;
  gap: 8px;
}

.shop-order-admin__lines-details {
  border: 1px solid var(--shop-border);
  border-radius: 12px;
  background: #fff;
  overflow: visible;
}

.shop-order-admin__lines-summary {
  cursor: pointer;
  list-style: none;
  padding: 8px 10px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--shop-text, #0f172a);
  user-select: none;
}

.shop-order-admin__lines-summary::-webkit-details-marker {
  display: none;
}

.shop-order-admin__lines-summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 8px;
  transition: transform 0.15s ease;
  color: var(--shop-muted);
}

.shop-order-admin__lines-details[open] > .shop-order-admin__lines-summary::before {
  transform: rotate(90deg);
}

.shop-order-admin__lines-details[open] > .shop-order-admin__lines-summary {
  border-bottom: 1px solid var(--shop-border);
}

.shop-order-admin__lines-body {
  display: grid;
  gap: 8px;
  padding: 8px 10px 10px;
}

.shop-order-admin__lines-table-wrap {
  max-width: 100%;
  overflow: visible;
  border: 1px solid #c5c5c5;
  border-radius: 0;
  background: #fff;
}

.shop-order-admin__lines-table {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border-collapse: collapse;
  font-size: 12px;
  line-height: 1.25;
  table-layout: fixed;
  background: #fff;
}

.shop-order-admin__lines-table th,
.shop-order-admin__lines-table td {
  min-width: 0;
  padding: 3px 4px;
  border: 1px solid #d0d0d0;
  text-align: left;
  vertical-align: middle;
  overflow: visible;
}

.shop-order-admin__lines-table th {
  background: #f2f2f2;
  font-size: 11px;
  font-weight: 600;
  color: #333;
  white-space: normal;
}

.shop-order-admin__lines-table th:nth-child(1),
.shop-order-admin__lines-table td:nth-child(1) {
  width: 30%;
}

.shop-order-admin__lines-table th:nth-child(2),
.shop-order-admin__lines-table td:nth-child(2) {
  width: 48px;
  text-align: right;
}

.shop-order-admin__lines-table th:nth-child(3),
.shop-order-admin__lines-table td:nth-child(3) {
  width: 76px;
  text-align: right;
}

.shop-order-admin__lines-table th:nth-child(4),
.shop-order-admin__lines-table td:nth-child(4) {
  width: 44px;
  text-align: right;
}

.shop-order-admin__lines-table th:nth-child(5),
.shop-order-admin__lines-table td:nth-child(5) {
  width: 84px;
}

.shop-order-admin__lines-table th:nth-child(6),
.shop-order-admin__lines-table td:nth-child(6) {
  width: 80px;
  text-align: right;
}

.shop-order-admin__lines-table th:nth-child(7),
.shop-order-admin__lines-table td:nth-child(7) {
  width: 24px;
  padding: 0;
  text-align: center;
}

.shop-order-admin__lines-table td:first-child {
  vertical-align: top;
}

.shop-order-admin__line-name {
  display: block;
  font-weight: 500;
  line-height: 1.3;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.shop-order-admin__line-meta {
  margin-top: 2px;
  font-size: 10px;
  line-height: 1.3;
  color: #888;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.shop-order-admin__lines-table .shop-field__control,
.shop-order-admin__lines-table input,
.shop-order-admin__lines-table select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  padding: 2px 3px;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 12px;
  box-shadow: none;
  box-sizing: border-box;
}

.shop-order-admin__lines-table input[type="number"] {
  -moz-appearance: textfield;
}

.shop-order-admin__lines-table input[type="number"]::-webkit-outer-spin-button,
.shop-order-admin__lines-table input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.shop-order-admin__lines-table .shop-field__control:focus {
  outline: 2px solid #217346;
  outline-offset: -2px;
  background: #fff;
}

.shop-order-admin__discount-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  gap: 0;
  min-width: 0;
}

.shop-order-admin__discount-wrap .shop-field__control {
  min-width: 0;
}

.shop-order-admin__discount-wrap input.shop-field__control {
  border-right: 1px solid #d0d0d0;
}

.shop-order-admin__line-sum {
  display: block;
  padding-top: 0;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.shop-order-admin__totals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.shop-order-admin__totals div {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--shop-border);
  border-radius: 8px;
  background: #fff;
}

.shop-order-admin__totals span {
  font-size: 12px;
  color: var(--shop-muted);
}

.shop-order-admin__totals strong {
  font-size: 16px;
}

.shop-order-admin__remove {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.shop-order-admin__col-remove {
  width: 28px;
  text-align: center;
}

.shop-order-admin__remove-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #666;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
}

.shop-order-admin__remove-btn:hover {
  background: #fce4ec;
  color: #c62828;
}

.shop-order-admin__add-lines {
  display: grid;
  gap: 8px;
}

.shop-order-admin__add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: end;
}

.shop-order-admin__add-row--search {
  align-items: stretch;
}

.shop-order-admin__search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.shop-order-admin__add-plus,
.shop-order-admin__add-plus-btn {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 20px;
  font-weight: 700;
  line-height: 30px;
  text-align: center;
  padding: 0;
  cursor: pointer;
}

.shop-order-admin__add-plus-btn:hover {
  background: #dbeafe;
  border-color: #93c5fd;
}

.shop-order-admin__add-query,
.shop-order-admin__add-qty {
  min-width: 0;
}

.shop-order-admin__add-query {
  flex: 1 1 auto;
}

.shop-order-admin__add-input {
  min-width: 0;
}

.shop-order-admin__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.shop-order-admin__search-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 40px;
  right: 0;
  z-index: 30;
  display: grid;
  gap: 4px;
  max-height: 280px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--shop-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
}

.shop-order-admin__search-list[hidden],
.shop-order-admin__search-list:empty {
  display: none !important;
}

.shop-order-admin__search-item {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.shop-order-admin__search-item:hover,
.shop-order-admin__search-item:focus-visible,
.shop-order-admin__search-item.is-active {
  background: #f8fafc;
  outline: none;
}

.shop-order-admin__search-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--shop-text);
}

.shop-order-admin__search-meta {
  font-size: 12px;
  color: var(--shop-muted);
}

.shop-order-admin__add-qty .shop-field__label {
  font-size: 12px;
}

.shop-order-admin__actions .shop-btn {
  min-height: 44px;
}

@media (max-width: 768px) {
  .shop-order-admin {
    padding: 10px 12px;
    border-radius: 12px;
    overflow: visible;
  }

  .shop-order-admin__grid {
    grid-template-columns: 1fr;
  }

  .shop-order-admin__cp-find,
  .shop-order-admin__cp-create:not([hidden]) {
    grid-template-columns: 1fr;
  }

  .shop-order-admin__cp-create:not([hidden]) .shop-btn {
    width: 100%;
  }

  .shop-order-admin__lines {
    padding: 0;
  }

  .shop-order-admin__subtitle {
    padding: 0 2px;
  }

  .shop-order-admin__add-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .shop-order-admin__totals {
    grid-template-columns: 1fr;
  }

  .shop-order-admin__search-wrap {
    flex-wrap: wrap;
  }

  .shop-order-admin__search-list {
    left: 0;
    right: 0;
    z-index: 40;
    max-height: min(40vh, 280px);
  }

  .shop-order-card__actions {
    flex-direction: column;
  }

  .shop-order-card__actions .shop-btn {
    width: 100%;
    justify-content: center;
  }

  /* Keep embedded invoice readable; do not strip horizontal inset around admin lines. */
  .shop-invoice--embedded {
    padding-left: 0;
    padding-right: 0;
    overflow: visible;
  }

  .shop-invoice--embedded .shop-order-admin {
    margin-left: 0;
    margin-right: 0;
  }

  .shop-invoice--embedded .shop-invoice__table-wrap {
    margin: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 380px) {
  .shop-order-card__meta {
    font-size: 12px;
  }
}

.shop-order-detail__subtitle {
  margin: 0 0 12px;
  font-size: 18px;
}

.shop-order-detail__hint {
  margin-top: 16px;
}

/* ——— Tablet ——— */
@media (max-width: 1024px) {
  .shop-header {
    padding: 0 1.25rem;
  }

  .shop-hero,
  .shop-home-categories,
  .shop-home-featured,
  .shop-catalog,
  .shop-product,
  .shop-account,
  .shop-checkout {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .shop-account {
    padding-top: 12px;
  }

  .shop-home-promo {
    margin-left: 1.25rem;
    margin-right: 1.25rem;
  }

  .shop-order-detail__meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ——— Mobile ——— */
@media (max-width: 768px) {
  .shop-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "left brand right"
      "search search search";
    align-items: center;
    gap: 8px 10px;
    height: auto;
    min-height: var(--shop-header-h);
    max-height: none;
    padding: 8px 12px 10px;
  }

  .shop-header__left {
    display: contents;
  }

  .shop-header__menu-btn {
    grid-area: left;
    justify-self: start;
  }

  .shop-header__brand {
    grid-area: brand;
    justify-self: center;
  }

  .shop-header__brand-logo {
    height: 26px;
    max-width: min(52vw, 180px);
  }

  .shop-header__right {
    grid-area: right;
    gap: 4px;
  }

  .shop-header__search {
    grid-area: search;
    display: flex !important;
    width: 100%;
    max-width: none;
    margin: 0;
  }

  .shop-search-form__input {
    padding: 11px 14px 11px 40px;
    font-size: 16px;
  }

  .shop-search-suggest {
    max-height: min(280px, 45vh);
  }

  .shop-search-suggest__price {
    display: none;
  }

  .shop-lang--stub,
  .shop-header__icon-btn[data-shop-filters],
  .shop-header__user,
  .shop-header__account,
  .shop-header__login {
    display: none !important;
  }

  .shop-currency__trigger {
    padding: 6px;
    min-width: 36px;
    min-height: 36px;
    justify-content: center;
  }

  .shop-currency__arrow {
    display: none;
  }

  .shop-header__menu-btn,
  .shop-header__icon-btn,
  .shop-header__cart-btn,
  .shop-header__admin-btn {
    min-width: 40px;
    min-height: 40px;
  }

  .shop-main {
    padding-bottom: calc(48px + env(safe-area-inset-bottom, 0px));
  }

  .shop-auth {
    padding: 24px 12px 40px;
  }

  .shop-auth__card {
    padding: 24px 18px;
  }

  .shop-hero {
    padding: 28px 1rem 36px;
  }

  .shop-hero__title {
    font-size: clamp(24px, 7vw, 32px);
  }

  .shop-hero__lead {
    font-size: 15px;
  }

  .shop-hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .shop-hero__actions .shop-btn {
    width: 100%;
  }

  .shop-home-categories,
  .shop-home-featured,
  .shop-catalog {
    padding: 20px 12px 32px;
  }

  .shop-home-promo {
    margin: 0 12px 24px;
    padding: 24px 20px;
  }

  .shop-home-featured__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .shop-catalog__types {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
    margin: 0 -12px 16px;
    padding: 0 12px 6px;
    scrollbar-width: none;
  }

  .shop-catalog__types::-webkit-scrollbar {
    display: none;
  }

  .shop-type-tab {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 13px;
    padding: 8px 14px;
  }

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

  .shop-card__image-wrap {
    height: 130px;
    margin-bottom: 6px;
  }

  .shop-card__info {
    padding: 8px 8px 10px;
    gap: 6px;
  }

  .shop-card__name {
    font-size: 12px;
    min-height: 2.4em;
    -webkit-line-clamp: 3;
  }

  .shop-card__meta-line,
  .shop-card__desc,
  .shop-card__chars {
    display: none;
  }

  .shop-card__price {
    font-size: 14px;
  }

  .shop-card__cart-btn {
    font-size: 12px;
    padding: 10px 8px;
    min-height: 40px;
  }

  .shop-card__stepper {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    gap: 4px;
  }

  .shop-card__stepper-btn,
  .shop-card__stepper-input {
    min-height: 40px;
  }

  .shop-card__stepper-input {
    font-size: 16px;
  }

  .shop-card__qty-preset {
    min-height: 34px;
    font-size: 11px;
    padding: 5px 1px;
  }

  .shop-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .shop-category-card {
    min-height: 110px;
    padding: 16px 12px;
  }

  .shop-category-card__icon {
    font-size: 28px;
  }

  .shop-category-card__title {
    font-size: 13px;
  }

  .shop-cart-panel,
  .shop-drawer {
    width: 100vw;
    max-width: 100vw;
  }

  .shop-cart-panel {
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .shop-account {
    padding: 8px 16px 40px;
  }

  .shop-checkout {
    padding: 20px 16px 40px;
  }

  .shop-checkout__form,
  .shop-checkout__summary {
    padding: 22px 18px;
  }

  .shop-checkout__intro {
    margin-bottom: 22px;
  }

  .shop-checkout__layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .shop-account__actions {
    flex-direction: column;
  }

  .shop-account__actions .shop-btn {
    width: 100%;
  }

  .shop-account-export__actions {
    flex-direction: column;
  }

  .shop-account-export__btn {
    width: 100%;
    justify-content: center;
  }

  .shop-orders-table {
    min-width: 520px;
  }

  .shop-orders-table--admin {
    min-width: 980px;
  }

  .shop-orders-table-wrap {
    margin: 0 -4px;
    -webkit-overflow-scrolling: touch;
  }

  .shop-orders-table-wrap--desktop {
    display: none;
  }

  .shop-order-cards {
    display: block;
  }

  .shop-invoice__meta > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .shop-invoice-lines {
    font-size: 11px;
  }

  .shop-invoice-lines th,
  .shop-invoice-lines td {
    padding: 6px 3px;
  }

  .shop-invoice-lines th {
    font-size: 9px;
  }

  .shop-invoice-lines__col-no {
    width: 22px;
  }

  .shop-invoice-lines__col-photo {
    width: 36px;
  }

  .shop-invoice-lines__col-price {
    width: 78px;
  }

  .shop-invoice-lines__col-qty {
    width: 34px;
  }

  .shop-invoice-lines__col-sum {
    width: 78px;
  }

  .shop-invoice-lines__th-name {
    font-size: 8px;
  }

  .shop-invoice-lines__sku {
    font-size: 9px;
  }

  .shop-invoice-photo {
    width: 32px;
    height: 32px;
    border-radius: 6px;
  }

  .shop-invoice__actions .shop-btn {
    width: 100%;
    justify-content: center;
  }

  .shop-order-detail__meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shop-pager {
    flex-wrap: wrap;
    gap: 10px;
  }

  .shop-footer {
    padding: 24px 12px calc(32px + env(safe-area-inset-bottom, 0px));
    font-size: 13px;
  }

  .shop-product {
    padding: 16px 12px 32px;
  }

  .shop-product__layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .shop-product__image--placeholder {
    min-height: 240px;
  }

  .shop-product__cart-btn {
    max-width: none;
    width: 100%;
  }

  .shop-field__control {
    font-size: 16px;
  }
}

/* ——— Small phones ——— */
@media (max-width: 380px) {
  .shop-header__brand-logo {
    height: 22px;
    max-width: min(58vw, 160px);
  }

  .shop-grid {
    gap: 8px;
  }

  .shop-card__badges {
    max-width: 90%;
  }

  .shop-card__badge {
    font-size: 9px;
  }

  .shop-card__badge--new.shop-card__badge--top {
    top: 6px;
    left: 6px;
    padding: 2px 6px;
    font-size: 9px;
  }

  .shop-card__line-total-value {
    font-size: 12px;
  }

  .shop-card__qty-preset {
    font-size: 10px;
    min-height: 30px;
    padding: 4px 0;
  }
}

@media (max-width: 640px) {
  .shop-order-detail__meta {
    grid-template-columns: 1fr;
  }

  .shop-order-detail__meta-item--wide {
    grid-column: span 1;
  }
}

/* ——— Desktop checkout (PC, не трогаем mobile ≤768) ——— */
@media (min-width: 769px) {
  .shop-main:has(.shop-checkout) {
    background: #eef2f6;
  }

  .shop-checkout {
    max-width: 1080px;
    padding: 40px 3.5rem 72px;
    font-family: var(--shop-font);
    line-height: 1.45;
    text-rendering: optimizeLegibility;
    -moz-osx-font-smoothing: grayscale;
  }

  .shop-checkout input,
  .shop-checkout textarea,
  .shop-checkout button {
    font-family: inherit;
  }

  .shop-checkout__intro {
    margin-bottom: 32px;
  }

  .shop-checkout__intro .shop-section-title {
    margin-bottom: 12px;
  }

  .shop-checkout__intro .shop-muted {
    max-width: 46rem;
    line-height: 1.5;
  }

  .shop-checkout__layout {
    grid-template-columns: 1.2fr 0.8fr;
    gap: 32px;
  }

  .shop-checkout__form,
  .shop-checkout__summary {
    padding: 32px 28px;
    border-color: #d4dbe5;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  }

  .shop-checkout .shop-field {
    gap: 10px;
    margin-bottom: 22px;
  }

  .shop-checkout .shop-field:last-of-type {
    margin-bottom: 28px;
  }

  .shop-checkout .shop-field__label {
    color: var(--shop-muted);
    letter-spacing: 0.01em;
    line-height: 1.35;
  }

  .shop-checkout .shop-field__control {
    padding: 12px 14px;
    line-height: 1.45;
    border-color: #d4dbe5;
    border-radius: 6px;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
  }

  .shop-checkout .shop-field__control:focus {
    outline: 2px solid rgba(26, 79, 139, 0.32);
    outline-offset: 0;
    border-color: var(--shop-primary);
  }

  .shop-checkout .shop-field__control--area {
    min-height: 112px;
  }

  .shop-checkout .shop-field__hint {
    margin-top: 8px;
    line-height: 1.4;
  }

  .shop-checkout .shop-alert {
    margin-bottom: 22px;
  }

  .shop-checkout #shop-checkout-submit {
    margin-top: 6px;
  }

  .shop-checkout__summary-title {
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid #d4dbe5;
  }

  .shop-checkout__items {
    gap: 14px;
    margin-bottom: 22px;
    padding-bottom: 20px;
    border-bottom: 1px solid #d4dbe5;
  }

  .shop-checkout__line {
    gap: 20px;
    padding: 4px 0;
    line-height: 1.45;
  }

  .shop-checkout__total {
    margin-bottom: 18px;
    padding-top: 6px;
    line-height: 1.4;
  }

  .shop-checkout__summary .shop-link {
    margin-top: 6px;
  }
}
