:root {
  --paper: #fcf8f4;
  --white: #fffdfa;
  --ink: #342021;
  --muted: #705b58;
  --red: #9c2637;
  --deep: #771528;
  --rose: #f9e6e6;
  --line: #eadbd4;
  --serif: Cambria,"Times New Roman",serif;
  --sans: "Segoe UI",system-ui,sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 15px var(--sans);
}

a {
  color: inherit;
  text-decoration: none;
}

button,input,select,textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: default;
  opacity: .55;
}

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

h1,h2,h3,p {
  margin-top: 0;
}

h2,h3 {
  line-height: 1.15;
}

[hidden] {
  display: none!important;
}

.wrap {
  width: min(1200px,calc(100% - 80px));
  margin-inline: auto;
}

.announcement {
  background: var(--deep);
  color: #fff4ed;
  text-align: center;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .05em;
  padding: 8px;
}

.announcement span {
  color: #f3b6b7;
  margin: 0 8px;
}

.header {
  border-bottom: 1px solid var(--line);
}

.nav {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  gap: 11px;
  align-items: center;
}

.brand strong {
  display: block;
  color: var(--deep);
  font: 800 24px/1.1 "Microsoft YaHei","Noto Serif CJK SC",serif;
  letter-spacing: 3px;
}

.brand small {
  display: block;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .17em;
  margin-top: 5px;
}

.mark {
  display: grid;
  place-items: center;
  border-radius: 50%;
  width: 39px;
  height: 39px;
  background: var(--rose);
  color: var(--deep);
  font-size: 26px;
}

.nav nav {
  display: flex;
  gap: 32px;
  font-size: 14px;
  font-weight: 600;
}

.nav a:hover,.footer a:hover {
  color: var(--red);
}

.cart-trigger {
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 8px 12px;
  border-radius: 30px;
  color: var(--ink);
  font-weight: 650;
  white-space: nowrap;
}

.cart-trigger b {
  min-width: 23px;
  padding: 3px 5px;
  background: var(--rose);
  color: var(--deep);
  border-radius: 20px;
  text-align: center;
  font-size: 12px;
}

.bag-icon {
  width: 13px;
  height: 12px;
  border: 1.5px solid var(--deep);
  border-radius: 2px;
  position: relative;
  margin-top: 3px;
}

.bag-icon::before {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  top: -5px;
  height: 5px;
  border: 1px solid var(--deep);
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
}

.hero {
  display: grid;
  grid-template-columns: 1.04fr 1fr;
  min-height: 440px;
  margin-top: 24px;
  border-radius: 24px;
  overflow: hidden;
  background: #f8e9e7;
}

.hero-copy {
  align-self: center;
  padding: 46px 56px;
}

.eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .19em;
  color: var(--deep);
  margin-bottom: 18px;
}

.hero h1 {
  font: normal clamp(44px,5.3vw,76px)/.99 var(--serif);
  letter-spacing: -.047em;
  margin-bottom: 19px;
  color: #57222c;
}

.hero h1 em {
  color: var(--red);
  font-weight: normal;
}

.hero-copy>p:not(.eyebrow) {
  color: #664a4c;
  line-height: 1.6;
  max-width: 315px;
  margin-bottom: 22px;
}

.hero-photo {
  min-height: 310px;
  background: #e7b8bb url('/hero.png') center/cover no-repeat;
}

.button {
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 11px 17px;
  border-radius: 9px;
  min-height: 43px;
  font-weight: 700;
  text-align: center;
  line-height: 1.25;
}

.primary {
  color: white;
  background: var(--deep);
}

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

.secondary {
  color: var(--deep);
  background: var(--white);
  border-color: var(--line);
}

.secondary:hover:not(:disabled) {
  background: var(--rose);
}

.tiers {
  background: var(--white);
  display: grid;
  grid-template-columns: repeat(3,1fr);
  border: 1px solid var(--line);
  border-radius: 15px;
  margin-top: 17px;
  padding: 14px 0;
}

.tiers>div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding-inline: 10px;
}

.tiers>div+div {
  border-left: 1px solid var(--line);
}

.tier-icon {
  display: grid;
  place-items: center;
  height: 35px;
  width: 35px;
  flex: none;
  background: var(--rose);
  border-radius: 50%;
  color: var(--deep);
  font-size: 19px;
}

.tiers strong,.tiers small {
  display: block;
}

.tiers small,.muted {
  color: var(--muted);
}

.tiers small {
  font-size: 12px;
  margin-top: 3px;
}

.catalog {
  padding: 46px 0 52px;
  scroll-margin-top: 14px;
}

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

.section-head h2,.admin-head h1 {
  font: normal clamp(34px,4vw,48px)/1.05 var(--serif);
  letter-spacing: -.04em;
  margin-bottom: 8px;
}

.section-head p {
  margin-bottom: 0;
  color: var(--muted);
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.search span {
  color: var(--red);
  font-size: 24px;
}

.search input {
  border: 0;
  background: transparent;
  min-width: 0;
  width: 155px;
  padding: 10px 0;
  color: var(--ink);
}

.filters {
  display: flex;
  gap: 8px;
  overflow: auto;
  scrollbar-width: none;
  margin: 0 0 17px;
  padding: 3px;
}

.filters button {
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 8px 13px;
  background: var(--white);
  white-space: nowrap;
  color: var(--ink);
  font-size: 13px;
}

.filters button[aria-pressed=true] {
  background: var(--deep);
  border-color: var(--deep);
  color: white;
}

.products {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 16px;
}

.card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.photo {
  background-color: var(--rose);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.demo-photo {
  background-image: url('/products.png');
  background-size: 300% 200%;
  background-position: var(--tile-x) var(--tile-y);
}

.card-photo {
  width: 100%;
  aspect-ratio: 1.31;
  display: block;
}

.card-photo.demo-photo {
  background-size: 300% auto;
  background-position: var(--tile-x) var(--card-tile-y);
}

.card-body {
  padding: 15px;
}

.category {
  color: var(--red);
  font-size: 11px;
  font-weight: 750;
  margin-bottom: 5px;
}

.card h3 {
  font: 600 19px/1.2 var(--serif);
  margin-bottom: 10px;
}

.retail {
  font-weight: 750;
  margin-right: 8px;
}

.wholesale {
  font-size: 12px;
  color: var(--deep);
  font-weight: 650;
}

.card .button {
  width: 100%;
  margin-top: 12px;
  font-size: 13px;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 21px 0 28px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.footer strong {
  color: var(--deep);
  letter-spacing: 2px;
}

.footer small {
  margin-left: 7px;
}

dialog {
  background: var(--white);
  color: var(--ink);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  width: min(700px,calc(100% - 28px));
  max-height: calc(100% - 28px);
  overflow: auto;
}

dialog::backdrop {
  background: #35202275;
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 21px;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}

.dialog-head h2 {
  margin: 0;
  font: normal 28px/1.1 var(--serif);
}

.close {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 50%;
  width: 35px;
  height: 35px;
  font-size: 22px;
  color: var(--ink);
  flex: none;
}

.detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 20px;
}

.detail-photo {
  aspect-ratio: 1;
  width: 100%;
  border-radius: 10px;
}

.detail p {
  margin-bottom: 11px;
}

.field {
  display: grid;
  gap: 5px;
  margin-bottom: 11px;
  font-size: 13px;
  font-weight: 700;
}

.field input,.field select,.field textarea,.stock-row input {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 9px;
  color: var(--ink);
  background: white;
  width: 100%;
  min-width: 0;
}

.detail .button {
  width: 100%;
}

.share-button {
  margin-top: 7px;
}

.price-table {
  margin-bottom: 12px;
}

.price-table div,.summary div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 0;
}

.price-table div {
  font-size: 12px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.drawer {
  margin: 0 0 0 auto;
  width: min(470px,100%);
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  border-radius: 15px 0 0 15px;
}

.drawer .dialog-head {
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 1;
}

.cart-body {
  padding: 17px 21px;
}

.cart-line {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  gap: 11px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.cart-line p {
  font-size: 12px;
  margin: 4px 0;
  color: var(--muted);
}

.cart-photo {
  height: 58px;
  border-radius: 7px;
}

.quantity {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}

.quantity button,.quantity input {
  border: 0;
  background: white;
  color: var(--ink);
  width: 29px;
  height: 30px;
  text-align: center;
  padding: 0;
}

.quantity input {
  width: 38px;
  appearance: textfield;
}

.quantity input::-webkit-inner-spin-button {
  appearance: none;
}

.quantity button:hover {
  background: var(--rose);
}

.remove {
  display: block;
  margin: 6px 0 0 auto;
  background: none;
  border: 0;
  color: var(--red);
  font-size: 12px;
}

.cart-total {
  white-space: nowrap;
}

.cart-notice {
  font-size: 13px;
  background: var(--rose);
  color: var(--deep);
  padding: 10px;
  border-radius: 7px;
  margin: 12px 0;
}

.summary {
  margin: 12px 0;
}

.summary .grand {
  border-top: 1px solid var(--line);
  margin-top: 7px;
  padding-top: 10px;
  font-size: 18px;
  color: var(--deep);
}

.wide {
  width: 100%;
}

.stack {
  display: grid;
  gap: 8px;
}

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 24px);
  z-index: 2;
  color: white;
  background: var(--deep);
  border-radius: 8px;
  padding: 11px 16px;
  text-align: center;
}

.message {
  font-size: 13px;
  color: var(--deep);
}

.empty {
  color: var(--muted);
  padding: 14px 0;
}

.admin-main {
  padding: 30px 0 50px;
}

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

.panel {
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 13px;
  margin-bottom: 15px;
}

.panel h2 {
  font: normal 28px/1.1 var(--serif);
  margin-bottom: 12px;
}

.login-panel {
  max-width: 420px;
}

.admin-cols {
  display: grid;
  grid-template-columns: minmax(0,1.05fr) minmax(0,1fr);
  gap: 16px;
}

.admin-list,.order-list,.order-summary {
  display: grid;
  gap: 7px;
}

.admin-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  gap: 8px;
  width: 100%;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  padding: 8px 10px;
  border-radius: 8px;
}

.admin-entry:hover {
  background: var(--rose);
}

.admin-entry small {
  color: var(--muted);
}

.mini-photo {
  width: 44px;
  height: 44px;
  border-radius: 5px;
  flex: none;
}

.admin-entry span:nth-child(2) {
  flex: 1;
}

.fields-3 {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 8px;
}

.stock-row {
  display: grid;
  grid-template-columns: 1fr 80px auto;
  gap: 6px;
  margin-bottom: 6px;
}

.stock-row button {
  border: 1px solid var(--line);
  color: var(--deep);
  background: white;
  border-radius: 7px;
}

.admin-photo {
  width: 110px;
  height: 110px;
  border-radius: 7px;
  margin-bottom: 8px;
}

.order-list {
  max-height: 360px;
  overflow: auto;
}

.order-summary ul {
  padding-left: 20px;
  margin: 6px 0;
}

.order-summary>hr {
  border: 0;
  border-top: 1px solid var(--line);
  width: 100%;
}

.admin-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.inline {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 12px;
}

@media (max-width:850px) {
  .wrap {
    width: calc(100% - 36px);
  }

  .hero {
    min-height: 380px;
  }

  .hero-copy {
    padding: 32px;
  }

  .nav nav {
    gap: 16px;
  }

}

@media (max-width:600px) {
  .wrap {
    width: calc(100% - 24px);
  }

  .nav {
    height: 61px;
    gap: 8px;
  }

  .nav nav {
    display: none;
  }

  .brand strong {
    font-size: 20px;
  }

  .mark {
    width: 34px;
    height: 34px;
    font-size: 22px;
  }

  .hero {
    margin-top: 12px;
    grid-template-columns: 1fr 1fr;
    min-height: 0;
    border-radius: 13px;
  }

  .hero-copy {
    padding: 19px 10px 20px 14px;
  }

  .hero h1 {
    font-size: clamp(25px,7.1vw,43px);
    margin-bottom: 10px;
  }

  .hero .eyebrow {
    font-size: 8px;
    letter-spacing: .10em;
    margin-bottom: 9px;
  }

  .hero-copy>p:not(.eyebrow) {
    font-size: 11px;
    margin-bottom: 10px;
    line-height: 1.4;
  }

  .hero .button {
    font-size: 11px;
    min-height: 31px;
    padding: 6px;
    gap: 5px;
  }

  .hero-photo {
    min-height: 0;
  }

  .tiers {
    margin-top: 10px;
    padding: 9px 0;
  }

  .tiers>div {
    gap: 4px;
    padding-inline: 4px;
  }

  .tier-icon {
    width: 21px;
    height: 21px;
    font-size: 12px;
  }

  .tiers strong {
    font-size: 11px;
  }

  .tiers small {
    font-size: 9px;
  }

  .catalog {
    padding: 27px 0;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
    margin-bottom: 10px;
  }

  .section-head p {
    font-size: 13px;
  }

  .search input {
    width: 160px;
    padding: 5px 0;
  }

  .filters {
    margin-bottom: 9px;
  }

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

  .card-body {
    padding: 9px;
  }

  .card h3 {
    font-size: 16px;
  }

  .wholesale {
    display: block;
    margin-top: 3px;
  }

  .card .button {
    font-size: 12px;
    min-height: 34px;
    padding: 6px;
  }

  .detail {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
  }

  .detail-photo {
    max-width: 215px;
    margin: auto;
  }

  .admin-cols {
    grid-template-columns: 1fr;
  }

  .footer {
    font-size: 11px;
  }

}

