/* =============================================================
   EmporiumOnline — CSS Design System
   Tema: Esplosione di Colori — Moderno, Vivace, Professionale
   ============================================================= */

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --pink:    #ff6b9d;
  --purple:  #a78bfa;
  --green:   #34d399;
  --yellow:  #fbbf24;
  --orange:  #fb923c;
  --blue:    #38bdf8;
  --rose:    #f472b6;
  --indigo:  #818cf8;
  --teal:    #2dd4bf;
  --red:     #f87171;

  --dark:    #1a0a2e;
  --darker:  #100720;
  --card-bg: rgba(255,255,255,0.12);
  --card-hover: rgba(255,255,255,0.20);
  --text:    #ffffff;
  --muted:   rgba(255,255,255,0.7);

  --radius:  16px;
  --radius-sm: 10px;
  --shadow:  0 8px 32px rgba(0,0,0,.25);
  --shadow-lg: 0 20px 60px rgba(0,0,0,.35);

  --gradient-main: linear-gradient(135deg, #ff6b9d, #a78bfa, #38bdf8);
  --gradient-warm: linear-gradient(135deg, #ff6b9d, #fbbf24);
  --gradient-cool: linear-gradient(135deg, #a78bfa, #38bdf8);
  --gradient-rainbow: linear-gradient(90deg, #ff6b9d, #fb923c, #fbbf24, #34d399, #38bdf8, #a78bfa);

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: #1a0a2e;
  background-image:
    radial-gradient(ellipse at 0% 0%, #ff6b9d55 0%, transparent 50%),
    radial-gradient(ellipse at 100% 0%, #38bdf855 0%, transparent 50%),
    radial-gradient(ellipse at 100% 100%, #a78bfa55 0%, transparent 50%),
    radial-gradient(ellipse at 0% 100%, #fbbf2455 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, #34d39933 0%, transparent 70%);
  animation: bgShift 12s ease-in-out infinite alternate;
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}

@keyframes bgShift {
  0%   {
    background-image:
      radial-gradient(ellipse at 0% 0%, #ff6b9d66 0%, transparent 50%),
      radial-gradient(ellipse at 100% 0%, #38bdf866 0%, transparent 50%),
      radial-gradient(ellipse at 100% 100%, #a78bfa66 0%, transparent 50%),
      radial-gradient(ellipse at 0% 100%, #fbbf2466 0%, transparent 50%),
      radial-gradient(ellipse at 50% 50%, #34d39944 0%, transparent 70%);
  }
  25%  {
    background-image:
      radial-gradient(ellipse at 30% 10%, #fbbf2466 0%, transparent 50%),
      radial-gradient(ellipse at 90% 20%, #ff6b9d66 0%, transparent 50%),
      radial-gradient(ellipse at 70% 90%, #38bdf866 0%, transparent 50%),
      radial-gradient(ellipse at 10% 80%, #a78bfa66 0%, transparent 50%),
      radial-gradient(ellipse at 50% 50%, #fb923c44 0%, transparent 70%);
  }
  50%  {
    background-image:
      radial-gradient(ellipse at 80% 10%, #a78bfa66 0%, transparent 50%),
      radial-gradient(ellipse at 20% 30%, #34d39966 0%, transparent 50%),
      radial-gradient(ellipse at 50% 80%, #ff6b9d66 0%, transparent 50%),
      radial-gradient(ellipse at 90% 70%, #fbbf2466 0%, transparent 50%),
      radial-gradient(ellipse at 50% 50%, #38bdf844 0%, transparent 70%);
  }
  75%  {
    background-image:
      radial-gradient(ellipse at 60% 5%, #38bdf866 0%, transparent 50%),
      radial-gradient(ellipse at 5% 50%, #fb923c66 0%, transparent 50%),
      radial-gradient(ellipse at 95% 50%, #34d39966 0%, transparent 50%),
      radial-gradient(ellipse at 40% 95%, #ff6b9d66 0%, transparent 50%),
      radial-gradient(ellipse at 50% 50%, #a78bfa44 0%, transparent 70%);
  }
  100% {
    background-image:
      radial-gradient(ellipse at 100% 100%, #ff6b9d66 0%, transparent 50%),
      radial-gradient(ellipse at 0% 100%, #38bdf866 0%, transparent 50%),
      radial-gradient(ellipse at 0% 0%, #a78bfa66 0%, transparent 50%),
      radial-gradient(ellipse at 100% 0%, #fbbf2466 0%, transparent 50%),
      radial-gradient(ellipse at 50% 50%, #34d39944 0%, transparent 70%);
  }
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

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

/* ===== NAVBAR ===== */
.navbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 32px;
  background: rgba(255,255,255,0.10);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 2px 24px rgba(0,0,0,.15);
}

.nav-brand {
  display: flex; align-items: center; gap: 8px;
  font-size: 1.3rem; font-weight: 700;
}
.brand-emoji { font-size: 1.6rem; }
.brand-name strong { color: var(--pink); }

.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  font-size: .9rem; font-weight: 500; color: var(--muted);
  transition: color .2s;
  position: relative;
}
.nav-links a:hover { color: var(--text); }
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
  height: 2px; background: var(--gradient-warm); border-radius: 2px;
  transform: scaleX(0); transition: transform .2s;
}
.nav-links a:hover::after { transform: scaleX(1); }

.nav-admin {
  background: rgba(167,139,250,.15);
  border: 1px solid rgba(167,139,250,.3);
  padding: 6px 14px !important;
  border-radius: 99px;
  font-size: .8rem !important;
}
.nav-admin:hover { background: rgba(167,139,250,.25); }

.nav-toggle {
  display: none; background: none; border: none;
  color: var(--text); font-size: 1.5rem; cursor: pointer;
}

@media(max-width: 768px) {
  .navbar { padding: 12px 16px; }
  .nav-links {
    display: none; flex-direction: column;
    position: absolute; top: 56px; left: 0; right: 0;
    background: rgba(26,10,46,.92); backdrop-filter: blur(20px);
    padding: 20px 24px; gap: 16px;
    border-bottom: 1px solid rgba(255,255,255,.12);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
}

/* ===== HERO ===== */
.hero {
  min-height: 85vh;
  display: flex; align-items: center; justify-content: center;
  padding: 80px 24px;
  position: relative; overflow: hidden;
  text-align: center;
}

.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  overflow: hidden;
}

.blob {
  position: absolute; border-radius: 50%;
  filter: blur(100px); opacity: .4;
  animation: blobFloat 8s ease-in-out infinite;
}
.blob-1 { width: 500px; height: 500px; background: var(--pink); top: -10%; left: -10%; animation-delay: 0s; }
.blob-2 { width: 400px; height: 400px; background: var(--purple); bottom: -5%; right: -5%; animation-delay: 2s; }
.blob-3 { width: 350px; height: 350px; background: var(--blue); top: 30%; right: 20%; animation-delay: 4s; }
.blob-4 { width: 300px; height: 300px; background: var(--yellow); bottom: 20%; left: 15%; animation-delay: 6s; }

@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

.hero-content {
  position: relative; z-index: 2;
  max-width: 700px;
}

.hero-badge {
  display: inline-block;
  background: rgba(255,107,157,.12);
  border: 1px solid rgba(255,107,157,.25);
  color: var(--pink);
  padding: 8px 20px; border-radius: 99px;
  font-size: .85rem; font-weight: 600;
  margin-bottom: 28px;
  animation: badgePulse 3s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,107,157,.2); }
  50% { box-shadow: 0 0 0 12px rgba(255,107,157,0); }
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 900; line-height: 1.1;
  margin-bottom: 20px;
}

.gradient-text {
  background: var(--gradient-rainbow);
  background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s linear infinite;
}
@keyframes gradientShift {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.hero p {
  font-size: 1.1rem; color: var(--muted);
  margin-bottom: 36px; line-height: 1.7;
  max-width: 550px; margin-left: auto; margin-right: auto;
}

.hero-stats {
  display: flex; justify-content: center; gap: 40px;
  margin-bottom: 40px;
}
.stat { text-align: center; }
.stat-number {
  display: block; font-size: 2rem; font-weight: 900;
  background: var(--gradient-warm);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

@media(max-width: 600px) {
  .hero { min-height: 75vh; padding: 60px 16px; }
  .hero-stats { gap: 24px; }
  .stat-number { font-size: 1.6rem; }
}

/* ===== BUTTONS ===== */
.btn {
  padding: 14px 28px; border-radius: 99px;
  font-size: .95rem; font-weight: 600; cursor: pointer;
  border: none; transition: var(--transition);
  display: inline-flex; align-items: center; gap: 8px;
  text-align: center; justify-content: center;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.3); }

.btn-primary {
  background: var(--gradient-warm); color: #fff;
  box-shadow: 0 4px 16px rgba(255,107,157,.3);
}
.btn-primary:hover { box-shadow: 0 8px 28px rgba(255,107,157,.4); }

.btn-lg { padding: 16px 36px; font-size: 1.05rem; }

.btn-glass {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  color: var(--text);
  backdrop-filter: blur(8px);
}
.btn-glass:hover { background: rgba(255,255,255,.14); }

/* ===== SECTIONS ===== */
.section { padding: 80px 0; }
.section-dark { background: rgba(255,255,255,.04); }

.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 { font-size: 2rem; font-weight: 800; margin-bottom: 10px; }
.section-header p { color: var(--muted); font-size: 1.05rem; max-width: 500px; margin: 0 auto; }

.section-badge {
  display: inline-block;
  background: rgba(255,107,157,.12); color: var(--pink);
  padding: 6px 16px; border-radius: 99px;
  font-size: .75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  margin-bottom: 16px;
}
.badge-rainbow {
  background: var(--gradient-rainbow); color: #fff;
  background-size: 200% auto;
  animation: gradientShift 3s linear infinite;
}
.badge-yellow { background: rgba(251,191,36,.15); color: var(--yellow); }

/* ===== PRODUCTS GRID ===== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

/* ===== PRODUCT CARD ===== */
.product-card {
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid rgba(255,255,255,.22);
  position: relative;
  box-shadow: 0 4px 24px rgba(0,0,0,.15);
}
.product-card:hover {
  transform: translateY(-8px);
  background: rgba(255,255,255,0.20);
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  border-color: rgba(255,255,255,.35);
}

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

.card-image {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: linear-gradient(135deg, var(--clr1, #ff6b9d), var(--clr2, #a78bfa));
}
.card-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 0;
}
.product-card:hover .card-image img {
  transform: scale(1.06);
}

/* Badge Offerta */
.offer-badge {
  position: absolute; top: 12px; left: 12px; z-index: 3;
  background: var(--gradient-warm); color: #fff;
  padding: 5px 14px; border-radius: 99px;
  font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em;
  box-shadow: 0 4px 12px rgba(255,107,157,.3);
}

/* Badge Data */
.date-label {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  background: rgba(0,0,0,.5); color: #fff;
  backdrop-filter: blur(8px);
  padding: 4px 10px; border-radius: 99px;
  font-size: .65rem; font-weight: 600;
}

/* Card Body */
.card-body { padding: 16px 18px 18px; }

.card-category {
  font-size: .7rem; font-weight: 700; color: var(--purple);
  text-transform: uppercase; letter-spacing: .06em;
  margin-bottom: 6px;
}

.card-title {
  font-size: .95rem; font-weight: 600;
  line-height: 1.3; margin-bottom: 10px;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.6em;
}

.card-price { margin-bottom: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.price-current {
  font-size: 1.3rem; font-weight: 800; color: var(--yellow);
}
.price-old {
  font-size: .85rem; color: var(--muted);
  text-decoration: line-through;
}
.price-check {
  font-size: .8rem; color: var(--muted); font-style: italic;
}

.discount-badge {
  display: inline-block;
  background: var(--green); color: #000;
  font-size: .65rem; font-weight: 700;
  padding: 3px 8px; border-radius: 99px;
}

/* CTA Button */
.card-cta { margin-bottom: 8px; }
.cta-btn {
  display: block; width: 100%; text-align: center;
  padding: 12px 16px; border-radius: 99px;
  font-weight: 700; font-size: .85rem;
  background: linear-gradient(135deg, var(--yellow), var(--orange));
  color: #000;
  transition: var(--transition);
  box-shadow: 0 4px 16px rgba(251,191,36,.2);
}
.product-card:hover .cta-btn {
  box-shadow: 0 6px 24px rgba(251,191,36,.35);
  transform: translateY(-1px);
}

.card-disclaimer {
  font-size: .6rem; color: var(--muted);
  text-align: center; line-height: 1.4;
}

/* Empty State */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 24px;
  color: var(--muted);
  font-size: 1.1rem;
}

/* ===== FILTER BAR ===== */
.filter-bar {
  display: flex; gap: 10px; flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 32px;
}

.filter-btn {
  background: rgba(255,255,255,0.10);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.18);
  color: var(--text);
  padding: 8px 18px; border-radius: 99px;
  font-size: .8rem; font-weight: 600;
  cursor: pointer; transition: var(--transition);
  font-family: var(--font);
}
.filter-btn:hover {
  border-color: rgba(255,255,255,.2);
  color: var(--text);
}
.filter-btn.active {
  background: var(--gradient-warm); color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(255,107,157,.25);
}

/* ===== CATEGORIES GRID ===== */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}

.color-cat-card {
  display: flex; flex-direction: column;
  align-items: center; gap: 8px;
  padding: 24px 12px;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.10);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 2px solid rgba(255,255,255,.18);
  transition: var(--transition);
  cursor: pointer;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.color-cat-card::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at center, var(--cat-color), transparent 70%);
  opacity: .08;
  transition: opacity .3s;
}
.color-cat-card:hover {
  border-color: var(--cat-color);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
}
.color-cat-card:hover::before { opacity: .15; }

.cat-icon { font-size: 2.4rem; position: relative; z-index: 1; }
.cat-name {
  font-size: .8rem; font-weight: 700; color: var(--text);
  position: relative; z-index: 1;
}
.cat-count {
  position: absolute; top: 8px; right: 8px;
  background: var(--cat-color); color: #fff;
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; font-size: .65rem; font-weight: 700;
}

@media(max-width: 500px) {
  .categories-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .color-cat-card { padding: 16px 8px; }
  .cat-icon { font-size: 1.8rem; }
}

/* ===== HOW IT WORKS ===== */
.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}
.how-card {
  background: rgba(255,255,255,0.10);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius);
  padding: 36px 28px;
  text-align: center;
  border: 1px solid rgba(255,255,255,.18);
  transition: var(--transition);
}
.how-card:hover {
  transform: translateY(-4px);
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,.3);
}
.how-icon { font-size: 2.8rem; display: block; margin-bottom: 16px; }
.how-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; }
.how-card p { font-size: .9rem; color: var(--muted); line-height: 1.6; }

/* ===== PROMO BANNER ===== */
.promo-banner {
  background: var(--gradient-main);
  padding: 60px 24px; text-align: center;
  position: relative; overflow: hidden;
}
.promo-banner::before {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 20px,
    rgba(255,255,255,.03) 20px,
    rgba(255,255,255,.03) 40px
  );
}
.promo-banner h2 {
  font-size: 1.8rem; font-weight: 800;
  margin-bottom: 12px; position: relative;
}
.promo-banner p {
  font-size: 1.05rem; opacity: .9;
  position: relative;
}

/* ===== NEWSLETTER ===== */
.newsletter-box {
  max-width: 520px; margin: 0 auto;
  text-align: center;
}
.newsletter-box h2 { font-size: 1.7rem; font-weight: 800; margin-bottom: 12px; }
.newsletter-box > p { color: var(--muted); margin-bottom: 28px; }

.newsletter-form { display: flex; gap: 12px; margin-bottom: 12px; }
.newsletter-form input {
  flex: 1; padding: 14px 20px; border-radius: 99px;
  border: 2px solid rgba(255,255,255,.20);
  background: rgba(255,255,255,0.10); color: var(--text);
  font-size: .95rem; font-family: var(--font);
  transition: border-color .2s;
}
.newsletter-form input:focus { outline: none; border-color: var(--purple); }
.newsletter-note { font-size: .75rem; color: var(--muted); }

@media(max-width: 500px) {
  .newsletter-form { flex-direction: column; }
  .newsletter-form input, .newsletter-form .btn { border-radius: var(--radius); }
}

/* ===== FOOTER ===== */
.footer { background: rgba(0,0,0,.35); backdrop-filter: blur(20px); padding: 60px 0 24px; border-top: 1px solid rgba(255,255,255,.10); }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px; margin-bottom: 40px;
}
.footer-col h3 { font-size: 1.1rem; margin-bottom: 16px; color: var(--pink); }
.footer-col h4 {
  font-size: .8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted); margin-bottom: 14px;
}
.footer-col p { color: var(--muted); font-size: .85rem; line-height: 1.7; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul a {
  color: var(--muted); font-size: .85rem; transition: color .2s;
}
.footer-col ul a:hover { color: var(--text); }

.footer-disclaimer {
  border: 1px solid rgba(251,191,36,.12);
  background: rgba(251,191,36,.04);
  border-radius: var(--radius-sm);
  padding: 16px 24px; margin-bottom: 24px;
}
.footer-disclaimer p {
  font-size: .72rem; color: var(--muted);
  text-align: center; line-height: 1.6;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.05);
  padding-top: 20px; text-align: center;
}
.footer-bottom p { font-size: .75rem; color: var(--muted); }

@media(max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-grid > .footer-col:first-child { grid-column: 1 / -1; }
}

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 32px; right: 32px; z-index: 999;
  background: var(--green); color: #000;
  padding: 14px 24px; border-radius: var(--radius);
  font-weight: 600; font-size: .9rem;
  transform: translateY(120px); opacity: 0;
  transition: transform .4s cubic-bezier(0.4, 0, 0.2, 1), opacity .4s;
  box-shadow: 0 8px 24px rgba(52,211,153,.2);
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--darker); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--pink), var(--purple));
  border-radius: 4px;
}

/* ===== SELECTION ===== */
::selection {
  background: rgba(167,139,250,.3);
  color: var(--text);
}
