:root {
  --bg: #faf6f4;
  --text: #4a3f45;
  --muted: #8a7a80;
  --accent: #d98ba0;
  --accent-dark: #b96a80;
  --card: #ffffff;
  --radius: 18px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
body.no-scroll { overflow: hidden; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
.container { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,.85); backdrop-filter: blur(8px);
  border-bottom: 1px solid #f0e2e6;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-size: 1.35rem; font-weight: 700; color: var(--accent-dark); text-decoration: none; }
.cart-btn {
  border: none; cursor: pointer; font: inherit;
  background: var(--accent); color: #fff;
  padding: 10px 18px; border-radius: 999px;
  display: flex; align-items: center; gap: 8px;
  transition: background .25s, transform .15s;
}
.cart-btn:hover { background: var(--accent-dark); }
.cart-btn:active { transform: scale(.96); }
.cart-count {
  background: #fff; color: var(--accent-dark);
  border-radius: 999px; font-size: .8rem; font-weight: 700;
  padding: 1px 8px;
}
.hero { text-align: center; padding: 48px 8px 24px; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; }
.hero p { color: var(--muted); margin-top: 8px; }
.catalog {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px; padding: 24px 0 48px;
}
.card {
  background: var(--card); border-radius: var(--radius);
  overflow: hidden; box-shadow: 0 4px 16px rgba(90,60,70,.08);
  display: flex; flex-direction: column;
  transition: transform .25s, box-shadow .25s;
  animation: rise .5s ease both;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(90,60,70,.14); }
.card-emoji {
  height: 160px; display: flex; align-items: center; justify-content: center;
  font-size: 72px;
}
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-body h3 { font-size: 1.1rem; }
.card-body .desc { color: var(--muted); font-size: .9rem; flex: 1; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.price { font-weight: 700; font-size: 1.15rem; }
.btn {
  border: none; cursor: pointer; font: inherit;
  border-radius: 999px; padding: 10px 18px;
  transition: background .25s, transform .15s, opacity .25s;
}
.btn:disabled { opacity: .6; cursor: default; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-dark); }
.btn.small { padding: 7px 14px; font-size: .9rem; }
.btn:active { transform: scale(.96); }
.overlay {
  position: fixed; inset: 0; background: rgba(60,40,50,.4);
  z-index: 30; display: flex; justify-content: flex-end;
  animation: fade .25s ease;
}
.panel {
  background: #fff; width: min(420px, 100%); height: 100%;
  display: flex; flex-direction: column;
  animation: slide .3s ease;
}
.panel-head, .panel-foot { padding: 18px 20px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #f0e2e6; }
.panel-body { flex: 1; overflow-y: auto; padding: 12px 20px; }
.panel-foot { border-top: 1px solid #f0e2e6; }
.total { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 1.1rem; }
.cart-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px dashed #f0e2e6; }
.cart-item .info { flex: 1; }
.cart-item .name { font-weight: 600; }
.cart-item .item-price { color: var(--muted); font-size: .9rem; }
.qty { display: flex; align-items: center; gap: 6px; }
.qty button {
  width: 28px; height: 28px; border-radius: 50%; border: 1px solid #e5d3da;
  background: #fff; cursor: pointer; font-size: 1rem; line-height: 1;
  transition: background .2s;
}
.qty button:hover { background: #faeef2; }
.remove { border: none; background: none; cursor: pointer; color: var(--muted); font-size: 1rem; }
.remove:hover { color: #c05b6e; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }
.close { border: none; background: none; font-size: 1.2rem; cursor: pointer; color: var(--muted); }
.modal {
  position: fixed; inset: 0; background: rgba(60,40,50,.4);
  z-index: 40; display: flex; align-items: center; justify-content: center; padding: 16px;
  animation: fade .25s ease;
}
.modal-box {
  background: #fff; border-radius: var(--radius); padding: 28px;
  width: min(420px, 100%); position: relative;
  animation: pop .3s ease;
}
.modal-box .close { position: absolute; top: 14px; right: 14px; }
.modal-box h2 { margin-bottom: 6px; }
.muted { color: var(--muted); font-size: .92rem; margin-bottom: 16px; }
#orderForm label { display: block; font-size: .9rem; margin-bottom: 6px; }
#phone {
  width: 100%; font: inherit; padding: 12px 14px;
  border: 1px solid #e5d3da; border-radius: 12px; margin-bottom: 6px;
}
#phone:focus { outline: 2px solid var(--accent); border-color: transparent; }
#orderForm .btn { width: 100%; margin-top: 12px; }
.error { color: #c0392b; font-size: .88rem; margin: 6px 0; }
.success-emoji { font-size: 56px; text-align: center; }
#orderSuccess { text-align: center; }
#orderSuccess .btn { margin-top: 18px; }
.footer { text-align: center; color: var(--muted); padding: 24px 0 40px; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide { from { transform: translateX(100%); } to { transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.92); } to { opacity: 1; } }
@media (max-width: 560px) {
  .card-emoji { height: 130px; font-size: 58px; }
  .panel { width: 100%; }
}
