/* ===================================================================
   Ruzzy — "Chat-first" identity layer (loaded last)
   Customers order by Telegram and phone, so the homepage opens on an
   order told as a conversation. Violet + white, Golos Text throughout.
   =================================================================== */

:root {
  --violet:       #4F2BD9;
  --violet-dark:  #3F1FC0;
  --violet-soft:  #EFEBFF;
  --ink:          #16132B;
  --mist:         #EEF0F7;   /* page canvas */
  --bubble:       #FFFFFF;
  --line:         #E4E3EE;
  --online:       #1F9E6E;
  --sale:         #D93A52;

  /* Remap legacy tokens so every page inherits the palette */
  --primary:        var(--violet);
  --primary-dark:   var(--violet-dark);
  --primary-ink:    var(--ink);
  --primary-light:  #DCD3FF;
  --primary-xlight: var(--violet-soft);
  --accent:         var(--violet);
  --secondary:      var(--ink);
  --red:            var(--sale);
  --r-ink:          var(--ink);
  --text:           var(--ink);
  --text-muted:     #55536B;
  --text-light:     #6E6C84;
  --bg:             var(--mist);
  --border:         var(--line);
  --border-light:   #EEEDF4;

  --font: 'Golos Text', system-ui, sans-serif;
}

/* Sticky header is 130px tall (108px on phones): keep anchors and focus clear of it */
html { scroll-padding-top: 146px; -webkit-tap-highlight-color: rgba(79,43,217,.12); }
@media (max-width: 768px) { html { scroll-padding-top: 124px; } }
body { font-family: var(--font); font-feature-settings: normal; letter-spacing: 0; }
a, button, input, select, textarea, label { touch-action: manipulation; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 1000;
  background: var(--violet); color: #fff;
  padding: .75rem 1.1rem; border-radius: 12px; font-weight: 600;
}
.skip-link:focus { top: 1rem; }
.nowrap { white-space: nowrap; }
h1, h2, h3, h4 { letter-spacing: -.02em; }

/* The hero carries the motion; cards no longer fade in on scroll. */
.anim-fade-up,
.anim-fade-up.anim-visible { opacity: 1 !important; transform: none !important; transition: none !important; }

/* ── Header ─────────────────────────────────────────────────────────── */
.site-header { border-bottom: 1px solid var(--line); }
.logo-icon {
  width: 34px; height: 34px;
  border-radius: 50% !important;
  background: var(--violet) !important;
  font-size: .85rem;
}
.logo-text { font-weight: 800; font-size: 1.2rem; letter-spacing: -.02em; }
.logo-text .accent { color: var(--violet); }
.search-form { border-radius: 12px !important; background: #F2F3F8 !important; border-color: transparent !important; }
.search-form:focus-within { border-color: var(--violet) !important; box-shadow: 0 0 0 3px rgba(79,43,217,.12) !important; }
.lang-btn { border-radius: 8px; }
.lang-btn.active, .lang-btn:hover { background: var(--violet); border-color: var(--violet); }
.badge-count { background: var(--violet); }
.cat-nav-link:hover, .cat-nav-link.active { border-bottom-color: var(--violet); }

/* ════════════════════════════════════════════════════════════════════
   HERO — copy on the left, a chat window acting out an order
   ════════════════════════════════════════════════════════════════════ */
.ch-hero { padding: 3.5rem 0 3rem; }
.ch-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
  gap: 4rem;
  align-items: center;
}
.ch-kicker {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: .95rem; font-weight: 500; color: #3B3A52;
  margin-bottom: 1.1rem;
}
.ch-kicker::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: var(--online);
  box-shadow: 0 0 0 4px rgba(31,158,110,.15);
}
.ch-title {
  font-weight: 800;
  font-size: clamp(2.3rem, 4.8vw, 4rem);
  line-height: 1.04;
  letter-spacing: -.035em;
  color: var(--ink);
  max-width: 14ch;
  margin-bottom: 1.4rem;
  text-wrap: balance;
}
.ch-sub {
  font-size: 1.125rem; line-height: 1.6;
  color: var(--text-muted);
  max-width: 34rem;
  margin-bottom: 2rem;
}
.ch-btns { display: flex; flex-wrap: wrap; gap: .75rem; }
.ch-btns .btn-primary { border-radius: 16px; padding: 1rem 1.9rem; font-size: 1.02rem; }
.ch-tg {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .95rem 1.5rem;
  border-radius: 16px;
  border: 1.5px solid #CFCBE8;
  background: #fff;
  font-weight: 600; font-size: 1rem;
  color: var(--ink);
  transition: border-color .18s, color .18s;
}
.ch-tg i { color: #229ED9; font-size: 1.15rem; }
.ch-tg:hover { border-color: var(--violet); color: var(--violet); }

/* Chat window */
.ch-window {
  background: #fff;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 32px 64px -40px rgba(40,20,120,.55), 0 0 0 1px rgba(22,19,43,.04);
}
.ch-window-head {
  display: flex; align-items: center; gap: .75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
}
.ch-window-head strong { display: block; font-size: .98rem; }
.ch-window-head small { display: block; font-size: .8rem; color: var(--text-light); }
.ch-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--violet); color: #fff;
  display: grid; place-items: center; font-size: .95rem;
}
.ch-thread {
  display: flex; flex-direction: column; gap: .6rem;
  padding: 1.1rem;
  background: #F7F7FB;
}
.ch-msg {
  max-width: 84%;
  padding: .65rem .9rem;
  border-radius: 18px;
  font-size: .95rem; line-height: 1.4;
  overflow-wrap: anywhere;
}
.ch-me   { align-self: flex-end;   background: var(--violet); color: #fff; border-bottom-right-radius: 6px; }
.ch-them { align-self: flex-start; background: var(--bubble); border: 1px solid #ECEBF3; border-bottom-left-radius: 6px; }
.ch-ticks { font-size: .7rem; opacity: .8; margin-left: .4rem; }

.ch-product {
  align-self: flex-start;
  width: 80%;
  background: #fff;
  border: 1px solid #ECEBF3;
  border-radius: 18px;
  overflow: hidden;
}
.ch-product-media { display: block; background: #F2F3F8; }
.ch-product-media img { width: 100%; height: 160px; object-fit: cover; }
.ch-product-body { padding: .7rem .9rem .85rem; display: flex; flex-direction: column; }
.ch-product-name {
  font-size: .92rem; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ch-product-name:hover { color: var(--violet); }
.ch-product-price { font-size: 1.15rem; font-weight: 700; margin: .15rem 0 .6rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ch-product-btn {
  width: 100%;
  border: 0; cursor: pointer;
  background: var(--violet-soft); color: var(--violet);
  border-radius: 10px;
  padding: .55rem;
  font: 600 .88rem/1.2 var(--font);
  transition: background .18s, color .18s;
}
.ch-product-btn:hover { background: var(--violet); color: #fff; }

.ch-typing {
  align-self: flex-start;
  display: inline-flex; gap: 4px;
  padding: .75rem .9rem;
  background: #fff; border: 1px solid #ECEBF3; border-radius: 18px;
}
.ch-typing i { width: 7px; height: 7px; border-radius: 50%; background: #B9B5D3; }

/* The one orchestrated moment: the conversation plays out on load */
@media (prefers-reduced-motion: no-preference) {
  .ch-thread > * { animation: ch-pop .45s cubic-bezier(.2,.8,.2,1) both; }
  .ch-thread > :nth-child(1) { animation-delay: .25s; }
  .ch-thread > :nth-child(2) { animation-delay: .9s; }
  .ch-thread > :nth-child(3) { animation-delay: 1.35s; }
  .ch-thread > :nth-child(4) { animation-delay: 2s; }
  .ch-thread > :nth-child(5) { animation-delay: 2.7s; }
  .ch-thread > :nth-child(6) { animation-delay: 3.3s; }
  .ch-typing i { animation: ch-dot 1.2s ease-in-out 3.6s 3 both; }
  .ch-typing i:nth-child(2) { animation-delay: 3.75s; }
  .ch-typing i:nth-child(3) { animation-delay: 3.9s; }
  @keyframes ch-pop { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
  @keyframes ch-dot { 0%, 60%, 100% { opacity: .35; } 30% { opacity: 1; } }
}

@media (max-width: 900px) {
  .ch-hero { padding: 2rem 0 1.5rem; }
  .ch-hero-grid { grid-template-columns: 1fr; gap: 2rem; }
  .ch-window { max-width: 440px; width: 100%; justify-self: center; }
}
@media (max-width: 480px) {
  .ch-sub { font-size: 1rem; }
  .ch-btns > * { flex: 1 1 100%; justify-content: center; text-align: center; }
  .ch-product-media img { height: 140px; }
}

/* ════════════════════════════════════════════════════════════════════
   BELOW THE HERO — soft white surfaces on the mist canvas
   ════════════════════════════════════════════════════════════════════ */
.features { background: transparent; border: 0; }
.features-grid { background: #fff; border-radius: 20px; overflow: hidden; }
.feature-item { border-right-color: var(--border-light); }
.feature-icon, .tb-icon { background: var(--violet-soft); color: var(--violet); border-radius: 12px; }
.feature-icon i, .tb-icon i { color: var(--violet); }

.section-title, .deals-title { font-weight: 700; font-size: 1.5rem; letter-spacing: -.025em; text-wrap: balance; }
.feature-text h3 { font-size: .92rem; font-weight: 600; color: var(--text); letter-spacing: -.01em; }
.trust-badges-grid h3 { font-size: .88rem; font-weight: 600; color: var(--text); letter-spacing: -.01em; }
.section-title span { color: inherit; font-weight: inherit; }
.see-all, .see-all:hover { color: var(--violet); }

.cat-card { border-radius: 16px; border-color: transparent !important; }
.cat-card:hover { border-color: var(--violet) !important; }
.cat-card::before { display: none; }
.cat-icon { background: var(--violet-soft); color: var(--violet); border-radius: 12px; }

/* Deals block: header + grid read as one white panel */
.deals-head, .deals-grid { border-color: transparent; }
.deals-head { border-radius: 20px 20px 0 0; }
.deals-grid { border-radius: 0 0 20px 20px; }
.deals-head i { color: var(--sale); }

/* Product cards */
.product-card { border-radius: 20px; border-color: transparent !important; }
.product-card:hover { border-color: #D6CFFA !important; box-shadow: 0 18px 32px -24px rgba(40,20,120,.45) !important; transform: none !important; }
.deals-grid .product-card { border-color: var(--border-light) !important; }
.product-category { text-transform: none; letter-spacing: 0; font-size: .8rem; font-weight: 500; }
.product-name { font-size: .95rem; }
.price-current { font-size: 1.15rem; letter-spacing: -.015em; }
.price-current, .price-old, .discount-tag { white-space: nowrap; font-variant-numeric: tabular-nums; }
.discount-tag, .fav-btn.active, .fav-btn:hover { color: var(--sale); }
.badge-sale { background: var(--sale); }
.badge-hot  { background: var(--ink); }
.product-badge { border-radius: 8px; }
.add-cart-btn { background: var(--violet) !important; border-radius: 12px; font-size: .86rem; }
.add-cart-btn:hover { background: var(--violet-dark) !important; }
.detail-btn { border-radius: 12px; }
.fav-btn { border-radius: 50%; }

/* Promo banner */
.promo-banner {
  background: var(--violet) !important;
  border-radius: 24px;
  overflow: hidden;
}
.promo-banner h2 { font-weight: 800; color: #fff; line-height: 1.15; max-width: 26ch; }
.promo-banner h2 .accent {
  display: block; margin-top: .5rem;
  font-size: 1.05rem; font-weight: 500; letter-spacing: 0;
  color: rgba(255,255,255,.82);
}
.promo-banner p { color: rgba(255,255,255,.82); opacity: 1; }
.promo-banner .btn-primary { background: #fff; border-color: #fff; color: var(--violet); border-radius: 14px; }
.promo-banner .btn-primary:hover { background: var(--violet-soft); border-color: var(--violet-soft); color: var(--violet); }
.promo-banner .promo-emoji { opacity: .25; color: #fff; }

.trust-section { background: transparent !important; border-top: 0 !important; }

/* Footer */
.site-footer { background: var(--ink) !important; }
.site-footer .logo-icon { background: var(--violet) !important; color: #fff; }
.site-footer .logo-text { color: #fff; }
.site-footer .logo-text .accent { color: #B7A6FF; }
.footer-col h4 { text-transform: none; letter-spacing: 0; font-size: .95rem; font-weight: 700; color: #fff; }
.site-footer a:hover { color: #fff; }

/* Buttons & focus sitewide */
.btn { border-radius: 14px; }
.btn-primary { background: var(--violet); border-color: var(--violet); }
.btn-primary:hover { background: var(--violet-dark); border-color: var(--violet-dark); }
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible { outline-color: var(--violet); }

/* Floating cart (phones only), clear of the iOS home indicator */
.float-cart { display: none; }
@media (max-width: 768px) {
  .float-cart {
    position: fixed; z-index: 500;
    right: calc(1rem + env(safe-area-inset-right));
    bottom: calc(1rem + env(safe-area-inset-bottom));
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .85rem 1.15rem;
    border-radius: 999px;
    background: var(--violet); color: #fff;
    font-weight: 700; font-variant-numeric: tabular-nums;
    box-shadow: 0 12px 28px -12px rgba(40,20,120,.6);
    transition: background .18s;
  }
  .float-cart:hover { background: var(--violet-dark); color: #fff; }
}
