:root {
  --pom-bg: #f2f4f6;
  --pom-panel: #ffffff;
  --pom-panel-soft: #eefaf4;
  --pom-text: #18231e;
  --pom-muted: #6c7b73;
  --pom-line: #d9eee4;
  --pom-green: #0f8f5f;
  --pom-green-dark: #087149;
  --pom-yellow: #fff1a8;
  --pom-price: #f3aa00;
  --pom-shadow: 0 10px 28px rgba(21, 88, 57, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--pom-bg);
  color: var(--pom-text);
  font-family: Arial, Helvetica, sans-serif;
}

button,
input {
  font: inherit;
}

.pom-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--pom-line);
  box-shadow: 0 4px 18px rgba(34, 86, 57, 0.07);
  backdrop-filter: blur(12px);
}

.pom-brand-wrap {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.pom-brand-logo {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: contain;
  background: #fff;
}

.pom-brand-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 46px;
}

.pom-company {
  max-width: 56vw;
  overflow: hidden;
  color: var(--pom-green-dark);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pom-header h1 {
  max-width: 56vw;
  margin: 3px 0 0;
  overflow: hidden;
  color: var(--pom-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pom-table {
  margin-top: 2px;
  color: var(--pom-muted);
  font-size: 12px;
}

.pom-cart-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  background: var(--pom-green);
  color: #fff;
  font-weight: 700;
}

.pom-cart-pill span:first-child {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.pom-shell {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 14px 12px 10px;
}

.pom-search-wrap {
  position: sticky;
  top: 78px;
  z-index: 15;
  padding: 6px 0 10px;
  background: var(--pom-bg);
}

.pom-search {
  width: 100%;
  min-height: 46px;
  padding: 0 15px;
  border: 1px solid var(--pom-line);
  border-radius: 8px;
  background: #fff;
  color: var(--pom-text);
  outline: none;
  box-shadow: 0 6px 18px rgba(21, 88, 57, 0.07);
}

.pom-search:focus {
  border-color: #84d5ad;
  box-shadow: 0 0 0 3px rgba(15, 143, 95, 0.12);
}

.pom-category-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 12px;
  scrollbar-width: thin;
}

.pom-category-list button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--pom-line);
  border-radius: 999px;
  background: #fff;
  color: var(--pom-text);
  font-weight: 700;
}

.pom-category-list button.active {
  border-color: #e6c900;
  background: var(--pom-yellow);
  color: #3c3200;
}

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

.pom-item-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 270px;
  overflow: hidden;
  border: 0;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(31, 42, 50, 0.08);
}

.pom-item-card.disabled {
  opacity: 0.76;
}

.pom-item-card.disabled .pom-item-img {
  filter: grayscale(70%);
}

.pom-item-image-wrap {
  width: 100%;
  padding: 0;
  background: #eef2f4;
}

.pom-item-img {
  width: 100%;
  height: 156px;
  display: block;
  object-fit: cover;
  background: var(--pom-panel-soft);
}

.pom-item-img-empty {
  background: linear-gradient(135deg, #edf4ef, #fff);
}

.pom-item-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px 10px;
}

.pom-item-body h2 {
  margin: 0;
  min-height: 36px;
  color: #071323;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.15;
}

.pom-item-meta {
  min-height: 17px;
  color: #53606a;
  font-size: 12px;
  line-height: 1.4;
}

.pom-item-desc {
  display: -webkit-box;
  min-height: 16px;
  overflow: hidden;
  color: #768179;
  font-size: 11px;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.pom-item-actions {
  margin-top: 2px;
}

.pom-item-buy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
}

.pom-item-rate {
  color: var(--pom-price);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.pom-stepper {
  display: inline-grid;
  grid-template-columns: 26px 22px 26px;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 36px;
  padding: 4px 7px;
  border-radius: 999px;
  background: #f2f5f7;
  color: #08111e;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.pom-stepper-btn {
  width: 25px;
  height: 25px;
  border: 0;
  border-radius: 50%;
  background: #070b12;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}

.pom-stepper-btn:disabled {
  opacity: 0.32;
}

.pom-unavailable {
  display: block;
  min-height: 30px;
  padding: 7px 8px;
  border-radius: 8px;
  background: #fff4d6;
  color: #805b00;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}

.pom-loading,
.pom-empty {
  grid-column: 1 / -1;
  padding: 28px 14px;
  border: 1px dashed var(--pom-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.65);
  color: var(--pom-muted);
  text-align: center;
}

.pom-cart-panel {
  width: min(100% - 24px, 1180px);
  margin: 10px auto 18px;
  padding: 12px;
  border: 1px solid var(--pom-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--pom-shadow);
}

.pom-cart-head,
.pom-cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pom-cart-title {
  font-size: 17px;
  font-weight: 800;
}

.pom-cart-sub {
  margin-top: 2px;
  color: var(--pom-muted);
  font-size: 13px;
}

.pom-clear {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--pom-line);
  border-radius: 6px;
  background: var(--pom-panel-soft);
  color: var(--pom-green-dark);
  font-weight: 800;
}

.pom-cart-list {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.pom-cart-empty {
  padding: 16px;
  border-radius: 8px;
  background: var(--pom-panel-soft);
  color: var(--pom-muted);
  text-align: center;
}

.pom-cart-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 8px;
  background: #f8fffb;
}

.pom-cart-name {
  font-weight: 800;
}

.pom-cart-rate {
  margin-top: 3px;
  color: var(--pom-muted);
  font-size: 12px;
}

.pom-cart-controls {
  display: inline-grid;
  grid-template-columns: 34px minmax(24px, auto) 34px;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.pom-cart-controls button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 6px;
  background: #e1f5eb;
  color: var(--pom-green-dark);
  font-size: 20px;
  font-weight: 800;
}

.pom-cart-total {
  padding-top: 12px;
  border-top: 1px solid var(--pom-line);
  font-size: 18px;
}

.pom-cart-total strong {
  color: var(--pom-green-dark);
}

.pom-place-order {
  width: 100%;
  min-height: 46px;
  margin-top: 12px;
  border: 0;
  border-radius: 8px;
  background: var(--pom-green);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
}

.pom-place-order:disabled {
  background: #c8d7d0;
  color: #718079;
}

.pom-toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 50;
  transform: translateX(-50%);
  min-width: 170px;
  padding: 11px 16px;
  border-radius: 999px;
  background: #16251d;
  color: #fff;
  text-align: center;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.pom-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 16px;
}

.pom-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 17, 25, 0.48);
}

.pom-modal-box {
  position: relative;
  z-index: 1;
  width: min(100%, 390px);
  padding: 16px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(7, 17, 25, 0.26);
}

.pom-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.pom-modal-title {
  color: #071323;
  font-size: 19px;
  font-weight: 900;
  line-height: 1.2;
}

.pom-modal-sub {
  margin-top: 3px;
  color: var(--pom-muted);
  font-size: 13px;
}

.pom-modal-close {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: #edf3f0;
  color: #28352f;
  font-size: 23px;
  line-height: 1;
}

.pom-field {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.pom-field span {
  color: #2c3933;
  font-size: 13px;
  font-weight: 800;
}

.pom-field input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--pom-line);
  border-radius: 9px;
  background: #fbfffd;
  color: var(--pom-text);
  outline: none;
}

.pom-field input:focus {
  border-color: #84d5ad;
  box-shadow: 0 0 0 3px rgba(15, 143, 95, 0.12);
}

.pom-date-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 8px;
}

.pom-date-icon {
  display: grid;
  place-items: center;
  min-height: 44px;
  border: 1px solid var(--pom-line);
  border-radius: 9px;
  background: var(--pom-panel-soft);
  color: var(--pom-green-dark);
  font-size: 19px;
  font-weight: 900;
}

.pom-modal-message {
  min-height: 20px;
  margin-top: 10px;
  color: var(--pom-muted);
  font-size: 13px;
  font-weight: 700;
}

.pom-modal-message.success {
  color: var(--pom-green-dark);
}

.pom-modal-message.error {
  color: #bf2d22;
}

.pom-modal-message.info {
  color: #5c6d65;
}

.pom-confirm-order {
  width: 100%;
  min-height: 46px;
  margin-top: 8px;
  border: 0;
  border-radius: 9px;
  background: var(--pom-green);
  color: #fff;
  font-size: 16px;
  font-weight: 900;
}

.pom-confirm-order:disabled {
  background: #c8d7d0;
  color: #718079;
}

.pom-success-box {
  overflow: hidden;
  text-align: center;
}

.pom-success-icon {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 10px auto 14px;
  border-radius: 50%;
  background: var(--pom-green);
  color: #fff;
  font-size: 34px;
  font-weight: 900;
  animation: pomSuccessPop 520ms ease-out both;
}

.pom-success-line {
  position: relative;
  z-index: 2;
  margin-top: 8px;
  color: #42514a;
  font-size: 15px;
}

.pom-success-line strong {
  color: #071323;
}

.pom-burst {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.pom-burst span {
  position: absolute;
  left: 50%;
  top: 54px;
  width: 8px;
  height: 28px;
  border-radius: 999px;
  background: var(--pom-price);
  transform-origin: center 116px;
  animation: pomBurst 760ms ease-out both;
}

.pom-burst span:nth-child(2) {
  background: #21a36e;
  --burst-rotate: 60deg;
}

.pom-burst span:nth-child(3) {
  background: #ff6f61;
  --burst-rotate: 120deg;
}

.pom-burst span:nth-child(4) {
  background: #37a2ff;
  --burst-rotate: 180deg;
}

.pom-burst span:nth-child(5) {
  background: #ffd041;
  --burst-rotate: 240deg;
}

.pom-burst span:nth-child(6) {
  background: #8d6bff;
  --burst-rotate: 300deg;
}

@keyframes pomSuccessPop {
  0% {
    opacity: 0;
    transform: scale(0.55);
  }
  70% {
    opacity: 1;
    transform: scale(1.1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pomBurst {
  0% {
    opacity: 0;
    transform: rotate(var(--burst-rotate, 0deg)) translateY(0) scale(0.3);
  }
  35% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: rotate(var(--burst-rotate, 0deg)) translateY(-78px) scale(1);
  }
}

.hidden {
  display: none;
}

@media (min-width: 720px) {
  .pom-header {
    padding: 16px 28px;
  }

  .pom-shell {
    padding: 18px 18px 12px;
  }

  .pom-search-wrap {
    top: 84px;
  }

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

  .pom-item-card {
    min-height: 354px;
    border-radius: 26px;
  }

  .pom-item-img {
    height: 196px;
  }

  .pom-item-body {
    gap: 8px;
    padding: 18px 20px 16px;
  }

  .pom-item-body h2 {
    min-height: 40px;
    font-size: 20px;
  }

  .pom-item-meta {
    min-height: 38px;
    font-size: 13px;
  }

  .pom-item-rate {
    font-size: 22px;
  }

  .pom-stepper {
    grid-template-columns: 31px 28px 31px;
    min-height: 40px;
    padding: 5px 9px;
    font-size: 14px;
  }

  .pom-stepper-btn {
    width: 29px;
    height: 29px;
    font-size: 17px;
  }
}

@media (min-width: 1040px) {
  body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    grid-template-rows: auto 1fr;
    align-items: start;
  }

  .pom-header {
    grid-column: 1 / -1;
  }

  .pom-shell {
    width: 100%;
    margin: 0;
    padding-left: 28px;
  }

  .pom-item-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pom-cart-panel {
    position: sticky;
    top: 92px;
    width: auto;
    max-height: calc(100vh - 112px);
    margin: 18px 28px 18px 0;
    overflow: auto;
  }
}
