:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f6f3ee;
  color: #17211f;
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  min-height: 40px;
  padding: 0 14px;
  font-weight: 700;
}

button.primary {
  background: #0f766e;
  color: white;
}

button.secondary {
  background: #21332f;
  color: white;
}

button.ghost {
  background: #e6e0d7;
  color: #17211f;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #c9c0b4;
  border-radius: 6px;
  padding: 8px 10px;
  background: #fffdf9;
  color: #17211f;
}

label {
  display: grid;
  gap: 6px;
  color: #4c5a56;
  font-size: 0.88rem;
  font-weight: 700;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: #17211f;
  color: white;
  padding: 24px;
}

.brand {
  display: grid;
  gap: 6px;
}

.brand strong {
  font-size: 1.35rem;
}

.brand span,
.sidebar p {
  color: #bad0ca;
  line-height: 1.5;
}

.main {
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.topbar h1 {
  margin: 0;
  font-size: 1.8rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: #dbece8;
  color: #0f5f59;
  font-weight: 800;
  font-size: 0.84rem;
}

.panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
}

.panel,
.price-card,
.package-card {
  background: #fffdf9;
  border: 1px solid #ddd5ca;
  border-radius: 8px;
}

.panel {
  padding: 18px;
}

.panel h2,
.panel h3 {
  margin: 0 0 12px;
}

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

.full {
  grid-column: 1 / -1;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.notice {
  border-left: 4px solid #0f766e;
  background: #e9f3f1;
  padding: 12px;
  border-radius: 6px;
  color: #253c37;
}

.muted {
  color: #66726f;
}

.price-grid {
  display: grid;
  gap: 12px;
}

.price-card {
  padding: 14px;
}

.price-card strong {
  display: block;
  font-size: 1.1rem;
}

.price-card .price {
  display: block;
  margin: 8px 0;
  font-size: 1.5rem;
  font-weight: 900;
}

.catalog-preview {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.category-preview {
  border-top: 1px solid #e2d8cc;
  padding-top: 12px;
}

.category-preview h3 {
  margin-bottom: 6px;
}

.widget-page {
  background: #fffdf9;
  min-height: 100vh;
  padding: 22px;
}

.storefront-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.storefront-header h1 {
  margin: 0;
  font-size: 1.7rem;
}

.account-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #d9e3df;
  border-radius: 8px;
  background: #eef7f5;
  padding: 12px;
  margin-bottom: 12px;
}

.account-panel div {
  display: grid;
  gap: 3px;
}

.account-panel strong {
  color: #17211f;
}

.account-panel span {
  color: #4f615d;
  line-height: 1.4;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.checkout-message {
  border-radius: 8px;
  margin-bottom: 12px;
  padding: 12px;
  line-height: 1.45;
}

.checkout-message.error {
  border: 1px solid #e4b5ad;
  background: #fff0ee;
  color: #7a2e24;
}

.checkout-message.info {
  border: 1px solid #bdd9d4;
  background: #f1faf8;
  color: #1f5750;
}

.basket-panel {
  border: 1px solid #ddd5ca;
  border-radius: 8px;
  background: #fffaf2;
  margin-bottom: 12px;
  padding: 12px;
}

.basket-panel > div:first-child,
.basket-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.basket-panel strong {
  display: block;
  color: #17211f;
}

.basket-panel span {
  color: #53625e;
}

.basket-items {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.basket-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px auto;
  align-items: center;
  gap: 8px;
}

.basket-quantity {
  min-height: 36px;
  padding: 6px;
}

.category-section {
  margin: 22px 0;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

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

.package-card {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 10px;
}

.package-open {
  display: grid;
  gap: 8px;
  min-height: auto;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  font-weight: 700;
}

.package-media {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  object-fit: cover;
  background: #e6e0d7;
}

.package-media.placeholder {
  display: grid;
  place-items: center;
  color: #52645f;
  font-size: 2rem;
  font-weight: 900;
}

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

.gift-button {
  min-width: 42px;
  background: #e6e0d7;
  color: #17211f;
}

.package-card h3 {
  margin: 0;
}

.package-card p {
  margin: 0;
  color: #53625e;
  line-height: 1.45;
}

.package-card .price {
  color: #0f5f59;
  font-size: 1.15rem;
  font-weight: 900;
}

.package-modal {
  position: fixed;
  inset: 0;
  z-index: 999;
}

.package-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 33, 31, 0.56);
}

.package-modal-content {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);
  gap: 16px;
  max-width: 860px;
  max-height: calc(100vh - 48px);
  margin: 24px auto;
  overflow: auto;
  border-radius: 8px;
  background: #fffdf9;
  border: 1px solid #ddd5ca;
  padding: 16px;
}

.package-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  min-height: 36px;
  padding: 0;
  background: #17211f;
  color: white;
}

.package-detail-media {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 6px;
  object-fit: cover;
  background: #e6e0d7;
}

.package-detail-body {
  display: grid;
  align-content: start;
  gap: 12px;
  padding-right: 32px;
}

.package-detail-body h2 {
  margin: 0;
}

.package-description {
  color: #394844;
  line-height: 1.55;
}

.package-description :first-child {
  margin-top: 0;
}

.empty-state {
  padding: 24px;
  border: 1px dashed #bbb1a5;
  border-radius: 8px;
  background: #fffaf2;
}

@media (max-width: 860px) {
  .app-shell,
  .panel-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    padding: 18px;
  }

  .main {
    padding: 18px;
  }

  .topbar,
  .storefront-header,
  .account-panel,
  .basket-panel > div:first-child,
  .basket-header,
  .basket-item,
  .package-actions,
  .package-modal-content,
  .package-card.list {
    align-items: stretch;
    display: flex;
    flex-direction: column;
  }
}
