:root {
  --brand: #7202FF;
  --brand-dark: #5A01CC;
  --brand-soft: #F3ECFF;
  --cream: #FFF8F0;
  --text: #1F2328;
  --white: #FFFFFF;
  --radius: 16px;
  --font-head: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  margin: 0 0 0.5em;
}

p { margin: 0 0 1em; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  color: var(--brand);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-bottom: 0.5em;
}

.center { text-align: center; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand-logo {
  height: 40px;
  display: block;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.brand:hover .brand-logo { transform: rotate(-6deg) scale(1.06); }

.nav {
  display: flex;
  gap: 28px;
}

.nav a {
  position: relative;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--brand);
  border-radius: 999px;
  transition: width 0.25s ease;
}

.nav a:hover { color: var(--brand); }

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

.nav-cta { display: inline-flex; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn:hover { transform: translateY(-2px) scale(1.03); }

.btn:active { transform: translateY(0) scale(0.98); }

.btn-primary {
  background: var(--brand);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(114, 2, 255, 0.25);
}

.btn-primary:hover {
  background: var(--brand-dark);
  box-shadow: 0 12px 26px rgba(114, 2, 255, 0.38);
}

.btn-ghost {
  background: transparent;
  color: var(--brand);
  border: 2px solid var(--brand);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s ease, color 0.2s ease;
}

.btn-ghost:hover {
  background: var(--brand);
  color: var(--white);
}

.btn-ghost-light {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

/* Hero */
.hero {
  background: linear-gradient(180deg, var(--brand-soft) 0%, var(--white) 100%);
  padding: 72px 0;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 48px;
}

.hero-text { flex: 1.1; }

.hero-art { flex: 0.9; text-align: center; }

.hero-badge {
  width: 100%;
  max-width: 360px;
  animation: heroFloat 4s ease-in-out infinite;
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(-1.5deg); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-badge { animation: none; }
}

.hero h1 {
  font-size: 3rem;
  line-height: 1.15;
}

.hero h1 span { color: var(--brand); }

.hero-lead {
  font-size: 1.1rem;
  color: #4A4F57;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.hero-actions.center { justify-content: center; }

/* Sections */
.section { padding: 80px 0; }

.section-alt { background: var(--cream); }

.section h2 {
  font-size: 2rem;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* Grids */
.grid { display: grid; gap: 24px; margin-top: 40px; }

.grid-2 { grid-template-columns: repeat(2, 1fr); }

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

.grid-5 { grid-template-columns: repeat(5, 1fr); }

.card {
  background: var(--white);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: var(--radius);
  padding: 32px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 30px rgba(31, 35, 40, 0.07);
  border-color: rgba(114, 2, 255, 0.15);
}

.card h3 { color: var(--brand); }

.values-grid { margin-top: 48px; }

.value-card {
  text-align: center;
  padding: 36px 20px 28px;
  background: var(--white);
  border: 1px solid rgba(114, 2, 255, 0.08);
  border-radius: var(--radius);
  box-shadow: 0 4px 14px rgba(31, 35, 40, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.value-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 36px rgba(114, 2, 255, 0.16);
  border-color: transparent;
}

.value-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  margin: 0 auto 20px;
  border-radius: 50%;
  color: var(--white);
  background: linear-gradient(145deg, var(--brand) 0%, var(--brand-dark) 100%);
  box-shadow: 0 10px 22px rgba(114, 2, 255, 0.32), inset 0 0 0 1px rgba(255,255,255,0.15);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.value-card:hover .value-icon-wrap { transform: rotate(-8deg) scale(1.08); }

.value-icon-wrap svg {
  width: 34px;
  height: 34px;
}

.value-card h4 {
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 10px;
}

.value-accent {
  display: block;
  width: 28px;
  height: 3px;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: var(--brand);
  opacity: 0.5;
  transition: width 0.25s ease;
}

.value-card:hover .value-accent { width: 48px; }

.value-card p { font-size: 0.9rem; color: #5A5F66; margin: 0; line-height: 1.5; }

.category-card {
  background: var(--white);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: var(--radius);
  overflow: hidden;
  padding-bottom: 24px;
}

.category-thumb {
  height: 160px;
  background: var(--brand-soft);
  position: relative;
  transition: transform 0.4s ease;
}

.category-card:hover .category-thumb,
.product-card:hover .category-thumb {
  transform: scale(1.08);
}

.thumb-a { background: linear-gradient(135deg, #F3ECFF, #E1CCFF); }
.thumb-b { background: linear-gradient(135deg, #E1CCFF, #C79BFF); }
.thumb-c { background: linear-gradient(135deg, #F3ECFF, #D6BBFF); }

.category-card h3, .category-card p { padding: 0 24px; }

.category-card h3 { margin-top: 20px; }

.note {
  text-align: center;
  color: #8A8F96;
  font-size: 0.85rem;
  margin-top: 24px;
}

.note-light {
  text-align: center;
  color: rgba(255,255,255,0.75);
  font-size: 0.85rem;
  margin-top: 16px;
}

.step-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  border: 1px solid rgba(0,0,0,0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.step-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 28px rgba(0,0,0,0.08);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--white);
  font-weight: 700;
  margin-bottom: 16px;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.step-card:hover .step-number { transform: scale(1.15) rotate(8deg); }

.step-footer {
  margin-top: 32px;
  color: #4A4F57;
}

/* CTA */
.cta-section {
  background: var(--brand);
  color: var(--white);
}

.cta-inner { text-align: center; }

.cta-section h2 { color: var(--white); }

.cta-section p { color: rgba(255,255,255,0.85); }

.cta-section .btn-primary {
  background: var(--white);
  color: var(--brand);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.cta-section .btn-primary:hover { background: var(--cream); }

/* Footer */
.site-footer {
  background: var(--text);
  color: rgba(255,255,255,0.7);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-logo {
  height: 28px;
  filter: brightness(0) invert(1);
}

.footer-inner p { margin: 0; font-size: 0.85rem; }

/* Promo + utility bars */
.promo-bar {
  background: var(--brand);
  color: var(--white);
  text-align: center;
  font-size: 0.85rem;
  padding: 8px 16px;
}

.utility-bar {
  background: var(--text);
  color: rgba(255,255,255,0.8);
}

.utility-inner {
  display: flex;
  gap: 24px;
  justify-content: flex-end;
  padding: 6px 24px;
  font-size: 0.8rem;
}

.utility-inner a { color: inherit; text-decoration: none; }
.utility-inner a:hover { color: var(--white); }

/* Header additions */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--text);
}

.nav a.active { color: var(--brand); }

.search-form {
  display: flex;
  align-items: center;
  background: var(--brand-soft);
  border-radius: 999px;
  padding: 6px 6px 6px 16px;
  flex: 0 1 260px;
}

.search-form input {
  border: none;
  background: transparent;
  outline: none;
  font-family: var(--font-body);
  flex: 1;
  font-size: 0.9rem;
}

.search-form button {
  border: none;
  background: var(--brand);
  color: var(--white);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
}

.header-icons {
  display: flex;
  gap: 16px;
}

.icon-btn {
  position: relative;
  font-size: 1.3rem;
  text-decoration: none;
  color: var(--text);
  display: inline-block;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.icon-btn:hover {
  transform: scale(1.15) rotate(-4deg);
  color: var(--brand);
}

.badge {
  position: absolute;
  top: -8px;
  right: -10px;
  background: var(--brand);
  color: var(--white);
  font-size: 0.65rem;
  font-family: var(--font-body);
  border-radius: 999px;
  min-width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  transition: transform 0.2s ease;
}

.badge.pop { animation: badgePop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }

@keyframes badgePop {
  0% { transform: scale(1); }
  40% { transform: scale(1.5); }
  100% { transform: scale(1); }
}

/* Product cards (catalog + featured) */
.product-grid { align-items: stretch; }

.category-card {
  display: block;
  background: var(--white);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: var(--radius);
  overflow: hidden;
  padding-bottom: 24px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}

.category-card h3, .category-card p { padding: 0 24px; }

.category-card h3 { margin-top: 20px; font-size: 1.05rem; }

.product-price { color: var(--brand); font-weight: 600; }

/* Product card (with quick-add + sale/rating) */
.product-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}

.product-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  flex: 1;
}

.product-card-link .category-thumb { position: relative; }

.product-card-link h3 { padding: 0 20px; margin-top: 18px; font-size: 1.02rem; }

.product-price-row {
  padding: 0 20px;
  margin-top: 6px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.product-price-old {
  text-decoration: line-through;
  color: #9AA0A6;
  font-size: 0.85rem;
}

.product-rating {
  padding: 6px 20px 0;
  color: #C88A00;
  font-size: 0.85rem;
  font-weight: 600;
}

.product-rating span { color: #8A8F96; font-weight: 400; }

.badge-tag {
  position: absolute;
  top: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--white);
}

.badge-new { left: 10px; background: #29B673; }
.badge-sale { right: 10px; background: #E53935; }
.badge-out { left: 10px; background: #6B7280; }

.quick-add-btn:disabled {
  background: #C7CBD1;
  cursor: not-allowed;
  box-shadow: none;
}

.quick-add-btn {
  margin: 14px 20px 20px;
  padding: 10px 16px;
  font-size: 0.85rem;
  border-radius: 10px;
  cursor: pointer;
  border: none;
}

.quick-add-btn.added {
  background: #29B673;
  animation: addedPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes addedPop {
  0% { transform: scale(1); }
  45% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

/* Product detail page */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.product-thumb-large { height: 420px; border-radius: var(--radius); }

.product-price-large { font-size: 1.6rem; color: var(--brand); font-weight: 700; }

.field-label {
  display: block;
  font-weight: 600;
  margin: 16px 0 6px;
  font-size: 0.9rem;
}

.size-select, .form input, .form textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.15);
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.form textarea { resize: vertical; }

.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 0.9rem;
}

.spec-table td {
  padding: 8px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.spec-table td:first-child {
  color: #8A8F96;
  width: 40%;
}

.product-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

/* Cart */
.cart-box {
  max-width: 720px;
  margin: 40px auto 0;
}

.cart-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 16px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.cart-row-info { display: flex; flex-direction: column; }
.cart-row-size { font-size: 0.85rem; color: #8A8F96; }

.cart-row-qty {
  display: flex;
  align-items: center;
  gap: 10px;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.15);
  background: var(--white);
  cursor: pointer;
  font-weight: 700;
}

.cart-row-price { font-weight: 600; }

.cart-row-remove {
  border: none;
  background: none;
  color: #B00020;
  cursor: pointer;
  font-size: 1rem;
}

.cart-summary {
  display: flex;
  justify-content: space-between;
  padding: 20px 0;
  font-size: 1.1rem;
}

.cart-checkout-btn { display: block; text-align: center; }

.cart-checkout-btn.disabled {
  pointer-events: none;
  opacity: 0.5;
}

.empty-state { text-align: center; color: #8A8F96; padding: 24px 0; }
.empty-state a { color: var(--brand); }

/* Checkout */
.checkout-layout {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: start;
}

.checkout-summary {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 24px;
}

.error-note { color: #B00020; font-size: 0.9rem; margin-top: 12px; }

.promo-row {
  display: flex;
  gap: 8px;
  margin: 20px 0;
}

.promo-row input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.15);
  font-family: var(--font-body);
}

/* Catalog layout (filters + results) */
.catalog-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  margin-top: 40px;
  align-items: start;
}

.filters-panel {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 24px;
}

.filters-panel h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 20px 0 8px;
}

.filters-panel h4:first-child { margin-top: 0; }

.filter-price-row {
  display: flex;
  gap: 8px;
}

.filter-price-row input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.15);
  font-family: var(--font-body);
}

.catalog-results .product-grid { margin-top: 0; }

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 40px;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.12);
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
}

.page-link:hover { border-color: var(--brand); }

.page-link.active {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--white);
}

/* FAQ */
.faq-list { margin-top: 32px; }

.faq-item {
  background: var(--white);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-item:hover {
  border-color: rgba(114, 2, 255, 0.25);
  box-shadow: 0 6px 16px rgba(114, 2, 255, 0.06);
}

.faq-item summary { transition: color 0.2s ease; }

.faq-item summary:hover { color: var(--brand); }

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-family: var(--font-head);
}

.faq-item p { margin-top: 12px; margin-bottom: 0; color: #4A4F57; }

.map-embed {
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 280px;
}

/* Newsletter / Telegram subscribe */
.subscribe-box {
  max-width: 480px;
  margin: 32px auto 0;
  display: flex;
  gap: 12px;
}

.subscribe-box input {
  flex: 1;
  padding: 14px 18px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.15);
  font-family: var(--font-body);
}

.subscribe-note { text-align: center; margin-top: 12px; font-size: 0.85rem; }
.subscribe-note.success { color: #29B673; }
.subscribe-note.error { color: #B00020; }

@media (max-width: 640px) {
  .subscribe-box { flex-direction: column; }
}

/* Footer (multi-column) */
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding: 48px 24px 24px;
}

.footer-col h4 { color: var(--white); font-size: 0.95rem; margin-bottom: 12px; }

.footer-col a {
  display: block;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.footer-col a:hover { color: var(--white); }

.footer-col p { color: rgba(255,255,255,0.6); font-size: 0.85rem; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 16px 24px;
  text-align: center;
}

.footer-bottom p { margin: 0; font-size: 0.8rem; color: rgba(255,255,255,0.5); }

/* Articles */
.article-card {
  display: block;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}

.callout-warning {
  background: #FFF3E0;
  border: 1px solid #FFB300;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 32px;
  font-size: 0.9rem;
  color: #7A5200;
}

.article-body h3 {
  margin-top: 32px;
  margin-bottom: 12px;
  font-size: 1.15rem;
}

.article-body ul, .article-body ol {
  padding-left: 22px;
  margin-bottom: 16px;
}

.article-body li { margin-bottom: 8px; }

.article-body table.spec-table { margin: 16px 0; }

/* Telegram Mini App adjustments */
.tg-webapp .promo-bar,
.tg-webapp .utility-bar,
.tg-webapp .search-form {
  display: none;
}

.tg-webapp .site-header { position: static; }

.tg-mainbutton-active .cart-checkout-btn,
.tg-mainbutton-active #checkoutForm button[type="submit"] {
  display: none;
}

/* Responsive */
@media (max-width: 1100px) {
  .menu-toggle { display: block; order: 1; }
  .brand { order: 2; }
  .header-icons { order: 3; margin-left: auto; }
  .search-form { display: none; }
  .nav {
    display: none;
    order: 4;
    flex-basis: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    gap: 16px;
  }
  .nav.open { display: flex; }
  .header-inner { position: relative; flex-wrap: wrap; }
}

@media (max-width: 900px) {
  .grid-5 { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { flex-direction: column; }
  .hero-art { order: -1; }
  .product-detail, .checkout-layout, .catalog-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .utility-inner { justify-content: center; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-5 { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 2.2rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .cart-row { grid-template-columns: 1fr auto; row-gap: 8px; }
}
