:root {
  --bg: #fffaf7;
  --bg-muted: #fdf4f0;
  --primary: #f46b8a;
  --primary-dark: #d94c6f;
  --text: #262626;
  --text-muted: #777;
  --card-bg: #ffffff;
  --border-radius-lg: 24px;
  --border-radius-md: 16px;
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.06);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

/* base */

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

/* header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 250, 247, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.site-header .container {
  position: relative;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  max-width: 240px; /* можно вместить логотип побольше, не сдвигая меню */
}

.nav {
  display: flex;
  gap: 20px;
  font-size: 14px;
}

.nav a {
  padding: 4px 0;
  position: relative;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.2s ease;
}

.nav a:hover::after {
  width: 100%;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  padding: 10px 20px;
}

.btn,
.btn-primary,
.btn-ghost,
.btn-small {
  border-radius: 999px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(244, 107, 138, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(244, 107, 138, 0.4);
}

.btn-small {
  padding: 8px 16px;
  font-size: 13px;
  background: var(--primary);
  color: #fff;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-small:hover {
  background: var(--primary-dark);
}

.header-phone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 20px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}

.header-phone:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.burger {
  display: none;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: none;
  background: transparent;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 0;
}

.burger span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
}

/* promo banner */

.promo-banner {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  padding: 16px 0;
}

.promo-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  text-align: center;
}

.promo-icon {
  font-size: 24px;
}

.promo-content strong {
  display: block;
  font-size: 15px;
  margin-bottom: 2px;
}

.promo-content span {
  font-size: 13px;
  opacity: 0.95;
}

.promo-content .btn {
  background: #fff;
  color: var(--primary);
  font-weight: 600;
}

.promo-content .btn:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: translateY(-1px);
}

/* hero */

.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  padding: 80px 0;
  overflow: hidden;
  color: #fff;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4); /* Затемнение 40% */
  z-index: 2;
}

.hero-inner {
  position: relative;
  z-index: 3;
  width: 100%;
}

.hero-text {
  max-width: 600px;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 12px;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.1;
  margin: 0 0 20px;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hero-subtitle {
  margin: 0 0 32px;
  color: rgba(255, 255, 255, 0.95);
  font-size: 18px;
  max-width: 480px;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  backdrop-filter: blur(4px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.25);
}

.hero-benefits {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
}

.hero-benefits li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-benefits li::before {
  content: '✓';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  font-size: 11px;
  font-weight: bold;
}

/* Remove old hero styles that are no longer needed */
/* .hero-image, .hero-photo, .hero-badge removed */

/* sections */

.section {
  padding: 56px 0;
}

.section-muted {
  background: var(--bg-muted);
}

.section-title {
  font-size: 26px;
  margin: 0 0 8px;
}

.section-subtitle {
  margin: 0 0 32px;
  color: var(--text-muted);
}

.catalog-local-note {
  margin: -16px 0 28px;
  color: var(--text-muted);
  max-width: 720px;
}

/* cards, grid */

.grid {
  display: grid;
  gap: 24px;
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  background: var(--card-bg);
  border-radius: var(--border-radius-md);
  padding: 20px 18px;
  box-shadow: var(--shadow-soft);
}

.category-card {
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.category-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.category-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--border-radius-md);
  margin-bottom: 16px;
}

.category-card h3 {
  margin-top: 0;
  margin-bottom: 8px;
}

.category-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.product-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.product-card h3 {
  margin: 0;
  font-size: 16px;
}

.product-photo {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--border-radius-md);
  background: linear-gradient(135deg, #ffe3ea, #f7f6ff);
  overflow: hidden;
}

.product-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card:hover .product-photo img {
  transform: scale(1.05);
}

.product-desc {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.product-price {
  font-weight: 600;
}

/* delivery */

.delivery-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.delivery-card {
  background: #fff;
  border-radius: var(--border-radius-lg);
  padding: 24px 22px;
  box-shadow: var(--shadow-soft);
}

.list {
  padding-left: 18px;
  margin: 0;
  color: var(--text-muted);
}

.steps {
  padding-left: 18px;
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 14px;
}

/* reviews */

.section .reviews-carousel {
  overflow: hidden;
  position: relative;
  grid-column: 1 / -1;
  width: 100%;
}

.section .reviews-track {
  display: flex;
  gap: 18px;
  width: max-content;
  animation: reviews-marquee 34s linear infinite;
  will-change: transform;
  padding: 4px 2px;
}

.section .reviews-carousel:hover .reviews-track {
  animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
  .section .reviews-track {
    animation: none;
  }
}

@keyframes reviews-marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.review-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 14px;
  color: var(--text-muted);
  position: relative;
  padding: 18px 18px 16px;
  flex: 0 0 clamp(280px, 32vw, 420px);
}

.review-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

/* catalog filters */

.catalog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  margin: 20px 0 8px;
  padding: 16px;
  border-radius: 18px;
  background: #fffaf7;
  box-shadow: 0 12px 30px rgba(25, 17, 12, 0.08);
}

.catalog-filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #7a645a;
}

.catalog-filter-input {
  width: 160px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(201, 176, 161, 0.45);
  background: #fff;
  font-size: 14px;
}

.catalog-filter-actions {
  display: flex;
  gap: 10px;
}

.catalog-filter-reset {
  background: transparent;
  border: 1px solid rgba(201, 176, 161, 0.6);
  color: #7a645a;
}

.catalog-filter-count {
  font-size: 14px;
  color: #8a7367;
  margin-bottom: 12px;
}

/* custom bouquet toast */

.custom-bouquet-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: 320px;
  padding: 16px 18px;
  border-radius: 18px;
  background: #1f1a16;
  color: #fff;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1000;
}

.custom-bouquet-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.custom-bouquet-toast__content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.custom-bouquet-toast__title {
  font-weight: 600;
  font-size: 16px;
}

.custom-bouquet-toast__text {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
}

.custom-bouquet-toast .btn {
  align-self: flex-start;
  margin-top: 6px;
}

.custom-bouquet-toast__close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-size: 18px;
  cursor: pointer;
}

.review-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.review-avatar {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  object-fit: cover;
  flex: 0 0 auto;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 10px 18px rgba(0,0,0,0.06);
  background: #fff;
}

.review-avatar-fallback {
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #2b2b2b;
  background:
    radial-gradient(120% 120% at 20% 20%, rgba(255,255,255,0.85), rgba(255,255,255,0) 55%),
    linear-gradient(135deg, #ffe1e1, #fff2d8 55%, #e7f3ff);
}

.review-head-text {
  min-width: 0;
}

.review-author-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.review-rating {
  color: #ffc107;
  font-size: 12px;
  letter-spacing: 2px;
  flex: 0 0 auto;
}

.review-author {
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.review-product {
  color: var(--text-muted);
  font-size: 12px;
}

.review-body {
  margin: 0;
  line-height: 1.65;
  color: var(--text-muted);
}

/* footer */

.site-footer {
  background: #1b1b1b;
  color: #f5f5f5;
  padding: 40px 0 24px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  font-size: 14px;
}

.footer-logo {
  margin-bottom: 8px;
}

.footer-block h3 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 15px;
}

.footer-logo-img {
  height: 80px;
  width: auto;
  margin-bottom: 12px;
  filter: brightness(0) invert(1); /* белый цвет для логотипа на темном фоне */
  opacity: 0.9;
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: #fff;
  transition: all 0.2s ease;
}

.social-link:hover {
  background: var(--primary);
  transform: translateY(-2px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 24px;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #b3b3b3;
  flex-wrap: wrap;
  gap: 16px;
}

.copyright {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.privacy-link {
  color: #b3b3b3;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.3);
  transition: color 0.2s ease;
}

.privacy-link:hover {
  color: #fff;
  text-decoration-color: #fff;
}

/* catalog page */

.header.small {
  padding: 24px 0;
  background: var(--bg);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.header.small h1 {
  margin: 0;
  font-size: 28px;
}

.header.small .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.catalog {
  padding: 40px 0;
}

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

.catalog .card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.catalog .card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.catalog .card h3 {
  margin: 16px 16px 8px;
  font-size: 18px;
}

.catalog .card .price {
  margin: 0 16px;
  font-size: 20px;
  font-weight: 600;
  color: var(--primary);
}

.catalog .card .desc {
  margin: 8px 16px;
  color: var(--text-muted);
  font-size: 14px;
  flex-grow: 1;
}

.catalog .card .btn {
  margin: 16px;
  width: calc(100% - 32px);
  justify-content: center;
}

.footer {
  background: #1b1b1b;
  color: #f5f5f5;
  padding: 24px 0;
  margin-top: 40px;
}

.footer .container {
  text-align: center;
  font-size: 14px;
  color: #b3b3b3;
}

/* notifications */

.notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--primary);
  color: #fff;
  padding: 12px 20px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  font-size: 14px;
}

.notification.show {
  opacity: 1;
  transform: translateY(0);
}

/* loading state */

.loading {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-size: 16px;
}

.loading::after {
  content: '';
  display: block;
  width: 32px;
  height: 32px;
  margin: 16px auto 0;
  border: 3px solid var(--bg-muted);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.error-msg {
  text-align: center;
  padding: 40px;
  color: var(--primary-dark);
  font-size: 16px;
}

/* privacy policy page */

.section h1 {
  font-size: 32px;
  margin-bottom: 24px;
  color: var(--text);
}

.section h2 {
  font-size: 20px;
  margin: 32px 0 16px;
  color: var(--text);
}

.section ul {
  padding-left: 24px;
  color: var(--text-muted);
}

.section ul li {
  margin-bottom: 8px;
}

/* burger menu mobile */

/* состояние открытого меню (десктоп / планшет) */
.nav-open {
  display: flex !important;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  background: var(--card-bg);
  flex-direction: column;
  padding: 24px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  z-index: 100;
}

.burger-open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.burger-open span:nth-child(2) {
  opacity: 0;
}

.burger-open span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

.burger span {
  transition: all 0.3s ease;
}

.menu-open {
  overflow: hidden;
}

/* adaptive */

@media (max-width: 900px) {
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .catalog-filter-input {
    width: 100%;
  }

  .catalog-filter-actions {
    justify-content: flex-start;
  }

  .delivery-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .custom-bouquet-toast {
    left: 12px;
    right: 12px;
    bottom: 16px;
    max-width: none;
  }
  .header-inner {
    gap: 12px;
  }

  .logo img {
    height: 70px; /* поменьше логотип на мобильных, чтобы не занимал весь экран */
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 250, 247, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    padding: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  }

  .nav-open {
    display: flex;
  }

  .burger-open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .burger-open span:nth-child(2) {
    opacity: 0;
  }

  .burger-open span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }

  .burger span {
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .header-phone {
    display: none;
  }

  .burger {
    display: inline-flex;
  }

  .hero-actions {
    flex-direction: row;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 40px 0;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 6px;
  }

  /* catalog page: 2 cards per row like marketplaces */
  .catalog-page .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .catalog-page .product-card {
    padding: 14px 12px;
    gap: 8px;
  }

  .catalog-page .product-card h3 {
    font-size: 14px;
    line-height: 1.2;
  }

  .catalog-page .product-desc {
    font-size: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
  }

  .catalog-page .product-meta .btn.btn-small {
    padding: 10px 12px;
  }
}
