.shop-page {
  display: grid;
  gap: 16px;
}

.shop-toolbar-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 16px;
}

.shop-page .news-search-panel {
  margin-bottom: 0;
}

.shop-page .shop-search-form {
  min-width: 0;
}

.shop-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.shop-page .ghost-button,
.shop-page .compact-button,
.shop-cart-panel .ghost-button,
.shop-cart-panel .compact-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid rgba(24, 32, 28, 0.16);
  border-radius: 12px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.shop-page .ghost-button:hover,
.shop-page .compact-button:hover,
.shop-cart-panel .ghost-button:hover,
.shop-cart-panel .compact-button:hover {
  border-color: rgba(var(--brand-r), 0.34);
  box-shadow: 0 10px 22px rgba(31, 23, 16, 0.1);
  transform: translateY(-1px);
}

.shop-page .primary-button.compact-button,
.shop-cart-panel .primary-button.compact-button {
  border: 0;
  color: #fff8ef;
  background: linear-gradient(135deg, var(--brand-deep), var(--accent) 64%, var(--brand-soft));
}

.shop-balance-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

#shop_cart_chip {
  display: contents;
}

.shop-balance-chip {
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 0.86rem;
  white-space: nowrap;
}

.shop-balance-chip .nordcoin-badge {
  flex: 0 0 auto;
}

.shop-cart-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid rgba(var(--brand-r), 0.2);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.shop-cart-chip svg,
.shop-cart-fab svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.shop-cart-chip strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(var(--brand-r), 0.12);
  color: var(--brand-deep);
  font-size: 0.78rem;
}

.shop-cart-fab {
  display: none;
}

.shop-cart-panel,
.shop-recent-orders-panel {
  padding: 18px 20px;
}

.shop-checkout-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.shop-checkout-actions .button_to {
  margin: 0;
}

.shop-page .settings-field {
  min-width: 0;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid rgba(24, 32, 28, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.shop-page .settings-field:focus {
  outline: none;
  border-color: rgba(var(--brand-r), 0.48);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 0 0 4px rgba(var(--brand-r), 0.11);
}

.shop-quantity-field {
  width: 82px;
}

.shop-product-price {
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 12px;
  font-size: 0.82rem;
  white-space: nowrap;
}

.shop-product-price .nordcoin-badge {
  flex: 0 0 auto;
}

.shop-product-card {
  align-content: start;
}

.shop-product-media {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 180px;
  overflow: hidden;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.9), rgba(235, 217, 187, 0.36)),
    rgba(24, 32, 28, 0.04);
}

.shop-product-image {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: contain;
  padding: 12px;
}

.shop-product-image-placeholder {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.shop-page .profile-document-card {
  overflow: hidden;
}

.shop-page .profile-document-head > div:first-child {
  min-width: 0;
}

.shop-page .profile-document-actions .inline-form {
  justify-content: flex-start;
}

.shop-page .shop-add-button {
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 12px;
}

.shop-page .shop-add-inline-button {
  min-width: 132px;
}

.shop-quantity-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.shop-quantity-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid rgba(24, 32, 28, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.84);
  font-size: 0.92rem;
  font-weight: 900;
}

.shop-page .shop-quantity-button {
  min-width: 40px;
  padding: 0;
  font-size: 1.15rem;
  line-height: 1;
}

.shop-cart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.shop-cart-head .assignment-summary-chips {
  justify-content: flex-end;
}

.shop-cart-list {
  gap: 12px;
}

.shop-cart-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 1rem;
  padding-top: 16px;
  border-top: 1px solid rgba(24, 32, 28, 0.08);
}

.shop-cart-total {
  display: grid;
  gap: 6px;
  min-width: 180px;
}

.shop-cart-total > span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
}

.shop-cart-total strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.2;
}

.shop-cart-total .nordcoin-badge {
  flex: 0 0 auto;
}

.shop-cart-row {
  align-items: center;
  gap: 16px;
}

.shop-cart-product {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.shop-cart-product-media {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  overflow: hidden;
  flex: 0 0 72px;
  border-radius: 14px;
  background: rgba(24, 32, 28, 0.05);
}

.shop-cart-product-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
}

.shop-cart-row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.shop-cart-row-actions .button_to {
  margin: 0;
}

.shop-cart-row-actions form {
  display: inline-flex;
}

.shop-add-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.shop-page .shop-add-button:disabled {
  border: 1px solid rgba(24, 32, 28, 0.14);
  background: rgba(255, 255, 255, 0.68);
  color: var(--muted);
  cursor: not-allowed;
  box-shadow: none;
}

.shop-order-receipt {
  display: grid;
  gap: 18px;
  padding: 22px 24px;
}

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

.shop-order-receipt-main--status-only {
  grid-template-columns: minmax(0, 1fr);
}

/* Длинные подписи статуса — без «плакатного» размера, как у короткого кода выдачи */
.shop-order-receipt-main--status-only h2 {
  font-size: clamp(1.1rem, 2.4vw, 1.4rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.35;
}

.shop-order-receipt-main h2 {
  margin: 6px 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: 0.08em;
}

.shop-order-receipt-main p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
}

.shop-order-qr {
  width: 180px;
  height: 180px;
  padding: 10px;
  border: 1px solid rgba(24, 32, 28, 0.12);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.shop-order-code {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(24, 32, 28, 0.1);
}

.shop-order-code span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.shop-order-code strong {
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

.shop-manager-page {
  display: grid;
  gap: 18px;
}

.shop-manager-page .page-heading h1 {
  margin-top: 6px;
}

.shop-manager-section {
  padding: 22px 24px;
}

.shop-manager-section + .shop-manager-section {
  margin-top: 0;
}

.shop-manager-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.shop-manager-section-head h2 {
  margin-bottom: 0;
}

.shop-manager-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
}

.shop-manager-form-grid label {
  display: grid;
  grid-template-rows: 24px 48px;
  gap: 7px;
  min-width: 0;
  color: var(--muted-strong);
  font-size: 0.82rem;
  font-weight: 800;
}

.shop-manager-form-grid label > span {
  display: flex;
  align-items: center;
  min-height: 24px;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.shop-manager-field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.shop-manager-nordcoin-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand-deep);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: none;
  white-space: nowrap;
}

.shop-manager-nordcoin-meta .nordcoin-badge {
  flex: 0 0 auto;
}

.shop-manager-form-grid .shop-manager-wide {
  grid-column: 1 / -1;
}

.shop-manager-form-grid label.shop-manager-wide {
  grid-template-rows: 24px auto;
}

.shop-manager-check-field {
  display: flex !important;
  align-items: center;
  justify-content: start;
  gap: 10px !important;
  min-height: 48px;
  padding-top: 2px;
}

.shop-manager-check-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand-deep);
}

.shop-manager-product-footer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  width: 100%;
  margin-top: 2px;
  padding-top: 12px;
  border-top: 1px solid rgba(24, 32, 28, 0.07);
}

.shop-manager-check-field-footer {
  min-height: auto;
  padding-top: 0;
  margin-bottom: 0;
}

.shop-manager-product-footer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.shop-manager-product-footer-actions a.compact-button {
  text-decoration: none;
  text-align: center;
}

.shop-manager-page .settings-field {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 48px;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid rgba(24, 32, 28, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.shop-manager-page textarea.settings-field {
  height: auto;
  min-height: 86px;
  resize: vertical;
}

.shop-manager-page .settings-field:focus {
  outline: none;
  border-color: rgba(var(--brand-r), 0.48);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 0 0 4px rgba(var(--brand-r), 0.11);
}

.shop-manager-file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.shop-manager-file-input::file-selector-button {
  display: none;
}

.shop-manager-file-field {
  grid-template-rows: 24px auto !important;
}

.shop-manager-image-block {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}

.shop-manager-image-block .shop-manager-file-field {
  flex: 1 1 220px;
  min-width: 0;
}

.shop-manager-preview-card {
  box-sizing: border-box;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 128px;
  min-height: 128px;
  padding: 8px;
  overflow: hidden;
  border: 1px dashed rgba(24, 32, 28, 0.16);
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(255, 253, 248, 0.55), rgba(235, 217, 187, 0.12)),
    rgba(255, 255, 255, 0.42);
}

.shop-manager-preview-media {
  position: relative;
  width: 112px;
  height: 112px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: inset 0 0 0 1px rgba(24, 32, 28, 0.06);
}

.shop-manager-preview-media img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 6px;
  box-sizing: border-box;
}

.shop-manager-preview-placeholder {
  margin: 0;
  padding: 0 4px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

.shop-manager-file-picker {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 48px;
  padding: 7px;
  border: 1px solid rgba(24, 32, 28, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  overflow: hidden;
}

.shop-manager-file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 0;
  border-radius: 10px;
  padding: 9px 12px;
  background: linear-gradient(135deg, rgba(255, 253, 248, 0.96), rgba(235, 217, 187, 0.72));
  color: var(--ink);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
}

.shop-manager-file-name {
  min-width: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-manager-page .news-search-form > .settings-field {
  flex: 0 0 140px;
  width: auto;
}

.shop-manager-page .compact-button,
.shop-manager-page .ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 12px;
  padding: 8px 16px;
  border: 1px solid rgba(24, 32, 28, 0.16);
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.shop-manager-page .compact-button:hover,
.shop-manager-page .ghost-button:hover {
  border-color: rgba(var(--brand-r), 0.34);
  box-shadow: 0 10px 22px rgba(31, 23, 16, 0.1);
  transform: translateY(-1px);
}

.shop-manager-page .primary-button.compact-button {
  border: 0;
  color: #fff8ef;
  background: linear-gradient(135deg, var(--brand-deep), var(--accent) 64%, var(--brand-soft));
}

.shop-manager-page .secondary-button.compact-button {
  border-color: rgba(var(--brand-r), 0.28);
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.94), rgba(235, 217, 187, 0.62)),
    var(--panel-strong);
}

.shop-manager-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.shop-manager-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.shop-manager-product-card {
  overflow: hidden;
  padding: 0;
  border-radius: 16px;
  border: 1px solid rgba(24, 32, 28, 0.06);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.shop-manager-product-card[open] {
  border-color: rgba(var(--brand-r), 0.22);
  box-shadow: 0 14px 34px rgba(31, 23, 16, 0.09);
}

.shop-manager-product-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 11px 14px;
  cursor: pointer;
  list-style: none;
}

.shop-manager-product-summary::-webkit-details-marker {
  display: none;
}

.shop-manager-product-summary-main {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  min-width: 0;
  flex: 1 1 200px;
}

.shop-manager-product-summary-media {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(24, 32, 28, 0.06);
  box-shadow: inset 0 0 0 1px rgba(24, 32, 28, 0.06);
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 800;
  text-align: center;
  line-height: 1.15;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
}

.shop-manager-product-thumb {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.shop-manager-product-summary-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.shop-manager-product-summary-copy strong {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 0.94rem;
  line-height: 1.28;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.shop-manager-product-summary-copy p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
}

.shop-manager-product-summary-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
}

.shop-manager-inline-chip,
.shop-manager-summary-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 800;
  white-space: nowrap;
  border: 1px solid rgba(24, 32, 28, 0.06);
}

.shop-manager-inline-chip .nordcoin-badge {
  flex: 0 0 auto;
}

.shop-manager-inline-chip.is-active {
  color: #14532d;
  background: rgba(187, 247, 208, 0.58);
}

.shop-manager-inline-chip.is-inactive {
  color: #7f1d1d;
  background: rgba(254, 202, 202, 0.58);
}

.shop-manager-summary-toggle {
  color: var(--brand-deep);
  background: rgba(235, 217, 187, 0.44);
}

.shop-manager-product-body {
  padding: 0 14px 14px;
  border-top: 1px solid rgba(24, 32, 28, 0.07);
}

.shop-manager-product-form,
.shop-manager-product-meta {
  width: 100%;
}

.shop-manager-stock-adjust-panel {
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(138, 90, 43, 0.28);
  border-left: 4px solid var(--brand-deep, #8a5a2b);
  background: linear-gradient(135deg, rgba(235, 217, 187, 0.45) 0%, rgba(255, 252, 246, 0.96) 55%);
  box-shadow: 0 4px 18px rgba(24, 32, 28, 0.08);
}

.shop-manager-stock-adjust-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.shop-manager-stock-adjust-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--brand-deep, #5c3d1e);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(138, 90, 43, 0.2);
}

.shop-manager-stock-adjust-title {
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: rgba(24, 32, 28, 0.92);
}

.shop-manager-stock-adjust-hint {
  margin: 0 0 12px;
  font-size: 0.88rem;
  line-height: 1.4;
  color: rgba(24, 32, 28, 0.62);
}

.shop-manager-stock-adjust-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.shop-manager-stock-adjust-delta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 200px;
}

.shop-manager-stock-adjust-delta > span,
.shop-manager-stock-adjust-reason > span {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(24, 32, 28, 0.55);
}

.shop-manager-stock-adjust-reason-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 12px;
}

.shop-manager-stock-adjust-reason {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 220px;
  min-width: min(100%, 200px);
}

.shop-manager-stock-adjust-submit {
  flex: 0 0 auto;
  white-space: nowrap;
  margin-bottom: 0;
}

@media (max-width: 520px) {
  .shop-manager-stock-adjust-reason-row {
    flex-direction: column;
    align-items: stretch;
  }

  .shop-manager-stock-adjust-submit {
    width: 100%;
  }
}

.shop-manager-order-items {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.shop-manager-order-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.shop-manager-order-item-image {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 10px;
  object-fit: cover;
  background: rgba(24, 32, 28, 0.06);
}

.shop-manager-order-item strong,
.shop-manager-order-item p {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.shop-manager-page .profile-document-library-meta p {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.shop-manager-modal[hidden] {
  display: none;
}

.shop-manager-modal {
  position: fixed;
  inset: 0;
  z-index: 9300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.shop-manager-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(17, 22, 18, 0.48);
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.shop-manager-modal-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
  width: min(860px, 100%);
  max-height: min(88vh, 820px);
  overflow: auto;
  padding: 24px;
  border: 1px solid rgba(24, 32, 28, 0.1);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 239, 227, 0.9)),
    var(--panel-strong);
  box-shadow: 0 32px 90px rgba(46, 33, 15, 0.2);
}

.shop-manager-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.shop-manager-modal-title {
  margin: 6px 0 0;
  font-size: clamp(1.45rem, 2vw, 1.9rem);
  line-height: 1.08;
}

.shop-manager-modal-close {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 1px solid rgba(24, 32, 28, 0.1);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
}

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

@media (max-width: 1080px) {
  .shop-manager-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .shop-toolbar-panel {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    padding: 14px;
  }

  .shop-page .shop-search-form,
  .shop-toolbar-actions,
  .shop-balance-strip,
  .shop-page .profile-document-head,
  .shop-page .profile-document-actions .inline-form,
  .shop-cart-panel .profile-document-actions,
  .shop-cart-panel .profile-document-library-row,
  .shop-recent-orders-panel .profile-document-library-row {
    align-items: stretch;
    flex-direction: column;
  }

  .shop-toolbar-actions > *,
  .shop-page .news-search-field,
  .shop-page .ghost-button,
  .shop-page .compact-button,
  .shop-cart-panel .ghost-button,
  .shop-cart-panel .compact-button,
  .shop-page .button_to,
  .shop-cart-panel .button_to,
  .shop-page .button_to > *,
  .shop-cart-panel .button_to > *,
  .shop-quantity-field {
    width: 100%;
  }

  .shop-quantity-control {
    width: 100%;
  }

  .shop-quantity-value,
  .shop-page .shop-quantity-button {
    flex: 1 1 0;
  }

  .shop-balance-strip {
    justify-content: flex-start;
  }

  .shop-balance-chip,
  .shop-balance-strip .status-pill,
  .shop-cart-chip {
    justify-content: center;
    width: 100%;
    white-space: normal;
  }

  .shop-cart-fab {
    position: fixed;
    right: 18px;
    bottom: calc(92px + env(safe-area-inset-bottom));
    z-index: 50;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 58px;
    height: 50px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand-deep), var(--accent));
    color: #fff8ef;
    font-weight: 900;
    text-decoration: none;
    box-shadow: 0 14px 32px rgba(46, 33, 15, 0.24);
  }

  .shop-cart-fab span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    font-size: 0.78rem;
  }

  .shop-cart-panel,
  .shop-recent-orders-panel {
    padding: 16px;
  }

  .shop-cart-product,
  .shop-cart-row-actions,
  .shop-cart-footer {
    width: 100%;
    justify-content: flex-start;
  }

  .shop-cart-head,
  .shop-cart-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .shop-cart-head .assignment-summary-chips {
    justify-content: flex-start;
  }

  .shop-product-card {
    gap: 10px;
    padding: 16px 18px;
  }

  .shop-product-media {
    min-height: 132px;
  }

  .shop-product-image {
    height: 132px;
  }

  .shop-product-card .profile-document-head {
    align-items: flex-start;
    flex-direction: row;
  }

  .shop-product-card .assignment-summary-chips {
    align-items: flex-end;
  }

  .shop-order-receipt {
    padding: 18px;
  }

  .shop-order-receipt-main {
    grid-template-columns: minmax(0, 1fr);
  }

  .shop-order-qr {
    width: min(100%, 220px);
    height: auto;
    justify-self: start;
  }

  .shop-manager-section-head,
  .shop-manager-page .news-search-form {
    align-items: stretch;
    flex-direction: column;
  }

  .shop-manager-page .news-search-form .compact-button,
  .shop-manager-page .news-search-form .settings-field {
    width: 100%;
  }

  .shop-manager-field-label {
    align-items: flex-start;
    flex-direction: column;
  }

  .shop-manager-section {
    padding: 18px;
  }

  .shop-manager-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .shop-manager-image-block {
    flex-direction: column;
    align-items: stretch;
  }

  .shop-manager-image-block .shop-manager-preview-card {
    align-self: flex-start;
  }

  .shop-manager-product-row,
  .shop-manager-page .profile-document-library-row {
    flex-direction: column;
    align-items: stretch;
  }

  .shop-manager-product-summary {
    align-items: flex-start;
  }

  .shop-manager-product-summary-chips {
    justify-content: flex-start;
    width: 100%;
  }

  .shop-manager-product-summary-copy p,
  .shop-manager-file-name {
    white-space: normal;
  }

  .shop-manager-file-picker {
    align-items: stretch;
    flex-direction: column;
  }

  .shop-manager-modal {
    align-items: stretch;
    padding: 12px;
  }

  .shop-manager-modal-dialog {
    max-height: calc(100vh - 24px);
    padding: 18px;
    border-radius: 20px;
  }
}
