.pm-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: #f5f5f5;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.pm-top-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 12px 14px 10px;
}

.pm-header-main {
  display: grid;
  grid-template-columns: 72px 1fr 80px 56px;
  gap: 12px;
  align-items: center;
}

.pm-header-client {
  width: 72px;
  height: 72px;
  border: 0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  padding: 6px;
  overflow: hidden;
}

.pm-header-client img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.pm-header-search {
  height: 56px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.pm-header-search input {
  border: 0;
  outline: 0;
  width: 100%;
  height: 100%;
  font-size: 17px;
  background: transparent;
  color: #0f172a;
}

.pm-header-search input::placeholder {
  color: #9ca3af;
}

.pm-header-search-icon {
  font-size: 26px;
  line-height: 1;
  color: #9ca3af;
}

.pm-header-mestto {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 56px;
}

.pm-mestto-header-logo {
  max-width: 64px;
  max-height: 44px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.pm-header-cart {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.pm-order-status-row {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 0 2px;
}

.pm-order-row-left {
  display: flex;
  align-items: center;
  min-width: 0;
}

.pm-order-row-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.pm-room-label {
  font-size: 15px;
  font-weight: 700;
  color: #475569;
  white-space: nowrap;
}

.pm-room-label strong {
  color: #0f172a;
}

.pm-order-status {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-height: 40px;
}

.pm-order-status.is-empty {
  display: none;
}

.pm-order-status.is-success {
  color: #0f172a;
}

.pm-order-status.is-error {
  padding: 0 12px;
  border-radius: 999px;
  background: #fff7f7;
  border: 1px solid rgba(185, 28, 28, 0.16);
  color: #991b1b;
}

.pm-order-label {
  font-size: 14px;
  font-weight: 800;
  color: #475569;
}

.pm-order-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #fff;
  color: #0f172a;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.pm-order-chip:hover {
  background: #f8fafc;
}

#pmCartMount {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.pm-cart-fab {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  cursor: pointer;
  padding: 0;
}

.pm-cart-fab-icon {
  font-size: 26px;
  line-height: 1;
}

.pm-cart-fab-label {
  display: none;
}

.pm-cart-fab-count {
  position: absolute;
  top: -5px;
  right: -4px;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #16a34a;
  color: #fff;
  font-weight: 900;
  font-size: 12px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border: 2px solid #f5f5f5;
}

.pm-cart-fab.has-items .pm-cart-fab-count {
  display: inline-flex;
}

.pm-add-btn {
  border: 1px solid rgba(22, 163, 74, 0.18);
  border-radius: 12px;
  background: rgba(22, 163, 74, 0.08);
  color: #166534;
  font-weight: 800;
  font-size: 12px;
  line-height: 1;
  padding: 8px 10px;
  cursor: pointer;
  white-space: nowrap;
}

.pm-add-btn:hover {
  background: rgba(22, 163, 74, 0.14);
}

.pm-add-btn.is-in-cart {
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, 0.15);
}

.pm-row,
.pm-fav-card {
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.pm-row:last-child,
.pm-fav-card:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.pm-row-name,
.pm-fav-name {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.15;
}

.pm-row-desc,
.pm-fav-desc {
  font-size: 8px;
  line-height: 1;
}

.pm-price {
  font-size: 9px;
  font-weight: 700;
}

.pm-cat-text {
  font-size: 13px;
  font-weight: 700;
}

.pm-cart-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
}

.pm-cart-modal.hidden {
  display: none !important;
}

.pm-cart-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(3px);
}

.pm-cart-sheet {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(720px, calc(100% - 16px));
  max-height: 82vh;
  background: #fff;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -18px 45px rgba(15, 23, 42, 0.18);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pm-cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.pm-cart-title {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.pm-cart-close {
  border: 0;
  background: rgba(15, 23, 42, 0.06);
  width: 38px;
  height: 38px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 17px;
}

.pm-cart-body {
  padding: 10px 16px 14px;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.pm-cart-empty {
  color: #6b7280;
  text-align: center;
  padding: 24px 12px;
  font-size: 15px;
}

.pm-cart-list {
  display: grid;
  gap: 10px;
}

.pm-cart-item {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.98);
}

.pm-cart-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.pm-cart-item-name {
  font-weight: 800;
  font-size: 15px;
  line-height: 1.2;
}

.pm-cart-item-price {
  font-weight: 900;
  color: #1e3a8a;
  white-space: nowrap;
  font-size: 14px;
}

.pm-cart-item-sub {
  margin-top: 4px;
  font-size: 12px;
  color: #6b7280;
}

.pm-cart-item-actions {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pm-qty {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pm-qty-btn {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.08);
  cursor: pointer;
  font-weight: 900;
  font-size: 16px;
}

.pm-qty-value {
  min-width: 22px;
  text-align: center;
  font-weight: 900;
  font-size: 14px;
}

.pm-link-danger {
  border: 0;
  background: transparent;
  color: #dc2626;
  font-weight: 700;
  cursor: pointer;
  font-size: 13px;
}

.pm-cart-foot {
  padding: 12px 16px 14px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
  display: grid;
  gap: 10px;
}

.pm-cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 15px;
}

.pm-cart-total strong {
  font-size: 18px;
}

.pm-cart-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.pm-cart-btn {
  border: 0;
  border-radius: 14px;
  padding: 12px 12px;
  cursor: pointer;
  font-weight: 800;
  font-size: 13px;
}

.pm-cart-btn-secondary {
  background: rgba(15, 23, 42, 0.08);
  color: #0f172a;
}

.pm-cart-btn-danger {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.pm-cart-btn-primary {
  background: #16a34a;
  color: #fff;
}

.pm-sheet-actions {
  display: flex;
  gap: 8px;
}

.pm-sheet-actions .pm-btn {
  flex: 1 1 auto;
}

.pm-btn-add {
  background: #16a34a;
  color: #fff;
  font-weight: 900;
  border: 0;
  box-shadow: 0 10px 22px rgba(22, 163, 74, 0.18);
}

.pm-room-service-chip {
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #fff;
  color: #0f172a;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.pm-room-service-chip:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.pm-room-service-sheet {
  top: 50%;
  bottom: auto;
  transform: translate(-50%, -50%);
  width: min(560px, calc(100% - 20px));
  max-height: 90vh;
  border-radius: 22px;
}

.pm-room-service-help {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 14px;
}

.pm-room-service-options {
  display: grid;
  gap: 10px;
}

.pm-room-service-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: #fff;
}

.pm-room-service-option input {
  width: 18px;
  height: 18px;
  accent-color: #16a34a;
}

.pm-room-service-option span {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.pm-room-service-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.pm-room-service-actions .pm-cart-btn {
  width: 100%;
  min-height: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  padding: 0 16px;
}

.pm-global-loader {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(245, 245, 245, 0.92);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.pm-global-loader.hidden {
  display: none !important;
}

.pm-global-loader-card {
  min-width: 220px;
  max-width: 320px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  padding: 20px 18px;
  display: grid;
  justify-items: center;
  gap: 12px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

.pm-global-loader-spinner {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 3px solid rgba(15, 23, 42, 0.12);
  border-top-color: #16a34a;
  animation: pmSpin 0.8s linear infinite;
}

.pm-global-loader-text {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  text-align: center;
}

@keyframes pmSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 720px) {
  .pm-header-main {
    grid-template-columns: 64px 1fr 68px 52px;
    gap: 10px;
  }

  .pm-header-client {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    padding: 5px;
  }

  .pm-header-search {
    height: 52px;
  }

  .pm-header-search input {
    font-size: 16px;
  }

  .pm-mestto-header-logo {
    max-width: 56px;
    max-height: 40px;
  }
}

@media (max-width: 560px) {
  .pm-top-inner {
    padding: 10px 10px 8px;
  }

  .pm-header-main {
    grid-template-columns: 56px 1fr 60px 48px;
    gap: 8px;
  }

  .pm-header-client {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    padding: 4px;
  }

  .pm-header-search {
    height: 48px;
    padding: 0 12px;
  }

  .pm-header-search-icon {
    font-size: 22px;
  }

  .pm-header-search input {
    font-size: 15px;
  }

  .pm-mestto-header-logo {
    max-width: 48px;
    max-height: 34px;
  }

  .pm-cart-fab {
    width: 48px;
    height: 48px;
  }

  .pm-room-label {
    font-size: 14px;
  }

  .pm-order-chip {
    height: 32px;
    padding: 0 12px;
    font-size: 14px;
  }
}

@media (max-width: 520px) {
  .pm-cart-actions {
    grid-template-columns: 1fr 1fr;
  }

  .pm-cart-actions .pm-cart-btn-primary {
    grid-column: 1 / -1;
  }
}

.pm-room-service-actions .pm-cart-btn-primary,
.pm-room-service-actions .pm-cart-btn-secondary {
  grid-column: auto !important;
}