/* =========================================================
   Связаны Flowers — component layout (mobile-first)
   ========================================================= */

/* ============ icon button ============ */
.iconbtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: transparent; border: 1px solid transparent; color: var(--ink);
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.iconbtn:hover { background: rgba(42,37,32,.05); }
.iconbtn--sm { width: 38px; height: 38px; border-color: var(--line); background: var(--paper); }
.iconbtn--sm:hover { border-color: var(--ink); }
.iconbtn--xs { width: 28px; height: 28px; }
.iconbtn--danger:hover { color: #b0493f; border-color: #d8a39c; background: #f7ebe8; }
.iconbtn:disabled { opacity: .35; cursor: not-allowed; }

/* ============ header ============ */
.hdr {
  position: sticky; top: 0; z-index: 50;
  background: rgba(239,231,214,.82);
  backdrop-filter: blur(12px) saturate(1.1);
  border-bottom: 1px solid var(--line-soft);
}
.hdr__bar { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 12px; }
.hdr__nav { display: none; }
.hdr__actions { display: flex; align-items: center; gap: 4px; }
.cartbtn { position: relative; }
.cartbtn__dot {
  position: absolute; top: 4px; right: 4px; min-width: 18px; height: 18px; padding: 0 4px;
  background: var(--rose-deep); color: #fff; border-radius: 999px;
  font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--cream);
}
.hdr__sheet {
  display: flex; flex-direction: column; gap: 2px; padding: 8px 14px 18px;
  border-top: 1px solid var(--line-soft); background: var(--cream);
}
.hdr__sheetlink {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 6px; font-size: 19px; font-weight: 600; color: var(--ink);
  background: none; border: 0; border-bottom: 1px solid var(--line-soft); text-align: left;
}
.hdr__sheetlink.is-active { color: var(--rose-deep); }
.hdr__sheetlink svg { opacity: .4; }
.hdr__sheetcall { display: flex; align-items: center; gap: 9px; padding: 16px 6px 4px; font-weight: 700; color: var(--rose-deep); }

@media (min-width: 880px) {
  .hdr__burger { display: none; }
  .hdr__nav { display: flex; gap: 4px; }
  .hdr__link {
    background: none; border: 0; padding: 10px 15px; border-radius: 999px; white-space: nowrap;
    font-size: 15px; font-weight: 600; color: var(--ink-soft); transition: all .16s ease;
  }
  .hdr__link:hover { color: var(--ink); background: rgba(42,37,32,.04); }
  .hdr__link.is-active { color: var(--ink); background: var(--paper); box-shadow: var(--shadow-sm); }
}

/* ============ hero ============ */
.hero { padding: 30px 0 18px; text-align: center; position: relative; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; left: 50%; top: 40px; transform: translateX(-50%);
  width: 520px; height: 520px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(197,138,134,.16), transparent 62%); z-index: 0;
}
.hero__inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; }
.hero__logo {
  width: 168px; height: 168px; border-radius: 50%; object-fit: cover; margin: 18px 0 4px;
  box-shadow: 0 12px 40px rgba(42,37,32,.14);
}
.hero__title { font-size: clamp(34px, 9.5vw, 62px); font-weight: 600; margin-top: 14px; }
.hero__lead { color: var(--ink-soft); max-width: 480px; margin-top: 16px; font-size: 16.5px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 26px; }
.hero__strip {
  display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: center; margin-top: 34px;
  font-size: 13.5px; font-weight: 600; color: var(--ink-soft);
}
.hero__strip span { display: inline-flex; align-items: center; gap: 7px; }
.hero__strip svg { color: var(--rose-deep); }

@media (min-width: 760px) {
  .hero { padding: 56px 0 30px; }
  .hero__logo { width: 200px; height: 200px; }
}

/* ============ category grid ============ */
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.cat-card {
  display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line-soft);
  border-radius: var(--r-lg); overflow: hidden; text-align: left; padding: 0; cursor: pointer;
  box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.cat-card .ph { border-radius: 0; border: 0; border-bottom: 1px solid var(--line-soft); }
.cat-card__body { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding: 16px; }
.cat-card__count {
  display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--rose-deep);
  font-size: 15px; flex-shrink: 0;
}
@media (min-width: 760px) { .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 22px; } }
@media (min-width: 1000px) { .cat-grid { grid-template-columns: repeat(5, 1fr); } }

/* ============ product grid / card ============ */
.prod-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.prod {
  display: flex; flex-direction: column; background: var(--paper);
  border: 1px solid var(--line-soft); border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); cursor: pointer; transition: transform .2s ease, box-shadow .2s ease;
}
.prod:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.prod__media { position: relative; }
.prod__media .ph { border-radius: 0; border: 0; }
.prod__badge { position: absolute; top: 12px; left: 12px; }
.prod__body { display: flex; flex-direction: column; gap: 5px; padding: 14px; flex: 1; }
.prod__name { font-size: 16px; font-weight: 700; line-height: 1.25; }
.prod__desc { font-size: 13px; line-height: 1.4; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prod__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.prod__price { font-size: 17px; font-weight: 700; white-space: nowrap; }
.prod__add {
  width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--ink); color: var(--cream);
  display: grid; place-items: center; transition: background .18s ease, transform .15s ease;
}
.prod__add:hover { background: var(--rose-deep); }
.prod__add.is-added { background: var(--sage-deep); }
.prod__add:active { transform: scale(.92); }
@media (min-width: 700px) { .prod-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
@media (min-width: 1000px) { .prod-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 760px) { .prod__name { font-size: 18px; } }

/* ============ promise + cta band ============ */
.promise { display: grid; grid-template-columns: 1fr; gap: 28px; }
.promise__item { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.promise__ic {
  width: 56px; height: 56px; border-radius: 50%; background: var(--rose-tint); color: var(--rose-deep);
  display: grid; place-items: center; margin-bottom: 6px;
}
@media (min-width: 760px) { .promise { grid-template-columns: repeat(3, 1fr); gap: 30px; } }

.cta-band {
  display: flex; flex-direction: column; gap: 22px; background: var(--paper);
  border: 1px solid var(--line-soft); border-radius: var(--r-lg); padding: 30px;
  box-shadow: var(--shadow-sm);
}
.cta-band__btns { display: flex; flex-wrap: wrap; gap: 12px; }
@media (min-width: 760px) {
  .cta-band { flex-direction: row; align-items: center; justify-content: space-between; padding: 44px; }
}

/* ============ page head ============ */
.pagehead { padding: 30px 0 6px; border-bottom: 1px solid var(--line-soft); background: var(--cream-deep); }
.pagehead__title { font-size: clamp(30px, 8vw, 52px); font-weight: 600; margin-top: 12px; }
.reviews__avg { display: flex; align-items: center; gap: 10px; margin-top: 16px; }

/* ============ about ============ */
.about-lead { display: grid; grid-template-columns: 1fr; gap: 28px; }
.about-lead__media { max-width: 360px; }
.values { display: grid; grid-template-columns: 1fr; gap: 22px; }
.value { display: flex; flex-direction: column; gap: 6px; padding-top: 18px; border-top: 2px solid var(--line); }
.value__ic { width: 46px; height: 46px; border-radius: 50%; background: var(--sage-tint); color: var(--sage-deep); display: grid; place-items: center; margin-bottom: 6px; }
.about-gallery { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 760px) {
  .about-lead { grid-template-columns: 1.3fr .9fr; align-items: start; gap: 50px; }
  .values { grid-template-columns: repeat(2, 1fr); gap: 32px 40px; }
  .about-gallery { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1000px) { .values { grid-template-columns: repeat(4, 1fr); } }

/* ============ reviews ============ */
.reviews-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.review { background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--r-lg); padding: 24px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 14px; }
.review--ghost { border-style: dashed; background: var(--paper-2); box-shadow: none; }
.review__text { font-size: 16px; line-height: 1.55; flex: 1; }
.review__meta { display: flex; align-items: center; gap: 11px; }
.review__ava { width: 40px; height: 40px; border-radius: 50%; background: var(--cream-deep); color: var(--ink-soft); display: grid; place-items: center; flex-shrink: 0; }
.reviews-form-wrap { max-width: 720px; }
.reviews-form { padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.reviews-form__row { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 640px) {
  .reviews-grid { grid-template-columns: repeat(2, 1fr); }
  .reviews-form__row { grid-template-columns: 1.4fr 1fr; }
}
@media (min-width: 1000px) { .reviews-grid { grid-template-columns: repeat(3, 1fr); } }

/* ============ contacts + map ============ */
.contacts-grid { display: grid; grid-template-columns: 1fr; gap: 28px; }
.contacts-list { display: flex; flex-direction: column; gap: 14px; }
.contact-card {
  display: flex; align-items: center; gap: 16px; background: var(--paper);
  border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: 18px; box-shadow: var(--shadow-sm);
}
.contact-card__ic { width: 46px; height: 46px; border-radius: 50%; background: var(--rose-tint); color: var(--rose-deep); display: grid; place-items: center; flex-shrink: 0; }
.map { position: relative; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-sm); aspect-ratio: 16 / 11; }
.map__svg { width: 100%; height: 100%; display: block; }
.map__pin { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center; }
.map__dot { width: 40px; height: 40px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--rose-deep); display: grid; place-items: center; box-shadow: 0 6px 16px rgba(164,101,95,.5); position: relative; z-index: 2; }
.map__dot svg { transform: rotate(45deg); color: #fff; }
.map__pulse { position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%); width: 24px; height: 10px; border-radius: 50%; background: rgba(42,37,32,.18); }
.map__label { margin-top: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px; font-size: 12.5px; font-weight: 600; white-space: nowrap; box-shadow: var(--shadow-sm); }
@media (min-width: 860px) { .contacts-grid { grid-template-columns: 1fr 1.1fr; align-items: start; gap: 40px; } }

/* ============ catalog tools ============ */
.cat-tools { display: flex; flex-direction: column; gap: 14px; margin-bottom: 26px; }
.chips { display: flex; gap: 9px; padding-bottom: 4px; }
.search { display: flex; align-items: center; gap: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 0 14px; color: var(--ink-soft); }
.search input { border: 0; background: none; outline: none; padding: 13px 0; flex: 1; color: var(--ink); }
.search__clear { width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--cream-deep); color: var(--ink-soft); display: grid; place-items: center; }
@media (min-width: 760px) {
  .cat-tools { flex-direction: row; align-items: center; justify-content: space-between; }
  .chips { flex-wrap: wrap; }
  .search { min-width: 280px; }
}

.empty { text-align: center; padding: 50px 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--ink-soft); }
.empty__ic { width: 62px; height: 62px; border-radius: 50%; background: var(--cream-deep); display: grid; place-items: center; }

/* ============ modal ============ */
.modal { position: fixed; inset: 0; z-index: 100; background: rgba(42,37,32,.5); backdrop-filter: blur(4px); display: flex; align-items: flex-end; justify-content: center; padding: 0; overflow-y: auto; animation: fade .2s ease; }
.modal__card { position: relative; background: var(--cream); width: 100%; max-width: 860px; border-radius: 22px 22px 0 0; padding: 22px; box-shadow: var(--shadow-lg); }
.modal__card--form { max-width: 520px; }
.modal__close { position: absolute; top: 12px; right: 12px; background: var(--paper); border: 1px solid var(--line); z-index: 3; }
.modal__grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.modal__media { max-width: 320px; margin: 0 auto; width: 100%; }
.modal__info { display: flex; flex-direction: column; }
.modal__price { font-size: 28px; font-weight: 700; margin: 16px 0 4px; }
.qty { display: inline-flex; align-items: center; gap: 4px; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 4px; align-self: flex-start; }
.qty button { width: 38px; height: 38px; border-radius: 50%; border: 0; background: transparent; color: var(--ink); display: grid; place-items: center; }
.qty button:hover { background: var(--cream-deep); }
.qty span { min-width: 30px; text-align: center; font-weight: 700; }
.qty--sm button { width: 30px; height: 30px; }
.qty--sm span { min-width: 22px; font-size: 14px; }
@media (min-width: 720px) {
  .modal { align-items: center; padding: 24px; }
  .modal__card { border-radius: var(--r-lg); padding: 30px; }
  .modal__grid { grid-template-columns: 1fr 1.1fr; gap: 34px; align-items: center; }
  .modal__media { max-width: none; }
}

/* ============ cart ============ */
.cart-layout { display: grid; grid-template-columns: 1fr; gap: 22px; }
.cart-main { display: flex; flex-direction: column; gap: 18px; }
.cart-lines { padding: 8px 16px; }
.cart-line { display: grid; grid-template-columns: 52px 1fr auto; grid-template-areas: "media info sum" "media qty rm"; gap: 6px 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.cart-line:last-child { border-bottom: 0; }
.cart-line__media { grid-area: media; width: 52px; height: 64px; }
.cart-line__media .ph { width: 100%; height: 100%; border-radius: 8px; }
.cart-line__media .ph__tag { display: none; }
.cart-line__info { grid-area: info; display: flex; flex-direction: column; gap: 2px; }
.cart-line__info strong { font-size: 15px; }
.cart-line .qty { grid-area: qty; }
.cart-line__sum { grid-area: sum; font-weight: 700; text-align: right; }
.cart-line__rm { grid-area: rm; justify-self: end; width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: var(--ink-faint); display: grid; place-items: center; }
.cart-line__rm:hover { color: #b0493f; background: #f7ebe8; }

.cart-form { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; background: var(--cream-deep); border-radius: 999px; padding: 5px; }
.seg__btn { display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; background: none; padding: 11px; border-radius: 999px; font-weight: 600; font-size: 14.5px; color: var(--ink-soft); transition: all .16s ease; }
.seg__btn.is-on { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-sm); }
.form-row { display: grid; grid-template-columns: 1fr; gap: 16px; }
.pickup-note { display: flex; align-items: center; gap: 10px; background: var(--sage-tint); color: var(--sage-deep); border-radius: var(--r-md); padding: 14px 16px; font-weight: 600; font-size: 14.5px; }
.check { display: flex; align-items: center; gap: 11px; font-size: 14.5px; cursor: pointer; color: var(--ink-soft); }
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check__box { width: 24px; height: 24px; border-radius: 7px; border: 1.5px solid var(--line); background: var(--paper); display: grid; place-items: center; color: transparent; flex-shrink: 0; transition: all .15s ease; }
.check input:checked + .check__box { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.cart-form__submit { margin-top: 6px; }

.cart-aside { position: relative; }
.cart-sum { padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.cart-sum__lines { display: flex; flex-direction: column; gap: 8px; }
.cart-sum__row { display: flex; justify-content: space-between; gap: 12px; font-size: 14.5px; }
.cart-sum__total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 4px; font-size: 16px; }
.cart-sum__total strong { font-size: 24px; }
@media (min-width: 400px) { .form-row { grid-template-columns: 1fr 1fr; } }
@media (min-width: 920px) {
  .cart-layout { grid-template-columns: 1.6fr 1fr; align-items: start; }
  .cart-aside { position: sticky; top: 80px; }
}

/* success */
.success__ic { width: 78px; height: 78px; border-radius: 50%; background: var(--sage-tint); color: var(--sage-deep); display: inline-grid; place-items: center; }
.success__sum { display: flex; justify-content: space-between; max-width: 280px; margin: 22px auto 0; padding: 14px 18px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); font-size: 16px; }
.success__sum strong { font-size: 18px; }
