:root {
  --bg: #f3faff;
  --ink: #2a3245;
  --muted: #6c7689;
  --card: #ffffff;
  --line: #d4e8f6;
  --brand: #ff7eb6;
  --brand-dark: #ec5d9c;
  --accent: #7c9bff;
  --pop: #ffd23f;
  --good: #1faa6a;
  --shadow: 0 10px 30px rgba(40, 70, 110, 0.12);
  --radius: 20px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

h1, h2, h3 { line-height: 1.15; margin: 0 0 0.4em; }
h1, h2 { font-family: "Fredoka", -apple-system, BlinkMacSystemFont, sans-serif; }

a { color: inherit; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(243, 250, 255, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 20px; height: 88px; }
.logo { display: flex; align-items: center; gap: 4px; text-decoration: none; }
.logo-mark { font-size: 1.4rem; }
.logo-svg { height: 72px; width: auto; overflow: visible; }
.logo-arch-text {
  font-family: "Fredoka", -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  font-size: 31px;
  fill: #ffd23f;
  stroke: #ffffff;
  stroke-width: 3px;
  paint-order: stroke;
  stroke-linejoin: round;
  filter: drop-shadow(0 3px 2px rgba(40, 70, 110, 0.22));
}
.nav { margin-left: auto; display: flex; gap: 22px; }
.nav a { text-decoration: none; font-weight: 600; color: var(--muted); transition: color .15s; }
.nav a:hover { color: var(--ink); }

.cart-btn {
  position: relative;
  border: none;
  background: var(--ink);
  color: #fff;
  font-size: 1rem;
  padding: 9px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
}
.cart-count {
  background: var(--brand);
  color: #fff;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 800;
  padding: 1px 7px;
  margin-left: 4px;
}

/* Hero */
.hero { padding: 56px 0 40px; }
.hero-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 32px; align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -0.03em; }
.rotator {
  color: var(--brand);
  border-bottom: 4px solid var(--pop);
  white-space: nowrap;
}
.hero-sub { font-size: 1.15rem; color: var(--muted); max-width: 38ch; }
.hero-badges { list-style: none; display: flex; gap: 18px; padding: 0; margin: 22px 0 0; font-weight: 600; color: var(--muted); flex-wrap: wrap; }

.hero-art {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  place-items: center;
}
.hero-art svg { width: 100%; height: auto; filter: drop-shadow(0 8px 16px rgba(60,30,80,.18)); transition: transform .25s; }
.hero-art svg:hover { transform: rotate(-3deg) scale(1.05); }

/* Buttons */
.btn {
  display: inline-block;
  border: none;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  padding: 13px 26px;
  cursor: pointer;
  text-decoration: none;
  transition: transform .1s, box-shadow .15s, background .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(255,77,141,.35); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-primary:disabled { background: #d9cfe0; box-shadow: none; cursor: not-allowed; }
.btn-block { width: 100%; }

/* Catalog */
.catalog-section { padding: 24px 0 48px; }
.catalog-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.catalog-head h2 { font-size: 1.8rem; margin: 0; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  padding: 7px 15px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: .9rem;
  transition: all .15s;
}
.filter-chip:hover { border-color: var(--brand); color: var(--ink); }
.filter-chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }

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

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-art {
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  padding: 22px;
  background: radial-gradient(circle at 50% 40%, #fff 0%, #e7f4ff 100%);
}
.card-art svg { width: 78%; height: auto; filter: drop-shadow(0 6px 12px rgba(60,30,80,.16)); }
.card-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-name { font-weight: 700; font-size: 1.05rem; }
.card-tag { color: var(--muted); font-size: .85rem; flex: 1; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.card-price { font-weight: 800; font-size: 1.15rem; }
.add-btn {
  border: none;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.add-btn:hover { background: #6a48f0; }
.add-btn:active { transform: scale(.95); }

/* Bundles */
.bundles-section { padding: 8px 0 48px; }
.bundles-section h2 { font-size: 1.8rem; margin-bottom: 2px; }
.bundles-sub { color: var(--muted); margin: 0 0 22px; }
.bundle-card .card-art { position: relative; background: radial-gradient(circle at 50% 40%, #fff 0%, #fff4d6 100%); }
.save-badge {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  font-size: .78rem;
  padding: 4px 10px;
  border-radius: 999px;
  box-shadow: 0 3px 8px rgba(236, 93, 156, .35);
}
.was { color: var(--muted); font-weight: 600; font-size: .85rem; margin-left: 2px; }

/* Story */
.story {
  max-width: 62ch;
  margin: 8px auto 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 30px;
  box-shadow: var(--shadow);
}
.story h2 { font-size: 1.6rem; color: var(--brand-dark); }
.story p { color: var(--ink); font-size: 1.08rem; margin: 0 0 0.8em; }
.story p:last-child { margin-bottom: 0; }

/* About */
.about { padding: 24px 0 56px; max-width: 60ch; }
.about h2 { font-size: 1.6rem; }
.about p { color: var(--muted); font-size: 1.05rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: .9rem; }

/* Cart drawer */
.overlay { position: fixed; inset: 0; background: rgba(34,28,46,.45); z-index: 40; }
.cart {
  position: fixed;
  top: 0; right: 0;
  height: 100%;
  width: min(400px, 100%);
  background: #fff;
  z-index: 50;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .25s ease;
  box-shadow: -10px 0 40px rgba(60,30,80,.18);
}
.cart.open { transform: translateX(0); }
.cart-header { display: flex; align-items: center; justify-content: space-between; padding: 20px; border-bottom: 1px solid var(--line); }
.cart-header h2 { margin: 0; font-size: 1.3rem; }
.icon-btn { border: none; background: none; font-size: 1.2rem; cursor: pointer; color: var(--muted); }
.cart-items { flex: 1; overflow-y: auto; padding: 14px 20px; }
.cart-empty { color: var(--muted); text-align: center; margin-top: 40px; }
.cart-line { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-line-art { width: 54px; height: 54px; flex: none; border-radius: 12px; background: #e7f4ff; display: grid; place-items: center; }
.cart-line-art svg { width: 70%; height: auto; }
.cart-line-info { flex: 1; min-width: 0; }
.cart-line-name { font-weight: 700; font-size: .95rem; }
.cart-line-price { color: var(--muted); font-size: .85rem; }
.qty { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.qty button { width: 24px; height: 24px; border-radius: 7px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-weight: 700; line-height: 1; }
.qty span { min-width: 18px; text-align: center; font-weight: 600; }
.remove-link { background: none; border: none; color: var(--brand); cursor: pointer; font-size: .8rem; padding: 0; margin-top: 2px; }
.cart-footer { padding: 18px 20px; border-top: 1px solid var(--line); }
.cart-total-row { display: flex; justify-content: space-between; font-weight: 800; font-size: 1.15rem; margin-bottom: 6px; }
.ship-note { color: var(--good); font-size: .85rem; margin: 0 0 12px; min-height: 1em; }

/* Modal */
.modal {
  position: fixed;
  z-index: 60;
  top: 50%; left: 50%;
  transform: translate(-50%, -48%) scale(.96);
  opacity: 0;
  pointer-events: none;
  width: min(460px, calc(100% - 32px));
  background: #fff;
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow);
  transition: opacity .2s, transform .2s;
}
.modal.open { opacity: 1; transform: translate(-50%, -50%) scale(1); pointer-events: auto; }
.modal h2 { font-size: 1.5rem; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 5px; }
.field input {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  font-size: 1rem;
  font-family: inherit;
}
.field input:focus { outline: 2px solid var(--accent); border-color: transparent; }
.field-row { display: flex; gap: 12px; }
.field-row .field { flex: 1; }
.modal-total { display: flex; justify-content: space-between; font-weight: 800; font-size: 1.2rem; margin: 8px 0 18px; }
.success-icon { font-size: 3rem; text-align: center; }
.center { text-align: center; }

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: #fff;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  z-index: 70;
  opacity: 0;
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 720px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { max-width: 320px; margin: 0 auto; }
  .nav { display: none; }
}
