/* ============================================================
   ONIONMARCHER — Dark Cinematic Design System
   ============================================================ */

:root {
  --bg:           #0B0B0D;
  --surface:      #17171A;
  --card:         #242428;
  --text:         #F5F5F7;
  --muted:        #B8B8BF;
  --accent:       #C46B2C;
  --accent-strong:#A3571E;
  --accent-soft:  #8B6258;
  --accent-glow:  rgba(196,107,44,0.22);
  --border:       rgba(255,255,255,0.08);
  --glass:        rgba(23,23,26,0.72);
  --shadow:       0 4px 24px rgba(0,0,0,0.55);
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}

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

img {
  display: block;
}

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  text-align: center;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  padding: 0.52rem 1rem;
  font-size: 0.88rem;
  letter-spacing: 0.3px;
}

.topbar p {
  margin: 0;
}

/* ============================================================
   HEADER — GLASSMORPHISM
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
}

/* ============================================================
   LOGO — NETFLIX-INSPIRED
   ============================================================ */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  cursor: pointer;
}

.logo-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent-glow), 0 0 4px rgba(196,107,44,0.4);
  color: #fff;
  flex-shrink: 0;
  transition: box-shadow 0.3s ease;
}

.brand:hover .logo-badge {
  box-shadow: 0 0 22px rgba(196,107,44,0.5), 0 0 8px rgba(196,107,44,0.6);
}

.logo-text {
  font-size: 1.15rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent);
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.main-nav {
  display: flex;
  gap: 1.3rem;
}

.main-nav a {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.6px;
  transition: color 0.2s ease;
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.header-icons {
  display: flex;
  gap: 0.4rem;
}

.icon-tool {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  font-size: 1rem;
  border-radius: 8px;
  color: var(--muted);
  transition: background 0.2s, color 0.2s;
}

.icon-tool:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text);
}

.lang-switch {
  display: flex;
  gap: 0.3rem;
}

.lang-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.28rem 0.6rem;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  transition: all 0.2s ease;
  font-family: inherit;
}

.lang-btn.is-active,
.lang-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 0.72rem 1.3rem;
  font-weight: 700;
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  letter-spacing: 0.2px;
}

.btn:hover {
  background: var(--accent-strong);
  box-shadow: 0 4px 18px var(--accent-glow);
  transform: translateY(-1px);
}

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

.btn-sm {
  padding: 0.52rem 1rem;
  border-radius: 10px;
  font-size: 0.85rem;
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(196,107,44,0.08);
  box-shadow: none;
}

.btn-light-ghost {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.28);
  color: #fff;
}

.btn-light-ghost:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.55);
  color: #fff;
  box-shadow: none;
  transform: translateY(-1px);
}

.btn-copy {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.28rem 0.6rem;
  font-size: 0.8rem;
  cursor: pointer;
  font-family: inherit;
  color: var(--muted);
  transition: all 0.2s ease;
}

.btn-copy:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ============================================================
   HERO SLIDER
   ============================================================ */
.hero {
  padding: 0;
  overflow: hidden;
}

.slider {
  display: grid;
  position: relative;
}

.slide {
  grid-area: 1 / 1;
  background: var(--slide-bg, linear-gradient(135deg, #0d1f14, #12302090));
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.75s ease, visibility 0.75s ease;
  pointer-events: none;
}

.slide.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.slide-inner {
  min-height: 580px;
  display: flex;
  align-items: center;
  padding: 3.5rem 0 4.5rem;
}

.slide-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.slide-text {
  color: #fff;
}

.slide-tag {
  display: inline-block;
  background: rgba(196,107,44,0.18);
  border: 1px solid rgba(196,107,44,0.4);
  color: #f0a06a;
  padding: 0.32rem 0.9rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 1.1rem;
  letter-spacing: 0.3px;
}

.slide-text h1 {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: 1.1;
  color: #fff;
  margin-bottom: 0.75rem;
}

.slide-desc {
  font-size: 1rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.65);
  max-width: 46ch;
  margin: 0;
}

.hero-actions {
  margin-top: 1.6rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.slide-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.slide-image img {
  max-height: 420px;
  max-width: 100%;
  object-fit: contain;
  border-radius: 20px;
  box-shadow: 0 28px 72px rgba(0,0,0,0.7);
  filter: drop-shadow(0 8px 28px rgba(0,0,0,0.55));
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0);    }
}

.slide.active .slide-text  { animation: slideUp 0.65s ease 0.1s both; }
.slide.active .slide-image { animation: slideUp 0.65s ease 0.28s both; }

.slider-dots {
  position: absolute;
  bottom: 1.6rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 6px;
  background: rgba(255,255,255,0.28);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.35s ease;
}

.dot.active {
  background: var(--accent);
  width: 28px;
}

.slider-prev,
.slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(36,36,40,0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  color: #fff;
  font-size: 1.8rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  line-height: 1;
  padding: 0;
}

.slider-prev { left: 1.5rem; }
.slider-next { right: 1.5rem; }

.slider-prev:hover,
.slider-next:hover {
  background: rgba(196,107,44,0.3);
  box-shadow: 0 0 14px var(--accent-glow);
}

.slider-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--accent);
  width: 0;
  z-index: 10;
  box-shadow: 0 0 8px var(--accent-glow);
}

.slider-progress.running {
  width: 100%;
  transition: width 5s linear;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3 {
  line-height: 1.2;
  margin-top: 0;
}

h1 { font-size: clamp(1.9rem, 3vw, 3rem); margin-bottom: 0.4rem; }
h2 { font-size: clamp(1.3rem, 2.2vw, 1.8rem); margin-bottom: 1rem; }

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
  padding: 3.2rem 0;
}

.section.alt {
  background: var(--surface);
  border-block: 1px solid var(--border);
}

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

/* ============================================================
   CATEGORY CARDS — GLASSMORPHISM
   ============================================================ */
.grid {
  display: grid;
  gap: 1.1rem;
}

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

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

.category-card {
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.4rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
  color: var(--text);
  overflow: hidden;
}

.category-card:hover {
  border-color: rgba(196,107,44,0.4);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 1px rgba(196,107,44,0.12);
  transform: translateY(-3px);
  color: var(--text);
}

.category-card h3 {
  margin-bottom: 0.3rem;
  font-size: 1.05rem;
  color: var(--text);
}

.category-card p {
  color: var(--muted);
  margin: 0;
  font-size: 0.9rem;
}

.category-thumb {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 0.9rem;
  display: block;
  transition: transform 0.4s ease;
}

.category-card:hover .category-thumb {
  transform: scale(1.04);
}

/* ============================================================
   PRODUCT CARDS
   ============================================================ */
.product {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
  overflow: hidden;
}

.product:hover {
  border-color: rgba(196,107,44,0.35);
  box-shadow: 0 8px 36px rgba(0,0,0,0.5), 0 0 0 1px rgba(196,107,44,0.1);
  transform: translateY(-2px);
}

.product h3 {
  font-size: 0.95rem;
  margin: 0;
  color: var(--text);
}

.product h3 a {
  color: var(--text);
  transition: color 0.2s ease;
}

.product h3 a:hover {
  color: var(--accent);
}

.product-thumb-wrap {
  overflow: hidden;
  border-radius: 12px;
}

.product-thumb {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  transition: transform 0.45s ease;
}

.product:hover .product-thumb,
.product:hover > img.product-thumb,
.product > a:first-child:hover .product-thumb {
  transform: scale(1.06);
}

.rating {
  color: #f5a623;
  font-size: 0.85rem;
}

.price {
  font-weight: 700;
  font-size: 1.08rem;
  color: var(--accent);
}

.product .btn {
  margin-top: auto;
  width: 100%;
}

/* Product detail page */
.product-image {
  max-width: 100%;
  height: auto;
  border-radius: 18px;
  display: block;
}

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.product-detail-image img {
  width: 100%;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.product-detail-info {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.product-detail-info h1 {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  margin-bottom: 0;
  color: var(--text);
}

.price-large {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--accent);
  margin: 0;
}

.product-detail-info .btn {
  text-align: center;
}

/* ============================================================
   SPLIT / ABOUT + CONTACT
   ============================================================ */
.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
}

/* ============================================================
   CONTACT CARD — GLASSMORPHISM
   ============================================================ */
.contact-card {
  background: var(--glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.8rem;
  transition: border-color 0.25s ease;
}

.contact-card:hover {
  border-color: rgba(196,107,44,0.3);
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0.8rem 0 1rem;
  display: grid;
  gap: 0.9rem;
}

.contact-list li {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.contact-label {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.contact-value {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  color: var(--text);
}

.signal-user {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--text);
}

.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.contact-actions .btn {
  text-align: center;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  margin-top: 2.5rem;
  padding: 2.2rem 0 1.2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 1.8rem;
}

.footer-grid h3 {
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  color: var(--text);
}

.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-grid ul a {
  color: var(--muted);
  transition: color 0.2s ease;
}

.footer-grid ul a:hover {
  color: var(--accent);
}

.copy {
  text-align: center;
  color: var(--muted);
  margin: 1.6rem 0 0;
  font-size: 0.88rem;
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1.6rem;
}

.breadcrumb a {
  color: var(--muted);
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: var(--accent);
}

/* ============================================================
   FLOATING TELEGRAM BUTTON
   ============================================================ */
.floating-emblem {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
}

.floating-emblem a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  background: #0088cc;
  color: white;
  border-radius: 50%;
  box-shadow: 0 4px 20px rgba(0,136,204,0.45);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  text-decoration: none;
}

.floating-emblem a:hover {
  transform: scale(1.12);
  box-shadow: 0 8px 32px rgba(0,136,204,0.6);
}

/* ============================================================
   MISC UTILITIES
   ============================================================ */
.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;
}

/* ============================================================
   RESPONSIVE — TABLET
   ============================================================ */
@media (max-width: 960px) {
  .main-nav {
    display: none;
  }

  .slide-layout,
  .split,
  .footer-grid,
  .product-detail {
    grid-template-columns: 1fr;
  }

  .slide-layout {
    text-align: center;
    gap: 1.5rem;
  }

  .slide-image {
    order: -1;
  }

  .slide-image img {
    max-height: 260px;
  }

  .slide-inner {
    min-height: auto;
    padding: 2.5rem 0 3.5rem;
  }

  .slide-desc {
    margin: 0 auto;
  }

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

  .slider-prev { left: 0.8rem; }
  .slider-next { right: 0.8rem; }

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

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

  .header-icons {
    display: none;
  }
}

/* ============================================================
   RESPONSIVE — MOBILE
   ============================================================ */
@media (max-width: 640px) {
  .hero {
    padding-top: 0;
  }

  .categories-grid,
  .products-grid {
    grid-template-columns: 1fr;
  }

  .product-thumb {
    height: 220px;
  }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
