/* === переменные === */
:root {
  --bg: #f5efe6;
  --primary: #56635f;
  --secondary: #8c9a96;
  --accent: #e6ded2;
  --white: #ffffff;
  --radius: 12px;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Helvetica Neue", "Segoe UI", sans-serif;
}

body {
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--primary);
}

/* === пузырьки === */
.bubbles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.bubbles .bubble {
  position: absolute;
  bottom: -8rem;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.6) 25%, rgba(255,255,255,0.2) 55%, rgba(255,255,255,0.05) 75%, rgba(255,255,255,0) 100%);
  border: 1px solid rgba(6, 84, 102, 0.9);
  box-shadow: 0 0 6px rgba(255,255,255,0.35), inset 0 0 4px rgba(255,255,255,0.6);
  animation: rise var(--dur) linear var(--delay) infinite;
}
.bubbles .bubble::after {
  content: "";
  position: absolute;
  top: 22%;
  left: 28%;
  width: 32%;
  height: 32%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.4) 60%, rgba(255,255,255,0) 100%);
  transform: translate(-50%, -50%);
}
@keyframes rise {
  0% { transform: translateY(0) scale(1); opacity: 0.9; }
  100% { transform: translateY(-120vh) scale(1.25); opacity: 0; }
}

/* === навигация === */
header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 10;
}
nav {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 1rem 0;
}
nav button {
  background: none;
  border: none;
  font-size: 1.05rem;
  cursor: pointer;
  color: var(--primary);
  padding-bottom: 0.25rem;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
}
nav button.active,
nav button:hover { border-color: var(--secondary); }

/* === секции === */
section {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1rem;
  display: none;
}
section.active { display: block; }

/* === товары === */
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.controls input,
.controls select {
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  min-width: 180px;
}

.grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s;
  position: relative;
  z-index: 2;
}
.card:hover { transform: translateY(-4px); }
.card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.card .info { padding: 1rem; display: flex; flex-direction: column; gap: 0.4rem; }
.price { display: none; }
.tag { font-size: 0.8rem; color: var(--secondary); }

/* === статьи === */
.article-card { cursor: pointer; }
.article-card img { aspect-ratio: 16/9; }
.article-card h3 { margin: 0.5rem 0 0.3rem; }

/* === о нас === */
.about { line-height: 1.6; font-size: 1.05rem; }
    /* логотип внутри шапки */
    .brand-logo {
      width: 60px;
      height: 60px;
      border-radius: 50%;
      object-fit: cover;
      margin-right: 1.25rem;
      flex-shrink: 0;
      filter: drop-shadow(0 2px 4px rgba(0,0,0,.08));
    }

    /* «мыльная» шапка */
    .nav-wrapper {
      max-width: 1100px;
      margin: .75rem auto;
      padding: .65rem 1.5rem;
      background: rgba(255,255,255,.75);
      backdrop-filter: blur(6px);
      border-radius: 60px;                /* скругление даёт форму таблетке мыла */
      box-shadow: 0 6px 18px rgba(0,0,0,.05);
      display: flex;
      align-items: center;
      justify-content: space-between;
      position: relative;
      overflow: hidden;
    }

    /* маленькие пузырьки внутри шапки */
    .nav-wrapper::before,
    .nav-wrapper::after {
      content: "";
      position: absolute;
      border-radius: 50%;
      background: radial-gradient(circle at 35% 35%, rgba(255,255,255,.9) 0%, rgba(255,255,255,.3) 60%, rgba(255,255,255,0) 100%);
      opacity: .6;
      animation: float 8s ease-in-out infinite;
      pointer-events: none;
    }
    .nav-wrapper::before {
      width: 82px;
      height: 82px;
      top: -30px;
      left: -20px;
    }
    .nav-wrapper::after {
      width: 50px;
      height: 50px;
      bottom: -20px;
      right: 40px;
      animation-delay: -2s;
    }

    @keyframes float {
      0%, 100% { transform: translateY(0); }
      50%      { transform: translateY(-18px); }
    }

    /* кнопки навигации переработал под pill‑tabs */
    nav {
      display: flex;
      gap: 1.5rem;
    }
    nav button {
      background: none;
      border: none;
      font-size: 1rem;
      color: var(--primary);
      padding: .55rem 1.25rem;
      border-radius: 40px;
      position: relative;
      cursor: pointer;
      transition: color .25s;
    }
    nav button::after {               /* подсветка активной/hover вкладки */
      content: "";
      position: absolute;
      inset: 0;
      border-radius: 40px;
      background: var(--accent);
      opacity: 0;
      transition: opacity .25s;
      z-index: -1;
    }
    nav button:hover { color: var(--secondary); }
    nav button:hover::after { opacity: .3; }
    nav button.active { font-weight: 600; }
    nav button.active::after { opacity: .45; }

    @media (max-width: 600px) {
      .nav-wrapper { border-radius: 40px; padding: .55rem 1rem; }
      .brand-logo { width: 48px; height: 48px; margin-right: .8rem; }
      nav { gap: .9rem; }
    }

@import url('https://fonts.googleapis.com/css2?family=Pacifico&family=Inter:wght@400;600&display=swap');

#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #f7f3ed;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s cubic-bezier(0.4,0,0.2,1);
  opacity: 1;
}
#preloader.fade-out {
  opacity: 0;
  pointer-events: none;
}
.preloader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
}
.logo-anim {
  text-align: center;
  margin-bottom: 1.5rem;
}
.brand-anim {
  font-family: 'Pacifico', cursive;
  font-size: 2.8rem;
  color: #56635f;
  letter-spacing: 2px;
  animation: brandFadeIn 1.2s cubic-bezier(.6,0,.4,1) 0.2s both;
}
.subtitle-anim {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  color: #8c9a96;
  letter-spacing: 1px;
  display: block;
  margin-top: 0.5rem;
  animation: subtitleFadeIn 1.2s cubic-bezier(.6,0,.4,1) 0.7s both;
}
@keyframes brandFadeIn {
  0% { opacity: 0; transform: translateY(-40px) scale(0.8); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes subtitleFadeIn {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}
.preloader-graphics {
  position: relative;
  width: 260px;
  height: 90px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0;
}
.bubble-anim {
  position: relative;
  width: 120px;
  height: 90px;
  pointer-events: none;
  z-index: 2;
}
.bubble {
  position: absolute;
  bottom: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff 0%, #e6ded2 80%, #fff0 100%);
  opacity: 0.7;
  animation: bubbleRise 4.5s infinite cubic-bezier(0.4,0,0.2,1);
}
.bubble:nth-child(1) { left: 10px; animation-delay: 0s; }
.bubble:nth-child(2) { left: 50px; animation-delay: 1s; }
.bubble:nth-child(3) { left: 90px; animation-delay: 2s; }
.bubble:nth-child(4) { left: 110px; animation-delay: 3s; }
@keyframes bubbleRise {
  0% { transform: translateY(0) scale(1); opacity: 0.7; }
  60% { opacity: 1; }
  100% { transform: translateY(-70px) scale(1.2); opacity: 0; }
}
.soap-anim {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, #e6ded2 70%, #fff 100%);
  border-radius: 12px 18px 16px 18px / 18px 12px 18px 16px;
  box-shadow: 0 2px 10px #e6ded2cc;
  position: relative;
  z-index: 1;
  animation: soapWobble 1.6s infinite alternate cubic-bezier(.7,0,.3,1);
}
@keyframes soapWobble {
  0% { transform: rotate(-6deg) scale(1); }
  100% { transform: rotate(8deg) scale(1.08); }
}
.candle-svg {
  width: 38px;
  height: 70px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 2;
}
.candle-left { margin-right: 24px; }
.candle-right { margin-left: 24px; }
.candle-svg svg { display: block; }
.candle-svg .flame {
  transform-origin: 50% 100%;
  animation: flameWobble 1.2s infinite alternate cubic-bezier(.7,0,.3,1);
}
.candle-right .flame {
  animation: flameWobbleR 1.1s infinite alternate cubic-bezier(.7,0,.3,1);
}
@keyframes flameWobble {
  0% { transform: scaleY(1) rotate(-5deg); opacity: 0.92; }
  50% { transform: scaleY(1.08) rotate(5deg); opacity: 1; }
  100% { transform: scaleY(0.95) rotate(-3deg); opacity: 0.85; }
}
@keyframes flameWobbleR {
  0% { transform: scaleY(1) rotate(4deg); opacity: 0.9; }
  50% { transform: scaleY(1.12) rotate(-4deg); opacity: 1; }
  100% { transform: scaleY(0.97) rotate(2deg); opacity: 0.8; }
}

/* Фоновые пузыри на landing */
.background-bubbles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.background-bubbles .bubble {
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff 0%, #e6ded2 80%, #fff0 100%);
  opacity: 0.18;
  animation: floatBubble 18s infinite ease-in-out;
}
.background-bubbles .bubble:nth-child(1) { top: 20%; left: 10%; animation-delay: 0s; animation-duration: 22s; }
.background-bubbles .bubble:nth-child(2) { top: 60%; left: 30%; animation-delay: 2s; animation-duration: 20s; }
.background-bubbles .bubble:nth-child(3) { top: 30%; left: 70%; animation-delay: 4s; animation-duration: 19s; }
.background-bubbles .bubble:nth-child(4) { top: 80%; left: 80%; animation-delay: 6s; animation-duration: 24s; }
.background-bubbles .bubble:nth-child(5) { top: 40%; left: 50%; animation-delay: 8s; animation-duration: 21s; }
.background-bubbles .bubble:nth-child(6) { top: 70%; left: 20%; animation-delay: 10s; animation-duration: 23s; }
@keyframes floatBubble {
  0% { transform: translate(0, 0) scale(1); opacity: 0.18; }
  25% { transform: translate(100px, -50px) scale(1.2); opacity: 0.22; }
  50% { transform: translate(50px, -100px) scale(1.1); opacity: 0.18; }
  75% { transform: translate(-50px, -50px) scale(0.95); opacity: 0.13; }
  100% { transform: translate(0, 0) scale(1); opacity: 0.18; }
}

/* Загрузочные пузыри */
#preloader .bubble-anim {
  position: relative;
  width: 120px;
  height: 90px;
  pointer-events: none;
  z-index: 2;
}
#preloader .bubble {
  position: absolute;
  bottom: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff 0%, #e6ded2 80%, #fff0 100%);
  opacity: 0.7;
  animation: bubbleRise 4.5s infinite cubic-bezier(0.4,0,0.2,1);
}
#preloader .bubble:nth-child(1) { left: 10px; animation-delay: 0s; }
#preloader .bubble:nth-child(2) { left: 50px; animation-delay: 1s; }
#preloader .bubble:nth-child(3) { left: 90px; animation-delay: 2s; }
#preloader .bubble:nth-child(4) { left: 110px; animation-delay: 3s; }
@keyframes bubbleRise {
  0% { transform: translateY(0) scale(1); opacity: 0.7; }
  60% { opacity: 1; }
  100% { transform: translateY(-70px) scale(1.2); opacity: 0; }
}