/* ═══════════════════════════════════════════════════════
   TABACCHI & SVAPO DI STICCO MICHELA
   Design System — Chiaro, Elegante, Premium
   Font: Cormorant Garamond (display) + DM Sans (body)
═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ── Variables ───────────────────────────────────────── */
:root {
  --white:        #ffffff;
  --off-white:    #f9f7f4;
  --stone-50:     #faf9f7;
  --stone-100:    #f3f0eb;
  --stone-200:    #e8e3db;
  --stone-300:    #d4cdc2;
  --stone-400:    #b8ae9f;
  --stone-500:    #9c9082;
  --stone-600:    #7a6f63;
  --stone-700:    #5c5248;
  --stone-800:    #3d3530;
  --stone-900:    #221f1b;

  --gold:         #c9a84c;
  --gold-light:   #e8d49e;
  --gold-dark:    #a07c2a;

  --text-primary:   var(--stone-900);
  --text-secondary: var(--stone-700);
  --text-muted:     var(--stone-500);
  --text-light:     var(--stone-400);

  --bg-main:      var(--white);
  --bg-subtle:    var(--stone-50);
  --bg-card:      var(--white);
  --bg-input:     var(--white);

  --border:       var(--stone-200);
  --border-focus: var(--stone-400);

  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-xl:  24px;

  --shadow-sm:  0 1px 3px rgba(34,31,27,.06), 0 1px 2px rgba(34,31,27,.04);
  --shadow-md:  0 4px 16px rgba(34,31,27,.08), 0 2px 6px rgba(34,31,27,.05);
  --shadow-lg:  0 12px 40px rgba(34,31,27,.12), 0 4px 12px rgba(34,31,27,.06);
  --shadow-xl:  0 24px 64px rgba(34,31,27,.15);
  --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.07);

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  --nav-h: 80px;
  --transition: all .4s cubic-bezier(.4, 0, .2, 1);
  --transition-fast: all .2s cubic-bezier(.4, 0, .2, 1);
}

/* ── Animations ──────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.animate-fade-up { animation: fadeInUp .8s ease forwards; }

/* ── Reset & Base ────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text-primary);
  background: var(--bg-main);
  background-image: 
    radial-gradient(at 0% 0%, rgba(201,168,76,0.03) 0, transparent 50%), 
    radial-gradient(at 50% 0%, rgba(201,168,76,0.02) 0, transparent 50%),
    radial-gradient(at 100% 0%, rgba(201,168,76,0.03) 0, transparent 50%);
  background-attachment: fixed;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { cursor: pointer; font-family: inherit; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--stone-100); }
::-webkit-scrollbar-thumb { background: var(--stone-300); border-radius: 3px; }

/* ── Typography ──────────────────────────────────────── */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -.01em;
}
h4, h5, h6 {
  font-family: var(--font-body);
  font-weight: 600;
  line-height: 1.35;
}

.display-serif {
  font-family: var(--font-display);
  font-weight: 300;
}

.label-caps {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ── Navbar ──────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 2rem;
  gap: 2rem;
  z-index: 1000;
  transition: var(--transition);
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--stone-900);
  white-space: nowrap;
}

.navbar-brand .logo-mark {
  width: 34px;
  height: 34px;
  background: var(--stone-900);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  color: var(--white);
  flex-shrink: 0;
}

.navbar-links {
  display: flex;
  list-style: none;
  gap: .25rem;
  margin-left: auto;
}

.navbar-links a {
  display: block;
  padding: .45rem .85rem;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  position: relative;
}

.navbar-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: .85rem;
  right: .85rem;
  height: 1.5px;
  background: var(--gold);
  transform: scaleX(0);
  transition: var(--transition-fast);
  transform-origin: right;
}

.navbar-links a:hover::after,
.navbar-links a.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.navbar-links a:hover,
.navbar-links a.active {
  color: var(--text-primary);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 6px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--stone-700);
  transition: var(--transition);
}

@media (max-width: 768px) {
  .hamburger { display: flex; }
  .navbar-links {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem;
    gap: .25rem;
    box-shadow: var(--shadow-md);
  }
  .navbar-links.open { display: flex; }
  .navbar-links a { padding: .75rem 1rem; font-size: .95rem; }
}

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .65rem 1.4rem;
  font-family: var(--font-body);
  font-size: .875rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: var(--stone-900);
  color: var(--white);
  border-color: var(--stone-900);
}
.btn-primary:hover {
  background: var(--stone-700);
  border-color: var(--stone-700);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--stone-300);
}
.btn-secondary:hover {
  background: var(--stone-50);
  border-color: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

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

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}
.btn-ghost:hover {
  background: var(--stone-100);
  color: var(--text-primary);
}

.btn-gold {
  background: var(--gold);
  color: var(--white);
  border-color: var(--gold);
}
.btn-gold:hover {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
}

.btn-sm  { padding: .4rem .9rem; font-size: .8rem; }
.btn-lg  { padding: .85rem 2rem; font-size: .95rem; }
.btn-xl  { padding: 1rem 2.5rem; font-size: 1rem; }
.btn-block { width: 100%; }

.btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* ── Hero ────────────────────────────────────────────── */
.hero {
  min-height: 92vh;
  padding-top: var(--nav-h);
  display: grid;
  place-items: center;
  background: var(--stone-50);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--gold-light) 0%, transparent 70%);
  opacity: .25;
  pointer-events: none;
  animation: float 15s ease-in-out infinite;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 10%;
  left: -5%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--stone-200) 0%, transparent 65%);
  opacity: .5;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
  padding: 4rem 2rem;
  text-align: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-dark);
  background: rgba(201,168,76,.1);
  border: 1px solid rgba(201,168,76,.25);
  padding: .35rem .9rem;
  border-radius: 50px;
  margin-bottom: 1.75rem;
}

.hero h1 {
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 300;
  line-height: 1.08;
  color: var(--stone-900);
  margin-bottom: 1.25rem;
  letter-spacing: -.03em;
}

.hero h1 em {
  font-style: italic;
  color: var(--gold-dark);
}

.hero p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto 2.5rem;
  font-weight: 300;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Scroll Indicator ────────────────────────────────── */
.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  opacity: 0.6;
}

.mouse {
  width: 24px;
  height: 42px;
  border: 1.5px solid var(--stone-400);
  border-radius: 20px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.wheel {
  width: 2px;
  height: 8px;
  background: var(--gold-dark);
  border-radius: 2px;
  animation: scrollWheel 2s ease-out infinite;
}

@keyframes scrollWheel {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(12px); }
}

/* ── Sections ────────────────────────────────────────── */
.page-wrapper {
  padding-top: var(--nav-h);
}

.section {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-full {
  padding: 5rem 2rem;
  background: var(--stone-50);
}

.section-full-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 300;
  color: var(--stone-900);
  margin-bottom: .75rem;
}

.section-header .subtitle {
  font-size: .95rem;
  color: var(--text-muted);
  font-weight: 300;
  max-width: 460px;
  margin: 0 auto;
}

.section-divider {
  width: 40px;
  height: 1px;
  background: var(--gold);
  margin: 1.25rem auto 0;
}

/* ── Cards ───────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-glass);
  border-color: var(--gold-light);
  transform: translateY(-4px);
}

/* ── Product Grid ────────────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
}

.product-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-8px);
  border-color: var(--gold-light);
}

.product-card-img {
  aspect-ratio: 4/3;
  background: var(--stone-50);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.product-emoji {
  font-size: 3.5rem;
  opacity: .7;
}

.badge-featured {
  position: absolute;
  top: .75rem;
  left: .75rem;
  background: var(--stone-900);
  color: var(--white);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .06em;
  padding: .25rem .65rem;
  border-radius: 50px;
  text-transform: uppercase;
}

.product-card-body {
  padding: 1.25rem;
}

.product-card-body .cat-tag {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: .4rem;
}

.product-card-body h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--stone-900);
  margin-bottom: .5rem;
  line-height: 1.3;
}

.product-card-body .price {
  font-size: 1rem;
  font-weight: 600;
  color: var(--stone-800);
}

/* ── Filter Bar ──────────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.filter-pills {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.filter-pill {
  padding: .4rem 1rem;
  font-size: .8rem;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: 50px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-body);
}

.filter-pill:hover {
  border-color: var(--stone-400);
  color: var(--text-primary);
  background: var(--stone-50);
}

.filter-pill.active {
  background: var(--stone-900);
  color: var(--white);
  border-color: var(--stone-900);
}

/* ── Search Input ────────────────────────────────────── */
.search-wrap {
  position: relative;
  flex: 1;
  max-width: 360px;
}

.search-wrap input {
  width: 100%;
  padding: .6rem 1rem .6rem 2.5rem;
  border: 1px solid var(--border);
  border-radius: 50px;
  background: var(--white);
  font-family: var(--font-body);
  font-size: .875rem;
  color: var(--text-primary);
  transition: var(--transition);
  outline: none;
}

.search-wrap input:focus {
  border-color: var(--stone-500);
  box-shadow: 0 0 0 3px rgba(156,144,130,.12);
}

.search-wrap::before {
  content: '⌕';
  position: absolute;
  left: .85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.1rem;
  pointer-events: none;
}

/* ── Forms ───────────────────────────────────────────── */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: .8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: .4rem;
  letter-spacing: .01em;
}

.form-control {
  width: 100%;
  padding: .7rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  font-family: var(--font-body);
  font-size: .9rem;
  color: var(--text-primary);
  transition: var(--transition);
  outline: none;
  appearance: none;
}

.form-control:focus {
  border-color: var(--stone-500);
  box-shadow: 0 0 0 3px rgba(156,144,130,.12);
}

.form-control::placeholder { color: var(--text-light); }

textarea.form-control {
  resize: vertical;
  min-height: 90px;
}

/* ── Auth Pages ──────────────────────────────────────── */
.auth-container {
  min-height: 100vh;
  padding-top: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--stone-50);
  padding: var(--nav-h) 1.5rem 2rem;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
}

.auth-card h1 {
  font-size: 1.6rem;
  font-weight: 300;
  text-align: center;
  margin-bottom: .5rem;
  color: var(--stone-900);
}

.auth-subtitle {
  text-align: center;
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.auth-tabs {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 3px;
  margin-bottom: 1.75rem;
}

.auth-tab {
  flex: 1;
  padding: .55rem;
  font-size: .825rem;
  font-weight: 500;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: var(--text-muted);
  transition: var(--transition);
  font-family: var(--font-body);
}

.auth-tab.active {
  background: var(--stone-900);
  color: var(--white);
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: .8rem;
  color: var(--text-muted);
}

/* ── Account Dashboard ───────────────────────────────── */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.dashboard-header h1 {
  font-size: 2rem;
  font-weight: 300;
  color: var(--stone-900);
}

/* ── Fidelity Card (account utente) ─────────────────── */
.user-fidelity-banner {
  background: linear-gradient(135deg, var(--stone-900) 0%, #2a2622 100%);
  color: var(--white);
  border-radius: var(--radius-xl);
  padding: 3rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(255,255,255,0.05);
}

.user-fidelity-banner::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -50px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(201,168,76,0.15) 0%, transparent 80%);
  pointer-events: none;
  animation: float 20s infinite alternate;
}

.user-fidelity-banner::after {
  content: '';
  position: absolute;
  bottom: -150px;
  left: -50px;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, transparent 70%);
  pointer-events: none;
}

.user-fidelity-banner .card-label {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
  margin-bottom: .6rem;
}

.user-fidelity-banner h2 {
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--white);
  margin-bottom: 1.5rem;
}

.fidelity-info-row {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.fidelity-info-item .value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 300;
  color: var(--white);
  line-height: 1;
}

.fidelity-info-item .label {
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
  margin-top: .35rem;
}

.fidelity-info-item .regola {
  font-size: .78rem;
  color: rgba(255,255,255,.45);
  margin-top: .2rem;
}

.card-number-badge {
  font-family: 'DM Mono', monospace;
  font-size: .75rem;
  background: rgba(255,255,255,.1);
  padding: .25rem .65rem;
  border-radius: 50px;
  letter-spacing: .1em;
  color: rgba(255,255,255,.7);
  display: inline-block;
  margin-top: 1.25rem;
}

/* ── Tables ──────────────────────────────────────────── */
.table-container {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}

thead th {
  padding: .85rem 1.1rem;
  text-align: left;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--stone-50);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: .9rem 1.1rem;
  border-bottom: 1px solid var(--stone-100);
  color: var(--text-primary);
  vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }

tbody tr:hover td { background: var(--stone-50); }

/* ── Badges ──────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: .25rem .65rem;
  border-radius: 50px;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.badge-success  { background: #ecfdf5; color: #065f46; }
.badge-warning  { background: #fffbeb; color: #92400e; }
.badge-error    { background: #fef2f2; color: #991b1b; }
.badge-neutral  { background: var(--stone-100); color: var(--stone-600); }
.badge-dark     { background: var(--stone-900); color: var(--white); }
.badge-gold     { background: rgba(201,168,76,.12); color: var(--gold-dark); border: 1px solid rgba(201,168,76,.3); }

/* alias backward-compat */
.badge-points   { background: #eff6ff; color: #1e40af; }
.badge-cashback { background: #fff7ed; color: #9a3412; }
.badge-both     { background: rgba(201,168,76,.12); color: var(--gold-dark); }

/* ── Stat Cards (admin) ──────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: var(--transition);
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--stone-300);
}

.stat-card .stat-value {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 300;
  color: var(--stone-900);
  line-height: 1;
  margin-bottom: .5rem;
}

.stat-card .stat-label {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ── Admin Navbar ────────────────────────────────────── */
.admin-tabs {
  display: flex;
  gap: .25rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
  padding-bottom: 0;
}

.admin-tab {
  padding: .7rem 1.1rem;
  font-size: .825rem;
  font-weight: 500;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-body);
  margin-bottom: -1px;
}

.admin-tab:hover { color: var(--text-primary); }

.admin-tab.active {
  color: var(--stone-900);
  border-bottom-color: var(--stone-900);
  font-weight: 600;
}

/* ── Modals ──────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(34,31,27,.4);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 1.5rem;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 2rem;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: modal-in .2s ease-out;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--stone-900);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: none;
  font-size: 1.1rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--stone-100);
  color: var(--text-primary);
}

/* ── Toasts ──────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1.25rem;
  background: var(--stone-900);
  color: var(--white);
  border-radius: var(--radius-md);
  font-size: .875rem;
  font-weight: 500;
  box-shadow: var(--shadow-xl);
  z-index: 9999;
  animation: toast-in .25s ease-out;
  max-width: 340px;
}

.toast-success { background: #064e3b; }
.toast-error   { background: #7f1d1d; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Loading ─────────────────────────────────────────── */
.loading-spinner {
  width: 28px;
  height: 28px;
  border: 2px solid var(--stone-200);
  border-top-color: var(--stone-600);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 3rem auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Empty State ─────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.empty-state .icon { font-size: 2.5rem; margin-bottom: 1rem; opacity: .5; }

.empty-state h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 300;
  margin-bottom: .5rem;
  color: var(--stone-600);
}

.empty-state p { font-size: .875rem; color: var(--text-light); }

/* ── Page Header ─────────────────────────────────────── */
.page-header {
  padding: 4rem 2rem 3rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
  background: var(--stone-50);
}

.page-header h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 300;
  color: var(--stone-900);
  margin-bottom: .75rem;
}

.page-header p {
  font-size: .95rem;
  color: var(--text-muted);
  font-weight: 300;
}

/* ── About Page ──────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 4rem;
  align-items: center;
}

.about-image {
  aspect-ratio: 1;
  background: var(--stone-100);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  color: var(--stone-400);
}

.about-text h2 {
  font-size: 2rem;
  font-weight: 300;
  margin-bottom: 1.25rem;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-weight: 300;
  line-height: 1.8;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.value-card {
  padding: 1.75rem;
}

.value-card .icon {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.value-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: .5rem;
  color: var(--stone-800);
}

.value-card p {
  font-size: .875rem;
  color: var(--text-muted);
  line-height: 1.65;
  font-weight: 300;
}

/* ── Hours Grid ──────────────────────────────────────── */
.hours-grid {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hours-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 2rem;
  text-align: center;
  min-width: 140px;
}

.hours-card strong {
  display: block;
  font-weight: 600;
  color: var(--stone-800);
  margin-bottom: .35rem;
}

.hours-card span {
  font-size: .875rem;
  color: var(--text-muted);
  font-weight: 300;
}

/* ── Footer ──────────────────────────────────────────── */
.footer {
  background: var(--stone-900);
  color: var(--white);
  padding: 4rem 2rem 2rem;
  margin-top: 5rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.footer-col h4 {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
  margin-bottom: 1.25rem;
}

.footer-col a,
.footer-col p {
  display: block;
  font-size: .875rem;
  color: rgba(255,255,255,.65);
  font-weight: 300;
  line-height: 1.7;
  transition: var(--transition);
}

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

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--white);
  margin-bottom: .75rem;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
}

.footer-bottom p {
  font-size: .78rem;
  color: rgba(255,255,255,.35);
  font-weight: 300;
}

/* ── Admin — extra ───────────────────────────────────── */
.section-box {
  background: var(--stone-50);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.section-box-title {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}

.info-item .info-label {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-bottom: .2rem;
}

.info-item .info-value {
  font-size: .9rem;
  color: var(--text-primary);
  font-weight: 400;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .hero { min-height: 85vh; }
  .hero h1 { font-size: 2.8rem; }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .about-image { max-width: 200px; margin: 0 auto; }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .section { padding: 3rem 1.25rem; }
  .section-full { padding: 3rem 1.25rem; }

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

  .admin-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 480px) {
  .auth-card { padding: 1.75rem 1.25rem; }
  .modal { padding: 1.5rem 1.25rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Prodotto Detail Page ────────────────────────────── */
.product-detail {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 2rem;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3.5rem;
  align-items: start;
}

.product-detail-img {
  aspect-ratio: 1;
  background: var(--stone-50);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6rem;
  border: 1px solid var(--border);
}

.product-detail-body h1 {
  font-size: 2rem;
  font-weight: 300;
  margin-bottom: .75rem;
}

.product-detail-body .price {
  font-size: 1.75rem;
  font-weight: 300;
  font-family: var(--font-display);
  color: var(--stone-800);
  margin-bottom: 1.5rem;
}

@media (max-width: 640px) {
  .product-detail {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* ── Errors ──────────────────────────────────────────── */
.error-box {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: 1rem 1.25rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-md);
  color: #991b1b;
  font-size: .875rem;
}

/* ── Toast Notifications ────────────────────────── */
#toast-container {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 300px;
  max-width: 450px;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  animation: toast-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: all 0.3s ease;
}

.toast.toast-error {
  border-left: 4px solid #ef4444;
  color: #991b1b;
}

.toast.toast-success {
  border-left: 4px solid var(--gold);
  color: var(--stone-900);
}

.toast-exit {
  animation: toast-out 0.4s cubic-bezier(0.7, 0, 0.84, 0) forwards;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(100%) scale(0.9); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toast-out {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to { opacity: 0; transform: translateX(100%) scale(0.9); }
}

@media (max-width: 640px) {
  #toast-container {
    top: auto;
    bottom: 2rem;
    right: 1rem;
    left: 1rem;
  }
  .toast {
    min-width: 0;
    width: 100%;
  }
}

