/* ============================================================
   ADRIANAUTO — Base & Reset — GOLD EDITION
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Global cinematic red edge vignette */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 9999;
  pointer-events: none;
  background:
    radial-gradient(ellipse 100% 100% at 50% 50%,
      transparent 60%,
      rgba(100,0,10,.18) 100%);
  animation: globalVignette 6s ease-in-out infinite;
}
@keyframes globalVignette {
  0%,100% { opacity: .7; }
  50%      { opacity: 1; }
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select, textarea { font-family: inherit; }
ul, ol { list-style: none; }

::selection { background: var(--gold-500); color: #000; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--gray-50); }
::-webkit-scrollbar-thumb { background: var(--gold-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-400); }

/* ── Layout */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
@media (max-width:768px) { .container { padding: 0 16px; } }

.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;
}

.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.gap-32 { gap: 32px; }

/* ── Typography */
.text-xs   { font-size: 12px; }
.text-sm   { font-size: 13px; }
.text-base { font-size: 15px; }
.text-lg   { font-size: 18px; }
.text-xl   { font-size: 22px; }
.text-muted { color: var(--text-muted); }
.text-soft  { color: var(--text-soft); }
.text-gold  { color: var(--gold-500); }
.font-bold  { font-weight: 700; }
.font-semi  { font-weight: 600; }
.font-display { font-family: var(--font-display); }
.uppercase { text-transform: uppercase; letter-spacing: .5px; }

/* ── Badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 100px;
  font-size: 11px; font-weight: 600; letter-spacing: .3px;
}
.badge-gold  { background: var(--gold-100);  color: var(--gold-800); }
.badge-green { background: #dcfce7; color: #15803d; }
.badge-red   { background: #fee2e2; color: #dc2626; }
.badge-gray  { background: var(--gray-100); color: var(--gray-600); }

/* ── Buttons */
button { cursor: pointer; border: none; background: none; transition: all var(--t-base); }
button:disabled { opacity: .5; cursor: not-allowed; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-weight: 600; letter-spacing: .2px;
  border-radius: var(--radius); cursor: pointer;
  transition: all var(--t-base);
  text-decoration: none; border: none; outline: none;
  white-space: nowrap; flex-shrink: 0;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary {
  background: var(--gold-500); color: #fff;
  padding: 11px 24px;
  font-size: 14px; font-weight: 700;
  box-shadow: 0 2px 8px rgba(232,20,42,.35);
}
.btn-primary:hover:not(:disabled) {
  background: var(--gold-600);
  box-shadow: var(--shadow-gold), 0 0 20px rgba(232,20,42,.4);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent; color: var(--text);
  padding: 10px 22px; border-radius: var(--radius);
  border: 1.5px solid var(--border);
  font-size: 14px;
}
.btn-outline:hover:not(:disabled) { background: var(--gray-50); border-color: var(--gray-300); }

.btn-ghost {
  background: transparent; color: var(--text-soft);
  padding: 9px 16px; border-radius: var(--radius);
  font-size: 13px;
}
.btn-ghost:hover:not(:disabled) { background: var(--gray-100); color: var(--text); }

.btn-danger {
  background: #fef2f2; color: var(--red);
  padding: 8px 16px; border-radius: var(--radius);
  border: 1px solid #fecaca; font-size: 13px;
}
.btn-danger:hover:not(:disabled) { background: #fee2e2; }

.btn-success {
  background: #f0fdf4; color: var(--green);
  padding: 8px 16px; border-radius: var(--radius);
  border: 1px solid #bbf7d0; font-size: 13px;
}
.btn-success:hover:not(:disabled) { background: #dcfce7; }

.btn-sm { padding: 7px 14px; font-size: 12px; }
.btn-lg { padding: 14px 32px; font-size: 15px; }
.btn-full { width: 100%; }

.btn-white {
  background: rgba(255,255,255,.12); color: #fff;
  padding: 11px 24px; border-radius: var(--radius);
  border: 1.5px solid rgba(255,255,255,.2);
  font-size: 14px;
}
.btn-white:hover:not(:disabled) { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.35); }

.btn-wa {
  background: #25d366; color: #fff;
  padding: 12px 24px; border-radius: var(--radius);
  font-size: 14px;
}
.btn-wa:hover:not(:disabled) { background: #22bc5e; }

/* ── Forms */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--text); margin-bottom: 6px;
}
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 10px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px; font-family: var(--font-body);
  color: var(--text); background: var(--white);
  outline: none;
  transition: border-color var(--t-base), box-shadow var(--t-base);
  appearance: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(232,20,42,.12);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }
.form-textarea { resize: vertical; min-height: 90px; line-height: 1.6; }
.form-select { cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media(max-width:600px) { .form-2col { grid-template-columns: 1fr; } }
.form-error { font-size: 12px; color: var(--red); margin-top: 5px; display: none; }
.form-error.show { display: block; }

/* ── Cards */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
}

/* ── Section headers */
.section-tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(232,20,42,.08);
  color: var(--chrome-red);
  border: 1px solid rgba(232,20,42,.2);
  font-size: 12px; font-weight: 700;
  padding: 5px 13px; border-radius: 100px;
  text-transform: uppercase; letter-spacing: .5px;
  margin-bottom: 14px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.5vw, 52px);
  font-weight: 700; line-height: 1.1;
  color: var(--navy); margin-bottom: 14px;
}
.section-title em { color: var(--chrome-red); font-style: italic; }
.section-title.on-dark { color: #fff; }
.section-title.on-dark em { color: var(--chrome-red-light); }
.section-desc {
  font-size: 16px; line-height: 1.8;
  color: var(--text-soft); max-width: 560px;
}
.section-desc.on-dark { color: rgba(255,255,255,.55); }

/* ── Loader */
#page-loader {
  position: fixed; inset: 0; z-index: 9999;
  background: linear-gradient(160deg, #0d0103 0%, #1e0407 50%, #0a0103 100%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 20px;
  transition: opacity .7s cubic-bezier(.22,1,.36,1), visibility .7s;
  overflow: hidden;
}
/* Letterbox bars */
#page-loader::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 60px;
  background: #000;
  animation: letterboxTop .8s .2s cubic-bezier(.22,1,.36,1) forwards;
}
#page-loader::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 60px;
  background: #000;
  animation: letterboxBottom .8s .2s cubic-bezier(.22,1,.36,1) forwards;
}
@keyframes letterboxTop    { to { transform: translateY(-100%); } }
@keyframes letterboxBottom { to { transform: translateY(100%);  } }

#page-loader.done { opacity: 0; visibility: hidden; }
.loader-logo {
  font-family: var(--font-display);
  font-size: 28px; font-weight: 700;
  color: #fff; letter-spacing: 1px;
  text-shadow: 0 0 30px rgba(232,20,42,.5);
  animation: loaderLogoFlicker 1.3s ease-out;
}
.loader-logo em { color: var(--chrome-red); font-style: normal; }
@keyframes loaderLogoFlicker {
  0%  { opacity: 0; transform: scale(.95); }
  30% { opacity: 1; transform: scale(1.02); }
  60% { opacity: .8; }
  100%{ opacity: 1; transform: scale(1); }
}
.loader-bar-wrap {
  width: 180px; height: 2px;
  background: rgba(255,255,255,.08); border-radius: 2px; overflow: hidden;
}
.loader-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--chrome-red-dark), var(--chrome-red-light));
  box-shadow: 0 0 10px rgba(232,20,42,.6);
  animation: loaderFill 1.3s ease-out forwards; width: 0;
}
@keyframes loaderFill { to { width: 100%; } }

/* ── Toast */
#toast {
  position: fixed; bottom: 96px; left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--navy); color: #fff;
  padding: 12px 22px; border-radius: var(--radius);
  font-size: 13px; font-weight: 500;
  z-index: 10000; opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s;
  box-shadow: var(--shadow-xl); white-space: nowrap;
  max-width: 90vw;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Progress bar */
#scroll-progress {
  position: fixed; top: 0; left: 0; z-index: 600;
  height: 3px; background: var(--gold-500);
  width: 0%; transition: width .08s linear;
  border-radius: 0 2px 2px 0;
}

/* ── Scroll animations — Cinematic */
.reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity .75s cubic-bezier(.22,1,.36,1), transform .75s cubic-bezier(.22,1,.36,1);
  filter: blur(2px);
}
.reveal.visible { opacity: 1; transform: translateY(0); filter: blur(0); }
.reveal-left {
  opacity: 0; transform: translateX(-36px);
  transition: opacity .75s cubic-bezier(.22,1,.36,1), transform .75s cubic-bezier(.22,1,.36,1), filter .75s ease;
  filter: blur(2px);
}
.reveal-left.visible { opacity: 1; transform: translateX(0); filter: blur(0); }
.reveal-right {
  opacity: 0; transform: translateX(36px);
  transition: opacity .75s cubic-bezier(.22,1,.36,1), transform .75s cubic-bezier(.22,1,.36,1), filter .75s ease;
  filter: blur(2px);
}
.reveal-right.visible { opacity: 1; transform: translateX(0); filter: blur(0); }

/* ── WhatsApp float */
#wa-float {
  position: fixed; bottom: 28px; right: 28px; z-index: 800;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25d366;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; text-decoration: none;
  box-shadow: 0 4px 20px rgba(37,211,102,.4);
  transition: transform var(--t-base), box-shadow var(--t-base);
  animation: waPop .5s 2s cubic-bezier(.22,1,.36,1) both;
}
#wa-float:hover { transform: scale(1.08); box-shadow: 0 6px 28px rgba(37,211,102,.55); }
@keyframes waPop { from{opacity:0;transform:scale(.5)} to{opacity:1;transform:scale(1)} }

/* ── Admin trigger */
#admin-trigger {
  position: fixed; bottom: 28px; left: 28px; z-index: 800;
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(15,23,42,.06); border: 1.5px solid rgba(15,23,42,.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; cursor: pointer;
  transition: all var(--t-base); opacity: .35;
}
#admin-trigger:hover { opacity: 1; background: rgba(15,23,42,.1); transform: rotate(20deg); }

/* ── Animations */
@keyframes fadeUp   { from{opacity:0;transform:translateY(28px);filter:blur(3px)} to{opacity:1;transform:none;filter:blur(0)} }
@keyframes fadeIn   { from{opacity:0} to{opacity:1} }
@keyframes slideIn  { from{opacity:0;transform:translateX(20px)} to{opacity:1;transform:none} }
@keyframes pulse    { 0%,100%{opacity:1} 50%{opacity:.3} }
@keyframes spin     { to{transform:rotate(360deg)} }
.spin { animation: spin 1s linear infinite; }

/* ══════════════════════════════════════════════════════
   INLINE EDIT — Editing toolbar that appears on hover
   ══════════════════════════════════════════════════════ */
.admin-mode [data-editable] {
  position: relative;
  cursor: pointer;
}
.admin-mode [data-editable]:hover::after {
  content: '✏️ Modifica';
  position: absolute; top: -28px; left: 0;
  background: var(--gold-500); color: #000;
  font-size: 10px; font-weight: 700;
  padding: 3px 8px; border-radius: 4px;
  white-space: nowrap; pointer-events: none;
  z-index: 100; font-family: var(--font-body);
  letter-spacing: .3px;
}
.admin-mode [data-editable]:hover {
  outline: 2px dashed var(--gold-400);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Inline edit popover */
.inline-edit-popover {
  position: fixed; z-index: 9500;
  background: #fff;
  border: 1.5px solid var(--gold-300);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  padding: 16px;
  width: 340px;
  max-width: 92vw;
  animation: fadeUp .18s ease;
}
.inline-edit-popover h4 {
  font-size: 12px; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; color: var(--gold-700);
  margin-bottom: 10px;
}
.inline-edit-popover textarea,
.inline-edit-popover input {
  width: 100%; padding: 9px 12px;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-size: 14px; font-family: var(--font-body);
  resize: vertical; outline: none;
  transition: border-color var(--t-base);
}
.inline-edit-popover textarea:focus,
.inline-edit-popover input:focus {
  border-color: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(232,20,42,.1);
}
.inline-edit-popover textarea { min-height: 70px; }
.inline-edit-actions {
  display: flex; gap: 8px; margin-top: 10px;
}
.inline-edit-actions .btn-save-inline {
  flex: 1; background: var(--gold-500); color: #000;
  padding: 8px 16px; border-radius: var(--radius);
  font-size: 13px; font-weight: 700; border: none; cursor: pointer;
}
.inline-edit-actions .btn-save-inline:hover { background: var(--gold-600); }
.inline-edit-actions .btn-cancel-inline {
  background: var(--gray-100); color: var(--text-soft);
  padding: 8px 14px; border-radius: var(--radius);
  font-size: 13px; border: none; cursor: pointer;
}
.inline-edit-actions .btn-cancel-inline:hover { background: var(--gray-200); }

/* Admin mode bar at top */
#admin-mode-bar {
  display: none;
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  background: linear-gradient(90deg, #c0102a, #e8142a);
  color: #000;
  padding: 8px 20px;
  font-size: 12px; font-weight: 700;
  align-items: center; justify-content: space-between;
  gap: 12px; letter-spacing: .3px;
}
#admin-mode-bar.active { display: flex; }
body.admin-active { padding-top: 38px; }
#admin-mode-bar .bar-actions { display: flex; gap: 8px; align-items: center; }
#admin-mode-bar button {
  background: rgba(0,0,0,.12); color: #000;
  padding: 4px 12px; border-radius: 100px;
  font-size: 11px; font-weight: 700; cursor: pointer; border: none;
}
#admin-mode-bar button:hover { background: rgba(0,0,0,.2); }
