:root {
  --bg: #0d0d12;
  --bg-alt: #14141c;
  --card: #191922;
  --border: #26262f;
  --text: #f5f5f7;
  --text-muted: #a0a0ab;
  --accent-red: #ff1f4b;
  --accent-violet: #7b2ff7;
  --gradient: linear-gradient(135deg, var(--accent-red), var(--accent-violet));
  --radius: 14px;
  --max-width: 1160px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', 'Segoe UI', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Exo 2', 'Space Grotesk', 'Segoe UI', sans-serif;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

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

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

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  background: var(--accent-red);
  color: #fff;
  box-shadow: 0 8px 24px rgba(255, 31, 75, 0.25);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(255, 31, 75, 0.35); }

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

.btn-outline:hover { border-color: var(--accent-violet); background: rgba(123, 47, 247, 0.08); }

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: background 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
}

header.scrolled {
  background: rgba(13, 13, 18, 0.85);
  backdrop-filter: blur(12px);
  padding: 12px 0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
}

.logo img { width: 40px; height: 40px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

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

.nav-cta { display: flex; align-items: center; gap: 16px; }

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
  overflow: hidden;
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  z-index: 0;
}

.hero-blob.one { width: 420px; height: 420px; background: var(--accent-red); top: -100px; right: -80px; }
.hero-blob.two { width: 380px; height: 380px; background: var(--accent-violet); bottom: -120px; left: -100px; }

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 22px;
}

.eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gradient);
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.005em;
  margin-bottom: 22px;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 34px;
}

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

.hero-stats {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.hero-stats div strong {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.7rem;
}

.hero-stats div span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Section shared */
section { padding: 110px 0; position: relative; }

.section-head {
  max-width: 620px;
  margin: 0 auto 60px;
  text-align: center;
}

.section-head .eyebrow { margin-bottom: 18px; }

.section-head h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  margin-bottom: 16px;
}

.section-head p { color: var(--text-muted); font-size: 1.05rem; }

/* Legal pages */
.legal-content { max-width: 780px; margin: 0 auto; color: var(--text-muted); font-size: 0.98rem; }
.legal-content h3 { color: var(--text); font-size: 1.25rem; margin: 40px 0 14px; }
.legal-content h3:first-child { margin-top: 0; }
.legal-content p { margin-bottom: 14px; }
.legal-content ul { margin: 0 0 14px 22px; display: grid; gap: 8px; }
.legal-content .updated { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 40px; }
.legal-content .todo {
  background: rgba(123, 47, 247, 0.12);
  border: 1px solid var(--accent-violet);
  border-radius: 8px;
  padding: 2px 8px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9em;
}

/* Chi siamo */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-visual {
  position: relative;
  aspect-ratio: 1;
  border-radius: 24px;
  background: linear-gradient(160deg, var(--card), var(--bg-alt));
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.about-visual .glow {
  position: absolute;
  width: 260px;
  height: 260px;
  background: var(--gradient);
  filter: blur(80px);
  opacity: 0.4;
}

.about-visual img { width: 46%; position: relative; z-index: 1; filter: drop-shadow(0 20px 40px rgba(0,0,0,0.5)); }

.about-text h2 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); margin-bottom: 20px; }

.about-text p { color: var(--text-muted); margin-bottom: 18px; }

.about-list { list-style: none; margin-top: 26px; display: grid; gap: 14px; }

.about-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.95rem;
}

.about-list li .check {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  margin-top: 2px;
}

/* Servizi */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.service-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px 28px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.service-card:hover { transform: translateY(-6px); border-color: var(--accent-violet); }

.service-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}

.service-icon svg { width: 26px; height: 26px; stroke: #fff; }

.service-card h3 { font-size: 1.2rem; margin-bottom: 10px; }

.service-card p { color: var(--text-muted); font-size: 0.93rem; margin-bottom: 18px; }

.service-card a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-violet);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Trending: scorrimento orizzontale prodotti */
.trending-scroll-wrap {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.trending-scroll {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 4px 4px 10px;
  scrollbar-width: none;
}

.trending-scroll::-webkit-scrollbar { display: none; }

.trending-card {
  position: relative;
  flex: 0 0 auto;
  scroll-snap-align: start;
  width: 240px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s cubic-bezier(.2,.8,.2,1), box-shadow 0.18s ease, border-color 0.18s ease;
}

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

.trending-card:hover {
  transform: translateY(-6px) scale(1.015);
  border-color: var(--accent-red);
  box-shadow: 0 16px 32px rgba(255, 31, 75, 0.28);
}
.trending-card .product-card-image { aspect-ratio: 1; position: relative; display: flex; align-items: center; justify-content: center; padding: 14px; }
.trending-card .product-card-image img { width: 100%; height: 100%; object-fit: contain; }
.trending-card .product-card-body { padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.trending-card .product-card-body h3 { font-size: 0.95rem; }

.trending-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.trending-arrow:hover { border-color: var(--accent-violet); background: var(--bg-alt); }
.trending-arrow-left { left: -6px; }
.trending-arrow-right { right: -6px; }

@media (max-width: 700px) {
  .trending-arrow { display: none; }
}

/* Perche sceglierci */
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.why-card {
  text-align: center;
  padding: 30px 20px;
}

.why-card .num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 12px;
}

.why-card h3 { font-size: 1.05rem; margin-bottom: 10px; }
.why-card p { color: var(--text-muted); font-size: 0.9rem; }

/* Testimonianze */
.testi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.testi-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
}

.testi-stars { color: #ffb020; font-size: 0.9rem; margin-bottom: 16px; letter-spacing: 2px; }

.testi-card p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 22px; }

.testi-author { display: flex; align-items: center; gap: 12px; }

.testi-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.testi-author strong { display: block; font-size: 0.9rem; }
.testi-author span { font-size: 0.8rem; color: var(--text-muted); }

.testi-note {
  text-align: center;
  margin-top: 30px;
  font-size: 0.82rem;
  color: var(--text-muted);
  opacity: 0.7;
}

/* Contatti */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 50px;
}

.contact-info { display: flex; flex-direction: column; gap: 22px; }

.contact-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
}

.contact-item .icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--gradient);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-item .icon svg { width: 20px; height: 20px; stroke: #fff; }

.contact-item h4 { font-size: 0.95rem; margin-bottom: 4px; }
.contact-item p { color: var(--text-muted); font-size: 0.88rem; }
.contact-item .placeholder { color: var(--accent-red); font-style: italic; }

.socials { display: flex; gap: 12px; margin-top: 6px; }

.socials a {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.socials a:hover { border-color: var(--accent-violet); background: rgba(123,47,247,0.12); }
.socials a svg { width: 18px; height: 18px; stroke: var(--text); }

.contact-form {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-row .field { min-width: 0; }
.form-row .field input { width: 100%; min-width: 0; }

.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }

.field label { font-size: 0.85rem; color: var(--text-muted); }

.field input, .field textarea, .field select {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
  resize: vertical;
  transition: border-color 0.2s ease;
}

.field select { appearance: none; cursor: pointer; }

.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent-violet); }

.form-status {
  margin-top: 14px;
  font-size: 0.88rem;
  color: var(--accent-violet);
  display: none;
}

.form-status.show { display: block; }

.form-status.error { color: var(--accent-red); }

.form-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 20px;
}

.form-hint a { color: var(--accent-violet); font-weight: 600; }

.oauth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.oauth-divider::before, .oauth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.oauth-buttons { display: flex; flex-direction: column; gap: 10px; }

.btn-oauth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.btn-oauth:hover { border-color: var(--accent-violet); background: rgba(123, 47, 247, 0.08); transform: translateY(-2px); }

.btn-oauth svg { width: 20px; height: 20px; flex-shrink: 0; }

/* Auth / account pages */
.auth-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 140px 24px 80px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 34px;
}

.auth-card .eyebrow { margin-bottom: 18px; }
.auth-card h1 { font-size: 1.7rem; margin-bottom: 10px; }
.auth-card > p { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 28px; }

.account-card {
  width: 100%;
  max-width: 480px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 34px;
  text-align: center;
}

.account-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  margin: 0 auto 20px;
}

.account-card h1 { font-size: 1.4rem; margin-bottom: 6px; }
.account-card .account-email { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 6px; }
.account-card .account-since { color: var(--text-muted); font-size: 0.8rem; margin-bottom: 30px; }

.avatar-picker { display: flex; flex-wrap: wrap; gap: 12px; }

.avatar-option {
  background: none;
  border: 2px solid transparent;
  border-radius: 50%;
  padding: 3px;
  cursor: pointer;
  line-height: 0;
}

.avatar-option.selected { border-color: var(--accent-red); }

.avatar-option-inner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  color: var(--text);
}

.avatar-option-inner.avatar-none { background: var(--bg-alt); border: 1px dashed var(--border); }

.avatar-option-inner svg { width: 30px; height: 30px; }

.account-actions { display: flex; flex-direction: column; gap: 12px; }

/* Nav cart icon */
.nav-cart-link {
  position: relative;
  padding: 10px 12px;
}

.nav-cart-link svg { width: 18px; height: 18px; min-width: 18px; flex-shrink: 0; stroke: var(--text); }

#navCartBadge {
  display: none;
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--gradient);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  align-items: center;
  justify-content: center;
}

#navCartBadge:not(:empty) { display: flex; }

/* Shop: catalogo/prodotto/carrello */
.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 46px;
}

.category-tab {
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.category-tab:hover { color: var(--text); border-color: var(--accent-violet); }
.category-tab.active { color: #fff; border-color: transparent; background: var(--gradient); }

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.product-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s cubic-bezier(.2,.8,.2,1), box-shadow 0.18s ease, border-color 0.18s ease;
}

.product-card:hover {
  transform: translateY(-6px) scale(1.015);
  border-color: var(--accent-red);
  box-shadow: 0 16px 32px rgba(255, 31, 75, 0.28);
}

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

.favorite-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(10, 10, 15, 0.55);
  backdrop-filter: blur(4px);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.favorite-btn:hover { transform: scale(1.08); }

.favorite-btn .heart-icon { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2; }

.favorite-btn.active .heart-icon { fill: var(--accent-red); stroke: var(--accent-red); }

.favorite-btn.inline { position: static; background: var(--bg-alt); border-color: var(--border); flex-shrink: 0; }
.favorite-btn.inline .heart-icon { stroke: var(--text); }
.favorite-btn.inline.active .heart-icon { fill: var(--accent-red); stroke: var(--accent-red); }

.product-card-image {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.product-card-image img { width: 100%; height: 100%; object-fit: contain; }

.product-card-body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.product-card-body h3 { font-size: 1.05rem; }
.product-card-body p { color: var(--text-muted); font-size: 0.85rem; flex: 1; }

.product-price {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  background: rgba(255, 31, 75, 0.15);
  color: #ff6b8a;
  padding: 3px 10px;
  border-radius: 999px;
  display: inline-block;
  width: fit-content;
}

.badge-soldout {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
}

.nav-soon {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--accent-violet);
  border: 1px solid var(--accent-violet);
  border-radius: 999px;
  padding: 1px 7px;
  margin-left: 4px;
  vertical-align: middle;
  white-space: nowrap;
}

.badge-soon {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--accent-violet);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.category-tab .tab-soon {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--accent-violet);
  margin-left: 5px;
}

/* Prodotto dettaglio */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: start;
}

.product-detail-image {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
}

.product-detail-image img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }

.tilt-card {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out;
  box-shadow: 0 20px 50px rgba(0,0,0,0.45);
  cursor: grab;
}

.tilt-shine {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

/* Andamento di mercato */
.market-trend {
  margin-top: 40px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 30px;
}

.market-trend-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.market-trend-head h3 { font-size: 1.05rem; }

.market-trend-change {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
}

.trend-up { color: var(--accent-red); }
.trend-down { color: var(--accent-violet); }

.market-trend-chart { width: 100%; height: 140px; display: block; }

.market-trend-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: capitalize;
}

.reviews-section {
  margin-top: 40px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 30px;
}

.reviews-section h3 { font-size: 1.05rem; margin-bottom: 18px; }

.reviews-summary { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.reviews-summary .avg-rating { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.6rem; }
.reviews-summary .stars { color: #ffb020; font-size: 1.1rem; letter-spacing: 2px; }
.reviews-summary .count { color: var(--text-muted); font-size: 0.85rem; }

.reviews-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 22px; }

.review-card { padding: 18px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 14px; }
.review-card .testi-stars { margin-bottom: 8px; }
.review-card p { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 10px; }
.review-card .testi-author strong { font-size: 0.85rem; }
.review-card .testi-author span { font-size: 0.75rem; }

.star-rating-input { display: flex; gap: 4px; margin-bottom: 6px; }
.star-rating-input button {
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--border);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.15s ease;
}
.star-rating-input button.filled { color: #ffb020; }

.market-trend-note {
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.product-detail-info h1 { font-size: 1.8rem; margin-bottom: 14px; }
.product-detail-info .product-price { font-size: 1.6rem; margin-bottom: 18px; }
.product-detail-info p.description { color: var(--text-muted); margin-bottom: 26px; }

.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.qty-stepper button {
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
}

.qty-stepper button:hover { background: var(--bg-alt); }

.qty-stepper input {
  width: 46px;
  text-align: center;
  background: none;
  border: none;
  color: var(--text);
  font-size: 0.95rem;
}

/* Carrello */
.cart-layout { display: grid; grid-template-columns: 250px 1fr; gap: 28px; align-items: start; }
.cart-main { min-width: 0; }

.cart-suggestions {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: sticky;
  top: 110px;
}

.cart-suggestions h3 { font-size: 0.95rem; margin-bottom: 16px; }

.suggestion-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.suggestion-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.suggestion-item-image {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 8px;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
}

.suggestion-item-image img { width: 100%; height: 100%; object-fit: contain; }

.suggestion-item-body { flex: 1; min-width: 0; }
.suggestion-item-body .name { font-size: 0.82rem; font-weight: 600; line-height: 1.3; }
.suggestion-item-body .price { font-size: 0.8rem; color: var(--accent-red); font-weight: 700; margin-top: 2px; }

.suggestion-add {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.suggestion-add:hover { border-color: var(--accent-red); background: rgba(255, 31, 75, 0.12); }

.cart-table { display: flex; flex-direction: column; gap: 16px; margin-bottom: 34px; }

.cart-row {
  display: grid;
  grid-template-columns: 72px 1fr auto auto auto;
  align-items: center;
  gap: 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.cart-row-image {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-row-image img { width: 100%; height: 100%; object-fit: contain; }

.cart-row-name { font-size: 0.95rem; font-weight: 600; }
.cart-row-unit { color: var(--text-muted); font-size: 0.82rem; }

.cart-row-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
}

.cart-row-remove:hover { color: var(--accent-red); }

.cart-summary {
  max-width: 380px;
  margin-left: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}

.cart-summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.cart-summary-total {
  display: flex;
  justify-content: space-between;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  padding-top: 14px;
  margin-top: 6px;
  border-top: 1px solid var(--border);
  margin-bottom: 22px;
}

.cart-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 50px 0 26px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand p { color: var(--text-muted); font-size: 0.9rem; margin-top: 14px; max-width: 320px; }

.footer-col h4 { font-size: 0.9rem; margin-bottom: 16px; }
.footer-col ul { list-style: none; display: grid; gap: 10px; }
.footer-col a { color: var(--text-muted); font-size: 0.88rem; transition: color 0.2s ease; }
.footer-col a:hover { color: var(--text); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Responsive */
@media (max-width: 1080px) {
  .nav-links { display: none; }
  .menu-toggle { display: flex; }
  .logo { font-size: 1rem; white-space: nowrap; }
  .logo img { width: 34px; height: 34px; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr 1fr; }
  .why-grid { grid-template-columns: 1fr 1fr; }
  .testi-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .product-grid { grid-template-columns: 1fr 1fr; }
  .product-detail { grid-template-columns: 1fr; }
  .cart-layout { grid-template-columns: 1fr; }
  .cart-suggestions { position: static; order: 2; }
}

@media (max-width: 600px) {
  .services-grid, .why-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero-stats { gap: 24px; }
  .footer-grid { grid-template-columns: 1fr; }
  .logo { font-size: 0; gap: 0; }
  .nav-cta { gap: 6px; }
  .nav-cart-link { padding: 8px 9px; }
  #navAuthSlot { gap: 6px; }
  #navAuthSlot .btn { padding: 8px 10px; font-size: 0.72rem; }
  .product-grid { grid-template-columns: 1fr; }
  .cart-row { grid-template-columns: 56px 1fr; }
  .cart-row-image { width: 56px; height: 56px; }
  .cart-row-qty, .cart-row-total, .cart-row-remove { grid-column: 2; }
  .cart-summary { max-width: 100%; }

  nav.mobile-open .nav-links {
    display: flex;
    position: absolute;
    top: 64px;
    left: 16px;
    right: 16px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    flex-direction: column;
    padding: 20px;
    gap: 18px;
  }
}

/* Chat widget */
.chat-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: none;
  background: var(--gradient);
  box-shadow: 0 10px 30px rgba(255, 31, 75, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 200;
}

.chat-toggle svg { width: 26px; height: 26px; stroke: #fff; }

.chat-panel {
  position: fixed;
  bottom: 92px;
  right: 24px;
  width: 340px;
  max-width: calc(100vw - 32px);
  max-height: 70vh;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  flex-direction: column;
  overflow: hidden;
  z-index: 200;
}

.chat-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: var(--gradient);
  color: #fff;
  font-weight: 600;
  font-size: 0.92rem;
}

.chat-close {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 200px;
  max-height: 320px;
}

.chat-message {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.4;
  max-width: 85%;
}

.chat-message.user {
  align-self: flex-end;
  background: var(--gradient);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-message.assistant {
  align-self: flex-start;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.chat-human-link {
  background: none;
  border: none;
  border-top: 1px solid var(--border);
  color: var(--accent-violet);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 10px 16px;
  cursor: pointer;
  text-align: left;
}

.chat-input-row {
  display: flex;
  gap: 8px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--border);
}

.chat-input-row input {
  flex: 1;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--text);
  font-size: 0.85rem;
}

.chat-input-row input:focus { outline: none; border-color: var(--accent-violet); }

.chat-human-form {
  padding: 16px;
  border-top: 1px solid var(--border);
  max-height: 320px;
  overflow-y: auto;
}

.chat-human-form .field { margin-bottom: 12px; }
.chat-human-form label { font-size: 0.8rem; color: var(--text-muted); display: block; margin-bottom: 6px; }
.chat-human-form input, .chat-human-form textarea {
  width: 100%;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
}

@media (max-width: 480px) {
  .chat-toggle { bottom: 16px; right: 16px; width: 52px; height: 52px; }
  .chat-panel { bottom: 78px; right: 16px; }
}
