:root {
  --ink: #201b18;
  --soft-ink: #4e4741;
  --muted: #8a7e73;
  --paper: #fbf8f3;
  --surface: #fffdf9;
  --panel: #ffffff;
  --line: #e6ddd2;
  --line-strong: #d5c5b4;
  --accent: #a77a3d;
  --accent-soft: #f4eadc;
  --sage: #7f9585;
  --blush: #f3e5df;
  --dark: #211b18;
  --shadow: 0 18px 45px rgba(37, 27, 22, 0.10);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 16% 0%, rgba(238, 220, 210, 0.65), transparent 24rem),
    linear-gradient(180deg, #fffdf9 0%, var(--paper) 48%, #f7f1e9 100%);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

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

button {
  border: 0;
  cursor: pointer;
}

.hero {
  min-height: 180px;
  display: flex;
  align-items: end;
  padding: 24px 20px 20px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(23, 18, 15, 0.08), rgba(23, 18, 15, 0.74)),
    url("/assets/macaron-pistachio.jpg") center/cover;
}

.hero-copy {
  max-width: 680px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #f5d9aa;
}

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

h1 {
  margin-bottom: 10px;
  font-size: clamp(2.1rem, 9vw, 4.5rem);
  line-height: 1;
  font-weight: 900;
}

h2 {
  margin-bottom: 6px;
  font-size: 1.45rem;
}

h3 {
  margin-bottom: 8px;
  font-size: 1rem;
}

main {
  padding: 18px 14px 210px;
}

.category-tabs,
.admin-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 14px;
  scrollbar-width: none;
}

.tab {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--soft-ink);
  background: rgba(255, 255, 255, 0.72);
  font-weight: 800;
}

.tab.active {
  color: #fff;
  border-color: var(--dark);
  background: var(--dark);
}

.section-intro {
  margin: 6px 2px 14px;
}

.section-intro p {
  color: var(--muted);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
  gap: 14px;
}

.product-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(37, 27, 22, 0.06);
}

.product-card.muted {
  opacity: 0.58;
}

.product-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background: #f8f2e8;
}

.product-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 12px;
}

.product-title-row {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: start;
}

.price {
  flex: 0 0 auto;
  color: var(--accent);
  font-weight: 900;
}

.product-info p,
.empty,
.cart-line span,
.customer-block,
.order-top span {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.product-info > p {
  min-height: 42px;
}

.badges {
  min-height: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 14px;
}

.option-label {
  margin: 8px 0 12px;
  font-size: 0.88rem;
}

.product-option {
  min-height: 40px;
  background: #fffaf3;
}

.badge,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  color: #5f715f;
  background: #edf2e7;
  font-size: 0.78rem;
  font-weight: 800;
}

.add-button {
  margin-top: auto;
}

.add-button,
.primary,
.cart-toggle {
  min-height: 46px;
  width: 100%;
  border-radius: 8px;
  color: #fff;
  background: var(--dark);
  font-weight: 900;
}

.add-button,
.primary {
  box-shadow: 0 10px 24px rgba(33, 27, 24, 0.13);
}

.add-button:disabled {
  color: #8b8178;
  background: #e5ddd2;
  box-shadow: none;
  cursor: not-allowed;
}

.ghost {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font-weight: 800;
}

.cart-panel {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10;
  pointer-events: none;
}

.cart-toggle {
  width: calc(100% - 28px);
  max-width: 520px;
  margin: 0 auto 14px;
  display: block;
  box-shadow: var(--shadow);
  pointer-events: auto;
}

.cart-body {
  max-height: 0;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-radius: 16px 16px 0 0;
  background: rgba(255, 253, 249, 0.98);
  box-shadow: var(--shadow);
  transition: max-height 0.22s ease;
  pointer-events: auto;
}

.cart-panel.open .cart-body {
  max-height: 86vh;
  overflow-y: auto;
}

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

.cart-head,
.cart-items,
.cart-total,
.order-form,
.transfer-box {
  padding: 12px;
}

.cart-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.cart-line strong,
.cart-line span {
  display: block;
}

.discounted-total {
  margin-right: 8px;
}

.was-price {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: line-through;
}

.discount-note {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #e4d6c2;
  border-radius: 8px;
  color: #6f5430;
  background: #fff6e8;
  font-size: 0.9rem;
  font-weight: 800;
}

.discount-note .was-price {
  display: inline;
  margin-left: 6px;
}

.stepper {
  display: grid;
  grid-template-columns: 38px 34px 38px;
  align-items: center;
  text-align: center;
}

.stepper button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #fff;
  background: var(--dark);
  font-weight: 900;
}

label {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
  color: var(--ink);
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
}

textarea {
  resize: vertical;
}

.transfer-box {
  margin: 0 14px 14px;
  border: 1px solid #ded2c4;
  border-radius: 8px;
  background: #fff7ec;
}

.transfer-box p {
  margin-bottom: 6px;
  color: #6b5639;
}

dialog {
  width: min(92vw, 420px);
  padding: 0;
  border: 0;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(22, 17, 15, 0.52);
}

.dialog-card {
  padding: 20px;
}

.admin-page {
  background: var(--paper);
}

.admin-header {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 16px 14px 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 248, 243, 0.96);
  backdrop-filter: blur(10px);
}

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

.admin-main {
  padding-bottom: 28px;
}

.orders {
  display: grid;
  gap: 12px;
}

.order-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(37, 27, 22, 0.07);
}

.order-top strong,
.order-top span {
  display: block;
}

.customer-block {
  margin: 12px 0;
  padding: 12px;
  border-radius: 8px;
  background: #f7f0e8;
}

.customer-block p {
  margin-bottom: 5px;
}

.note {
  color: #6d5232;
  font-weight: 700;
}

.order-items {
  display: grid;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.order-total {
  padding: 12px 0;
  font-size: 1.05rem;
}

.status-select {
  margin-bottom: 0;
}

@media (min-width: 760px) {
  .hero {
    min-height: 260px;
    padding: 36px 44px 30px;
  }

  main {
    max-width: 1180px;
    margin: 0 auto;
    padding-bottom: 260px;
  }

  .cart-panel {
    left: auto;
    width: 420px;
  }

  .cart-toggle {
    margin-right: 18px;
  }

  .cart-body {
    border-radius: 16px 0 0 0;
  }

  .admin-main,
  .admin-header {
    max-width: 860px;
    margin: 0 auto;
  }
}



.product-grid { gap: 12px; }
.product-info > p { min-height: 0; overflow: hidden; }
.badges { min-height: 24px; margin: 6px 0 10px; }
.add-button, .primary, .cart-toggle { min-height: 42px; }
.product-info > p { display: -webkit-box; -webkit-box-orient: vertical; }
.product-info > p { -webkit-line-clamp: 2; }

.admin-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.login-card {
  margin: 18px 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(37, 27, 22, 0.07);
}

.login-card h2 {
  margin: 0 0 14px;
  font-size: 1.2rem;
}

.form-message {
  min-height: 20px;
  margin-top: 10px;
  color: #9a3412;
  font-weight: 800;
}
.order-card.expired {
  opacity: 0.78;
  background: #f4f0ea;
}

.status-pill.expired {
  color: #7f1d1d;
  background: #fee2e2;
}
