/* ==========================================================================
   Eufloria — общий стиль сайта
   Палитра: молочно-белый + нежно-розовые оттенки, текст — глубокий сливовый
   Шрифты: Cormorant Garamond (заголовки) + Geist (текст и интерфейс)
   ========================================================================== */

:root {
  --milk: #FFFBFC;
  --petal: #FDECF0;
  --blush: #F7C9D5;
  --rose: #E99AB0;
  --rose-deep: #B85C78;
  --rose-ink: #96405D;
  --plum: #4A2A36;
  --plum-soft: #7A5A66;
  --stem: #8FA88A;
  --line: #F1D3DB;

  --font-display: "Moniqa", "Cormorant Garamond", Georgia, serif;
  --font-text: "Geist", -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius-s: 10px;
  --radius-m: 18px;
  --radius-l: 28px;
  --shadow: 0 18px 40px -24px rgba(150, 64, 93, .45);
  --wrap: 1200px;
}

/* MONIQA — кириллический шрифт из подборки Awwwards. Хотите заголовки им?
   Скачайте шрифт с Behance, положите файл в frontend/fonts/Moniqa.woff2
   и уберите комментарий вокруг блока ниже — заголовки переключатся сами.
@font-face {
  font-family: "Moniqa";
  src: url("../fonts/Moniqa.woff2") format("woff2");
  font-display: swap;
}
*/

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.6;
  color: var(--plum);
  background-color: var(--milk);
  background-image: url("../img/pattern.svg");
  background-size: 320px;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.08;
  margin: 0;
  letter-spacing: -.01em;
}

h2 { font-size: clamp(34px, 4.6vw, 56px); }
h3 { font-size: 26px; }

.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }

.lead { font-size: 18px; color: var(--plum-soft); max-width: 60ch; }

.icon { width: 28px; height: 28px; flex: none; }
.icon-s { width: 20px; height: 20px; flex: none; }

:focus-visible { outline: 2px solid var(--rose-deep); outline-offset: 3px; border-radius: 6px; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 26px;
  border-radius: 999px; border: 1.5px solid var(--rose-deep);
  background: var(--rose-deep); color: #fff;
  font-weight: 500; text-decoration: none; cursor: pointer;
  transition: background .2s, color .2s, transform .2s;
}
.btn:hover { background: var(--rose-ink); border-color: var(--rose-ink); }
.btn:active { transform: scale(.98); }
.btn-ghost { background: rgba(255,255,255,.7); color: var(--rose-ink); }
.btn-ghost:hover { background: var(--petal); color: var(--rose-ink); }
.btn-s { min-height: 40px; padding: 0 18px; font-size: 14px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- шапка ---------- */
.topline {
  background: var(--petal);
  font-size: 13.5px; color: var(--plum-soft);
}
.topline .wrap { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; flex-wrap: wrap; }
.topline a { text-decoration: none; }

.header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 251, 252, .88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header .wrap { display: flex; align-items: center; gap: 28px; height: 74px; }

.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo img { width: 38px; height: 46px; }
.logo span {
  font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: 30px; color: var(--rose-ink); letter-spacing: .01em;
}

.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { text-decoration: none; font-size: 15px; color: var(--plum-soft); padding: 6px 0; border-bottom: 1.5px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--rose-ink); border-color: var(--blush); }

.cart-btn {
  position: relative; display: grid; place-items: center;
  width: 48px; height: 48px; border-radius: 50%;
  border: 1.5px solid var(--line); background: #fff; cursor: pointer;
}
.cart-btn:hover { border-color: var(--rose); }
.cart-count {
  position: absolute; top: -4px; right: -4px;
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
  background: var(--rose-deep); color: #fff; font-size: 12px; font-weight: 600;
  display: grid; place-items: center;
}
.cart-count[data-empty="true"] { display: none; }

.burger { display: none; background: none; border: 0; cursor: pointer; padding: 6px; }

/* ---------- первый экран ---------- */
.hero { padding: 64px 0 48px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }

.hero h1 {
  font-size: clamp(50px, 7.4vw, 104px);
  font-weight: 400;
  line-height: .98;
  color: var(--plum);
}
.hero h1 em { font-style: italic; color: var(--rose-ink); display: block; padding-left: .8em; }
.hero .lead { margin: 26px 0 34px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-facts { display: flex; gap: 28px; margin-top: 40px; flex-wrap: wrap; font-size: 14.5px; color: var(--plum-soft); }
.hero-facts div { display: flex; align-items: center; gap: 10px; }

/* арка-витрина с букетом — главный визуальный акцент страницы */
.arch { position: relative; justify-self: center; width: min(460px, 100%); }
.arch-frame {
  aspect-ratio: 4 / 5.2;
  border-radius: 999px 999px 26px 26px;
  overflow: hidden;
  border: 10px solid #fff;
  box-shadow: var(--shadow), 0 0 0 1px var(--line);
  background: var(--petal);
}
.arch-frame img { width: 100%; height: 100%; object-fit: cover; }
.arch-bud {
  position: absolute; left: -54px; bottom: 48px;
  width: 168px; aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  border: 8px solid #fff; box-shadow: var(--shadow);
}
.arch-bud img { width: 100%; height: 100%; object-fit: cover; }
.arch-doodle { position: absolute; pointer-events: none; }
.arch-doodle.d1 { right: -46px; top: 40px; width: 120px; transform: rotate(14deg); }
.arch-doodle.d2 { left: 30px; top: -30px; width: 90px; transform: rotate(-18deg); }
.arch-note {
  position: absolute; right: -18px; bottom: -18px;
  background: #fff; border-radius: 18px; padding: 14px 18px;
  box-shadow: var(--shadow); font-size: 14px; max-width: 220px;
}
.arch-note b { display: block; font-family: var(--font-display); font-size: 22px; font-weight: 600; color: var(--rose-ink); }

/* ---------- полоса преимуществ ---------- */
.perks { padding: 20px 0 70px; }
.perks ul {
  list-style: none; margin: 0; padding: 26px 30px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  background: rgba(255,255,255,.85); border: 1px solid var(--line); border-radius: var(--radius-l);
}
.perks li { display: flex; gap: 14px; align-items: flex-start; }
.perks b { display: block; font-weight: 600; }
.perks small { color: var(--plum-soft); font-size: 14px; line-height: 1.45; display: block; }
.perks img { width: 40px; height: 40px; }

/* ---------- заголовки секций ---------- */
.section { padding: 72px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 36px; flex-wrap: wrap; }
.section-head p { margin: 10px 0 0; color: var(--plum-soft); max-width: 52ch; }
.link-more { color: var(--rose-ink); font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--blush); }

/* ---------- коллекции ---------- */
.collections { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.collection {
  position: relative; display: block; text-decoration: none;
  border-radius: var(--radius-m); overflow: hidden; aspect-ratio: 3 / 4;
  background: var(--petal);
}
.collection:first-child { grid-row: span 2; aspect-ratio: auto; }
.collection img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.collection:hover img { transform: scale(1.04); }
.collection div {
  position: absolute; left: 10px; right: 10px; bottom: 10px;
  background: rgba(255, 251, 252, .93); border-radius: 14px; padding: 12px 14px;
}
.collection b { font-family: var(--font-display); font-size: 22px; font-weight: 600; display: block; line-height: 1.1; }
.collection small { color: var(--plum-soft); }

/* ---------- карточки товаров ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 26px 20px; }

.card { display: flex; flex-direction: column; }
.card-photo {
  position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius-m); overflow: hidden;
  background: var(--petal); cursor: pointer; border: 0; padding: 0; width: 100%;
}
.card-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card-photo:hover img { transform: scale(1.04); }
.badge {
  position: absolute; top: 12px; left: 12px;
  background: #fff; color: var(--rose-ink); border-radius: 999px;
  font-size: 12.5px; font-weight: 600; padding: 4px 10px;
}
.badge.sale { background: var(--rose-deep); color: #fff; }
.badge + .badge { top: 44px; }
.card h3 { font-family: var(--font-text); font-size: 16.5px; font-weight: 500; margin: 14px 0 4px; line-height: 1.3; }
.card .price-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }
.price { font-weight: 600; font-size: 17px; }
.price s { color: var(--plum-soft); font-weight: 400; font-size: 14px; margin-left: 6px; }
.add-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1.5px solid var(--blush); background: #fff; border-radius: 999px;
  padding: 7px 14px; font-size: 14px; cursor: pointer; color: var(--rose-ink);
}
.add-btn:hover { background: var(--petal); border-color: var(--rose); }
.add-btn.in-cart { background: var(--rose-deep); border-color: var(--rose-deep); color: #fff; }

/* ---------- блок доставки ---------- */
.delivery {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--petal), #fff);
  border: 1px solid var(--line); border-radius: 40px;
  padding: clamp(32px, 6vw, 70px);
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center;
}
.delivery h2 { font-size: clamp(38px, 5.4vw, 68px); }
.delivery ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.delivery li { display: flex; gap: 14px; align-items: center; background: #fff; border-radius: 16px; padding: 14px 18px; border: 1px solid var(--line); }

/* ---------- галерея ---------- */
.gallery { columns: 4 220px; column-gap: 14px; }
.gallery img { width: 100%; margin-bottom: 14px; border-radius: 16px; break-inside: avoid; background: var(--petal); }

/* ---------- контакты ---------- */
.contacts { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.contact-card { background: rgba(255,255,255,.9); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 30px; }
.contact-line { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.contact-line:last-child { border-bottom: 0; }
.contact-line a { color: var(--rose-ink); font-weight: 500; text-decoration: none; }
.contact-line small { display: block; color: var(--plum-soft); }
.hours { width: 100%; border-collapse: collapse; font-size: 15px; }
.hours td { padding: 9px 0; border-bottom: 1px dashed var(--line); }
.hours td:last-child { text-align: right; }
.hours tr.today td { color: var(--rose-ink); font-weight: 600; }
.open-now { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; margin-top: 16px; color: var(--plum-soft); }
.open-now i { width: 9px; height: 9px; border-radius: 50%; background: var(--stem); }
.open-now.closed i { background: var(--rose); }

/* ---------- карта ---------- */
.map-cut {
  position: relative; border-radius: 40px 40px 0 0; overflow: hidden;
  border: 1px solid var(--line); border-bottom: 0; height: 460px; background: var(--petal);
}
.map-cut iframe { width: 100%; height: 100%; border: 0; display: block; }
.map-cut .map-label {
  position: absolute; left: 20px; top: 20px; z-index: 2;
  background: #fff; border-radius: 16px; padding: 14px 18px; box-shadow: var(--shadow); max-width: 300px; font-size: 14.5px;
}
.map-label b { font-family: var(--font-display); font-size: 22px; display: block; }

/* ---------- подвал ---------- */
.footer { background: var(--plum); color: #F6E6EB; padding: 54px 0 30px; font-size: 14.5px; }
.footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer a { color: #fff; text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer .logo span { color: #fff; }
.footer ul { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.footer h4 { margin: 0; font-size: 15px; font-weight: 600; color: var(--blush); }
.footer .copy { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.15); padding-top: 22px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: #D9BFC8; }

/* ---------- каталог ---------- */
.page-head { padding: 52px 0 26px; }
.page-head h1 { font-size: clamp(46px, 6vw, 80px); font-weight: 400; }
.page-head p { color: var(--plum-soft); margin: 12px 0 0; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chip {
  border: 1.5px solid var(--line); background: #fff; border-radius: 999px;
  padding: 8px 16px; font-size: 14.5px; cursor: pointer; white-space: nowrap;
}
.chip:hover { border-color: var(--rose); }
.chip[aria-pressed="true"] { background: var(--rose-deep); border-color: var(--rose-deep); color: #fff; }

.toolbar {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
  background: rgba(255,255,255,.9); border: 1px solid var(--line); border-radius: var(--radius-m);
  padding: 12px; margin-bottom: 28px;
}
.toolbar .search { flex: 1 1 220px; position: relative; }
.toolbar .search img { position: absolute; left: 12px; top: 50%; translate: 0 -50%; width: 22px; }
.toolbar .search input { padding-left: 42px; }
.toolbar .count { margin-left: auto; color: var(--plum-soft); font-size: 14px; }

input, select, textarea {
  font: inherit; color: var(--plum);
  width: 100%; min-height: 46px; padding: 10px 14px;
  border: 1.5px solid var(--line); border-radius: 12px; background: #fff;
}
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--rose); box-shadow: 0 0 0 3px var(--petal); }
.toolbar select { width: auto; }
.toolbar .price-input { width: 110px; }

.demo-note { background: #FFF4D9; border: 1px solid #F1DFAE; border-radius: 12px; padding: 10px 14px; font-size: 14px; margin-bottom: 18px; }
.empty { text-align: center; padding: 60px 20px; color: var(--plum-soft); }
.empty img { width: 64px; margin: 0 auto 10px; opacity: .7; }

/* ---------- модальное окно товара ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.backdrop { position: fixed; inset: 0; background: rgba(74, 42, 54, .38); }
.modal-box {
  position: relative; background: var(--milk); border-radius: var(--radius-l);
  width: min(900px, 100%); max-height: calc(100vh - 32px); overflow: auto;
  display: grid; grid-template-columns: 1fr 1fr;
}
.modal-box img { width: 100%; height: 100%; object-fit: cover; min-height: 360px; }
.modal-body { padding: 34px; display: flex; flex-direction: column; gap: 14px; }
.modal-body h2 { font-size: 42px; }
.modal-body .price { font-size: 24px; }
.close-x {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff;
  font-size: 22px; line-height: 1; cursor: pointer; box-shadow: var(--shadow);
}

/* ---------- корзина ---------- */
.drawer { position: fixed; inset: 0; z-index: 70; }
.drawer[hidden] { display: none; }
.drawer-panel {
  position: absolute; right: 0; top: 0; bottom: 0; width: min(460px, 100%);
  background: var(--milk); display: flex; flex-direction: column;
  box-shadow: -20px 0 60px -30px rgba(74,42,54,.5);
  animation: slide-in .28s ease;
}
@keyframes slide-in { from { transform: translateX(40px); opacity: 0; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 34px; }
.drawer-head .close-x { position: static; box-shadow: none; background: var(--petal); }
.drawer-body { flex: 1; overflow: auto; padding: 18px 24px; }
.drawer-foot { padding: 18px 24px 24px; border-top: 1px solid var(--line); background: #fff; }

.cart-item { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.cart-item img { width: 72px; height: 88px; object-fit: cover; border-radius: 12px; background: var(--petal); }
.cart-item b { font-weight: 500; display: block; line-height: 1.3; }
.qty { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; border: 1.5px solid var(--line); border-radius: 999px; }
.qty button { width: 32px; height: 32px; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.qty button img { width: 18px; }
.qty span { min-width: 22px; text-align: center; font-weight: 600; }
.remove { border: 0; background: none; cursor: pointer; opacity: .6; padding: 6px; }
.remove:hover { opacity: 1; }
.remove img { width: 22px; }

.total-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.total-row b { font-size: 24px; font-family: var(--font-display); font-weight: 600; }
.total-row small { color: var(--plum-soft); }

.checkout { display: grid; gap: 12px; }
.checkout h3 { font-family: var(--font-text); font-size: 15px; font-weight: 600; margin: 10px 0 0; }
.checkout label { display: grid; gap: 5px; font-size: 14px; color: var(--plum-soft); }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; background: var(--petal); padding: 5px; border-radius: 14px; }
.seg label { display: block; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; text-align: center; padding: 9px 4px; border-radius: 10px; cursor: pointer; font-size: 14px; color: var(--plum); }
.seg input:checked + span { background: #fff; color: var(--rose-ink); font-weight: 600; box-shadow: 0 2px 8px -4px rgba(150,64,93,.5); }
.seg input:focus-visible + span { outline: 2px solid var(--rose-deep); }
.check { display: flex !important; grid-template-columns: none; gap: 10px !important; align-items: flex-start; }
.check input { width: 18px; min-height: 18px; margin-top: 3px; accent-color: var(--rose-deep); }
.form-error { color: #B3261E; font-size: 14px; }
.success { text-align: center; padding: 40px 10px; }
.success img { width: 80px; margin: 0 auto 14px; }
.success h3 { font-size: 34px; margin-bottom: 8px; }

/* ---------- уведомление ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; translate: -50% 0; z-index: 90;
  background: var(--plum); color: #fff; padding: 12px 20px; border-radius: 999px;
  font-size: 14.5px; box-shadow: var(--shadow);
  transition: opacity .25s, transform .25s;
}
.toast:not(.show) { opacity: 0; transform: translateY(12px); pointer-events: none; }

/* ---------- адаптив ---------- */
@media (max-width: 980px) {
  .hero .wrap, .delivery, .contacts { grid-template-columns: 1fr; }
  .arch { margin-top: 10px; width: min(380px, 84%); }
  .perks ul { grid-template-columns: 1fr 1fr; }
  .collections { grid-template-columns: 1fr 1fr; }
  .collection:first-child { grid-row: auto; aspect-ratio: 3 / 4; }
  .footer .wrap { grid-template-columns: 1fr 1fr; }
  .modal-box { grid-template-columns: 1fr; }
  .modal-box img { min-height: 0; max-height: 46vh; }
}

@media (max-width: 760px) {
  .nav {
    position: fixed; inset: 74px 0 auto 0; flex-direction: column; gap: 0;
    background: var(--milk); border-bottom: 1px solid var(--line); padding: 8px 16px 16px;
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .burger { display: block; margin-left: auto; }
  .header .wrap { gap: 12px; }
  .logo span { font-size: 26px; }
  .hero { padding-top: 36px; }
  .hero h1 em { padding-left: .4em; }
  .arch-bud { left: -18px; width: 120px; }
  .arch-doodle.d1 { right: -18px; width: 90px; }
  .arch-note { right: -6px; }
  .perks ul { grid-template-columns: 1fr; padding: 22px; }
  .section { padding: 52px 0; }
  .grid { grid-template-columns: 1fr 1fr; gap: 20px 12px; }
  .add-btn span { display: none; }
  .footer .wrap { grid-template-columns: 1fr; }
  .map-cut { height: 380px; border-radius: 28px 28px 0 0; }
  .topline .wrap { justify-content: center; }
  .topline .hide-s { display: none; }
  .toolbar .count { margin-left: 0; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
