/* =========================================================
   Alpha Flowers — style.css
   Өнгө, фонт, зайг доорх хувьсагчдаас нэг дор өөрчилнө.
   ========================================================= */
:root {
  --bg: #FAF8F5;
  --surface: #FFFFFF;
  --tile: #F3EEE8;
  --ink: #1C2420;
  --muted: #5E6660;
  --line: #E7E0D7;
  --green: #1F4D36;
  --green-2: #2C6448;
  --accent: #C42E63;
  --accent-dark: #A82553;
  --blush: #F4D5DE;

  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Unbounded", var(--font);

  --radius-lg: 28px;
  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 0 20px 40px -24px rgba(28, 36, 32, .35);
  --container: 1240px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); font-weight: 500; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  display: inline-block;
  font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.eyebrow--light { color: var(--blush); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 26px;
  border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 700; font-size: 15px;
  transition: background .2s, border-color .2s, color .2s, transform .2s;
}
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); }
.btn--ghost { border-color: var(--line); background: var(--surface); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--dark { background: var(--ink); color: var(--bg); }
.btn--dark:hover { background: var(--green); }
.btn--block { width: 100%; }

.icon-btn {
  width: 44px; height: 44px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); background: var(--surface);
}
.icon-btn:hover { border-color: var(--ink); }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(250, 248, 245, .88);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 76px; }

.logo { display: flex; align-items: center; gap: 12px; }
.logo__img { width: 50px; height: 50px; border-radius: 50%; }
.logo__text { display: flex; flex-direction: column; line-height: 1.2; }
.logo__text strong { font-family: var(--font-display); font-weight: 600; font-size: 18px; letter-spacing: -0.01em; }
.logo__text small { font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--muted); }
.logo--footer .logo__img { width: 64px; height: 64px; }
.footer__about { margin-top: 16px; color: var(--muted); font-size: 15px; }

.nav { display: flex; gap: 32px; font-weight: 600; font-size: 15px; }
.nav a { color: var(--muted); transition: color .2s; }
.nav a:hover { color: var(--ink); }

.cart-btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 46px; padding: 0 8px 0 16px;
  border-radius: 999px; border: none;
  background: var(--ink); color: var(--bg);
  font-weight: 700; font-size: 14px;
}
.cart-btn__count {
  min-width: 30px; height: 30px; padding: 0 8px; border-radius: 999px;
  display: grid; place-items: center;
  background: var(--accent); color: #fff; font-size: 13px;
}
.cart-btn.bump .cart-btn__count { animation: bump .35s ease; }
@keyframes bump { 50% { transform: scale(1.25); } }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 80px; }
.hero__inner { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero__text h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(38px, 5.2vw, 64px); letter-spacing: -0.025em; line-height: 1.06;
  margin-bottom: 22px;
}
.hero__text h1 em { font-style: normal; color: var(--accent); }
.lead { font-size: 18px; color: var(--muted); max-width: 470px; margin-bottom: 32px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 36px; }
.perks { display: flex; flex-wrap: wrap; gap: 12px 28px; font-size: 14px; font-weight: 600; color: var(--muted); }
.perks li { display: flex; align-items: center; gap: 8px; }
.perks svg { color: var(--green); }

.hero__visual {
  position: relative; aspect-ratio: 1 / 1.02;
  border-radius: 40px; background: var(--green); overflow: hidden;
}
.hero__circle {
  position: absolute; left: 50%; top: 54%; width: 78%; aspect-ratio: 1;
  transform: translate(-50%, -50%); border-radius: 50%; background: var(--green-2);
}
.hero__visual img { position: absolute; filter: drop-shadow(0 24px 28px rgba(0, 0, 0, .32)); }
.hero__main { left: 50%; bottom: 0; height: 92%; transform: translateX(-50%); z-index: 2; }
.hero__side { height: 52%; bottom: -2%; z-index: 1; }
.hero__side--left { left: -6%; transform: rotate(-8deg); }
.hero__side--right { right: -6%; transform: rotate(8deg); }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -0.02em; }
.section--dark { background: var(--ink); color: var(--bg); }
.section__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }

.search {
  display: flex; align-items: center; gap: 10px;
  width: min(320px, 100%); height: 48px; padding: 0 18px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  color: var(--muted);
}
.search:focus-within { border-color: var(--ink); }
.search input { border: none; outline: none; background: none; flex: 1; min-width: 0; color: var(--ink); }

.filters { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 32px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 42px; padding: 0 18px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--surface);
  font-weight: 700; font-size: 14px; transition: all .2s;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* ---------- Product grid ---------- */
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.card { display: flex; flex-direction: column; gap: 14px; }
.card__media {
  position: relative; display: block; width: 100%;
  aspect-ratio: 4 / 5; border: none; padding: 0;
  border-radius: var(--radius-lg); background: var(--tile); overflow: hidden;
}
.card__media img {
  width: 100%; height: 100%; object-fit: contain;
  transition: transform .45s cubic-bezier(.2, .7, .2, 1);
}
.card:hover .card__media img { transform: translateY(-6px) scale(1.04); }
.card__badge {
  position: absolute; top: 14px; left: 14px; z-index: 1;
  padding: 5px 12px; border-radius: 999px;
  background: var(--surface); font-size: 12px; font-weight: 800;
}
.card__info { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 0 4px; }
.card__name { font-size: 16px; font-weight: 700; line-height: 1.3; }
.card__desc { font-size: 13px; color: var(--muted); }
.card__price { font-weight: 800; margin-top: 4px; }
.card__add {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  border: 1.5px solid var(--line); background: var(--surface);
  display: grid; place-items: center; transition: all .2s;
}
.card__add:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.card--custom { aspect-ratio: auto; }
.custom {
  height: 100%; min-height: 320px; border-radius: var(--radius-lg);
  background: var(--green); color: var(--bg);
  padding: 28px; display: flex; flex-direction: column; justify-content: flex-end; gap: 12px;
}
.custom h3 { font-family: var(--font-display); font-weight: 600; font-size: 22px; line-height: 1.2; }
.custom p { color: #CFDCD3; font-size: 15px; }
.btn--light { background: var(--bg); color: var(--ink); align-self: flex-start; margin-top: 8px; height: 46px; padding: 0 20px; font-size: 14px; }
.btn--light:hover { background: #fff; }
.empty { text-align: center; color: var(--muted); padding: 48px 0; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 40px; }
.step { border: 1px solid #36443B; border-radius: var(--radius-lg); padding: 28px; }
.step__num { font-family: var(--font-display); font-size: 40px; color: var(--blush); }
.step h3 { font-size: 19px; margin: 14px 0 8px; }
.step p { color: #C5CCC6; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.about__img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 32px; }
.about__text h2 { margin-bottom: 18px; }
.about__text p { color: var(--muted); font-size: 17px; margin-bottom: 28px; }

/* ---------- Footer ---------- */
.footer { background: #F1EBE3; padding: 64px 0 28px; }
.footer__inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer h3 { font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 14px; }
.footer__list { display: flex; flex-direction: column; gap: 8px; color: var(--muted); font-size: 15px; }
.footer__list a:hover { color: var(--accent); }
.footer__bottom { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

/* ---------- Modal (dialog) ---------- */
.modal {
  width: min(960px, calc(100% - 32px)); max-height: calc(100% - 32px);
  padding: 0; border: none; border-radius: 32px;
  background: var(--surface); color: var(--ink);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .45);
}
.modal--narrow { width: min(620px, calc(100% - 32px)); }
.modal::backdrop { background: rgba(28, 36, 32, .5); backdrop-filter: blur(4px); }
.modal[open] { animation: pop .25s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.modal__close-form { position: absolute; top: 16px; right: 16px; z-index: 2; margin: 0; }

.pm { display: grid; grid-template-columns: 1fr 1fr; }
.pm__media { background: var(--tile); display: flex; align-items: flex-end; justify-content: center; min-height: 520px; }
.pm__media img { width: 100%; height: 100%; object-fit: contain; }
.pm__body { padding: 40px 36px 32px; display: flex; flex-direction: column; gap: 18px; }
.pm__body h2 { font-family: var(--font-display); font-weight: 600; font-size: 30px; padding-right: 48px; }
.pm__desc { color: var(--muted); }
.pm__price { font-size: 22px; font-weight: 800; color: var(--accent); }
.pm__actions { display: flex; gap: 12px; margin-top: auto; }

.field { display: flex; flex-direction: column; gap: 8px; border: none; margin: 0; padding: 0; min-width: 0; }
.field legend, .field > label { font-size: 13px; font-weight: 800; padding: 0; margin-bottom: 8px; }
.field > label { margin-bottom: 0; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 16px;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--bg);
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--green); background: var(--surface); }
.field .invalid { border-color: var(--accent); background: #FDF2F5; }

.options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.option {
  padding: 10px 12px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); background: var(--surface); text-align: left;
}
.option strong { display: block; font-size: 14px; }
.option span { font-size: 12px; color: var(--muted); }
.option[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }

.swatches { display: flex; gap: 10px; }
.swatch {
  width: 38px; height: 38px; border-radius: 50%;
  border: 3px solid var(--surface); box-shadow: 0 0 0 1.5px var(--line);
}
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ink); }

.qty { display: flex; align-items: center; height: 52px; border: 1.5px solid var(--line); border-radius: 999px; flex: none; }
.qty button { width: 44px; height: 100%; border: none; background: none; font-size: 20px; }
.qty output { min-width: 24px; text-align: center; font-weight: 800; }

/* ---------- Cart drawer ---------- */
.drawer-backdrop { position: fixed; inset: 0; z-index: 30; background: rgba(28, 36, 32, .45); }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 31;
  width: min(420px, 100%); background: var(--surface);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .3s cubic-bezier(.2, .7, .2, 1);
}
.drawer.is-open { transform: none; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.drawer__head h2 { font-family: var(--font-display); font-weight: 600; font-size: 20px; }
.drawer__list { flex: 1; overflow-y: auto; padding: 8px 24px; }
.drawer__empty { flex: 1; padding: 40px 24px; color: var(--muted); text-align: center; }
.drawer__foot { padding: 20px 24px 24px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; justify-content: space-between; color: var(--muted); }
.row strong { color: var(--ink); }
.row--total { font-size: 18px; color: var(--ink); margin-bottom: 8px; }

.line { display: grid; grid-template-columns: 76px 1fr auto; gap: 14px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: none; }
.line__img { width: 76px; height: 92px; border-radius: var(--radius-sm); background: var(--tile); object-fit: contain; }
.line__name { font-weight: 700; }
.line__meta { font-size: 13px; color: var(--muted); }
.line__price { font-weight: 800; font-size: 14px; }
.line__ctrl { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.mini-qty { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; }
.mini-qty button { width: 32px; height: 32px; border: none; background: none; }
.mini-qty span { min-width: 18px; text-align: center; font-weight: 700; font-size: 14px; }
.remove { border: none; background: none; font-size: 12px; color: var(--muted); text-decoration: underline; padding: 0; }

/* ---------- Checkout ---------- */
.checkout { padding: 40px 36px 32px; display: flex; flex-direction: column; gap: 16px; }
.checkout h2 { font-family: var(--font-display); font-weight: 600; font-size: 26px; padding-right: 48px; }
.checkout h3 { font-size: 15px; font-weight: 800; margin-top: 10px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--green); }
.pay { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pay label {
  display: flex; align-items: center; gap: 10px; padding: 14px;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); cursor: pointer;
}
.pay label:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.pay input { accent-color: var(--ink); width: 18px; height: 18px; }
.pay strong { display: block; font-size: 14px; }
.pay small { color: var(--muted); font-size: 12px; }
.checkout__total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 16px; border-top: 1px solid var(--line); font-weight: 700; }
.checkout__total strong { font-family: var(--font-display); font-size: 24px; font-weight: 600; }
.form-error { color: var(--accent); font-weight: 600; font-size: 14px; }

.success { padding: 56px 36px 40px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.success__icon { width: 72px; height: 72px; border-radius: 50%; background: #DDE8DF; color: var(--green); display: grid; place-items: center; margin-bottom: 8px; }
.success__icon svg { width: 34px; height: 34px; stroke-width: 2.4; }
.success h2 { font-family: var(--font-display); font-weight: 600; font-size: 26px; }
.success form { margin-top: 16px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 40;
  transform: translate(-50%, 24px); opacity: 0; pointer-events: none;
  padding: 14px 22px; border-radius: 999px;
  background: var(--ink); color: var(--bg); font-weight: 700; font-size: 14px;
  transition: all .3s;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nav { gap: 22px; }
}
@media (max-width: 860px) {
  .nav { display: none; }
  .hero { padding: 32px 0 56px; }
  .hero__inner, .about { grid-template-columns: 1fr; gap: 36px; }
  .hero__visual { max-width: 520px; width: 100%; margin: 0 auto; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .steps { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .pm { grid-template-columns: 1fr; }
  .pm__media { min-height: 0; height: 340px; }
  .section { padding: 64px 0; }
}
@media (max-width: 520px) {
  .container { padding: 0 16px; }
  .header__inner { height: 66px; }
  .logo__img { width: 42px; height: 42px; }
  .logo__text strong { font-size: 16px; }
  .cart-btn__label { display: none; }
  .cart-btn { padding: 0 8px 0 12px; }
  .card__desc { display: none; }
  .card--custom { grid-column: 1 / -1; }
  .custom { min-height: 0; }
  .card__media { border-radius: var(--radius); }
  .form-grid, .pay { grid-template-columns: 1fr; }
  .pm__body, .checkout { padding: 28px 20px 24px; }
  .footer__inner { grid-template-columns: 1fr; }
  .search { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
