/* ============================================
   CILIEGIEFERROVIA.IT — Stile principale
   Design: moderno, mobile-first, responsive
   ============================================ */

/* --- FONT --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Inter:wght@300;400;500;600&display=swap');

/* --- RESET & BASE --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #1a1a1a;
  background: #fff;
  line-height: 1.7;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* --- VARIABILI --- */
:root {
  --red:     #B22222;
  --red-dk:  #8B1A1A;
  --red-lt:  #FDEAEA;
  --green:   #4A7C3F;
  --cream:   #F9F5F0;
  --gray:    #6B6B6B;
  --border:  #E8E0D8;
  --shadow:  0 4px 24px rgba(0,0,0,.08);
  --radius:  12px;
  --max-w:   1140px;
}

/* --- UTILITY --- */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .85rem 2rem; border-radius: 50px; font-size: .95rem;
  font-weight: 600; cursor: pointer; border: 2px solid transparent;
  transition: all .2s ease; text-decoration: none; white-space: nowrap;
}
.btn-primary { background: var(--red); color: #fff; border-color: var(--red); }
.btn-primary:hover { background: var(--red-dk); border-color: var(--red-dk); }
.btn-outline { background: transparent; color: var(--red); border-color: var(--red); }
.btn-outline:hover { background: var(--red); color: #fff; }
.btn-whatsapp { background: #25D366; color: #fff; border-color: #25D366; }
.btn-whatsapp:hover { background: #1ebe5d; }
.btn-lg { padding: 1.1rem 2.5rem; font-size: 1.05rem; }
.tag {
  display: inline-block; font-size: .75rem; font-weight: 600; letter-spacing: .05em;
  text-transform: uppercase; padding: .25rem .75rem; border-radius: 50px;
  background: var(--red-lt); color: var(--red);
}
.text-center { text-align: center; }
.section-label {
  font-size: .75rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--red); margin-bottom: .75rem;
}
.section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700; line-height: 1.2; color: #1a1a1a; margin-bottom: 1.25rem;
}
.section-sub { font-size: 1.05rem; color: var(--gray); max-width: 560px; }
.section-sub.center { margin: 0 auto; }

/* --- NAVBAR --- */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
.navbar .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.nav-logo { display: flex; align-items: center; gap: .75rem; }
.nav-logo img { height: 42px; width: auto; }
.nav-logo-text {
  font-family: 'Playfair Display', serif; font-size: 1.15rem;
  font-weight: 700; color: var(--red-dk); line-height: 1.2;
}
.nav-logo-sub { font-size: .65rem; color: var(--gray); font-family: 'Inter', sans-serif; font-weight: 400; }
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a { font-size: .9rem; font-weight: 500; color: #333; transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--red); }
.nav-dropdown {
  position: relative;
}
.nav-dropdown-toggle {
  font-size: .9rem; font-weight: 500; color: #333; transition: color .2s; cursor: pointer; background: none; border: none; font-family: inherit;
}
.nav-dropdown-toggle::after {
  content: ' ▾'; font-size: .6rem; margin-left: 2px;
}
.nav-dropdown-toggle:hover, .nav-dropdown.active .nav-dropdown-toggle, .nav-dropdown.current .nav-dropdown-toggle { color: var(--red); }
.nav-dropdown-menu {
  display: none; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  box-shadow: var(--shadow); min-width: 210px; z-index: 200; padding: .4rem 0;
}
.nav-dropdown-menu a {
  display: block; padding: .6rem 1.25rem; font-size: .82rem; font-weight: 500;
  color: #333; white-space: nowrap;
}
.nav-dropdown-menu a:hover { background: var(--cream); color: var(--red) !important; }
.nav-dropdown:hover .nav-dropdown-menu, .nav-dropdown.active .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a:first-child { border-radius: 7px 7px 0 0; }
.nav-dropdown-menu a:last-child { border-radius: 0 0 7px 7px; }
.nav-cta { margin-left: 1rem; }
.hamburger {
  display: none; flex-direction: column; gap: 5px; cursor: pointer;
  background: none; border: none; padding: .5rem;
}
.hamburger span { display: block; width: 24px; height: 2px; background: #333; transition: all .3s; border-radius: 2px; }
.mobile-menu {
  display: none; flex-direction: column; background: #fff;
  border-bottom: 1px solid var(--border); padding: 1rem 1.25rem;
}
.mobile-menu a {
  padding: .75rem 0; font-size: 1rem; font-weight: 500;
  border-bottom: 1px solid var(--border); color: #333; display: block;
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu .btn { margin-top: .75rem; width: 100%; justify-content: center; }
.mobile-menu.open { display: flex; }

/* --- HERO --- */
.hero {
  position: relative; min-height: 90vh;
  display: flex; align-items: center; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background-image: url('../images/ciliegie ferrovia.jpg');
  background-size: cover; background-position: center;
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,.62) 0%, rgba(0,0,0,.25) 100%);
}
.hero-content {
  position: relative; z-index: 1;
  color: #fff; max-width: 640px;
}
.hero-content .section-label { color: rgba(255,255,255,.8); }
.hero-content .section-title { color: #fff; font-size: clamp(2rem, 5vw, 3.5rem); }
.hero-content p { font-size: 1.1rem; color: rgba(255,255,255,.88); margin-bottom: 2rem; max-width: 480px; }
.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-badge {
  position: absolute; bottom: 2.5rem; right: 2.5rem; z-index: 1;
  background: rgba(255,255,255,.15); backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.3); border-radius: var(--radius);
  padding: 1rem 1.5rem; color: #fff; text-align: center;
}
.hero-badge strong { display: block; font-size: 2rem; font-weight: 700; line-height: 1; }
.hero-badge span { font-size: .8rem; opacity: .8; }

/* --- TRUST BAR --- */
.trust-bar { background: var(--red); color: #fff; padding: 1.25rem 0; }
.trust-bar .container { display: flex; align-items: center; justify-content: center; gap: 3rem; flex-wrap: wrap; }
.trust-item { display: flex; align-items: center; gap: .6rem; font-size: .9rem; font-weight: 500; }
.trust-icon { font-size: 1.3rem; }

/* --- SECTION SPACING --- */
.section { padding: 5rem 0; }
.section-alt { background: var(--cream); }

/* --- PRODOTTI --- */
.products-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; margin-top: 3rem; }
.product-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: transform .25s, box-shadow .25s;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.product-card.featured { border-color: var(--red); position: relative; }
.product-card.featured::before {
  content: 'Più richiesto'; position: absolute; top: 1rem; right: 1rem;
  background: var(--red); color: #fff; font-size: .72rem; font-weight: 600;
  padding: .3rem .8rem; border-radius: 50px; z-index: 1;
}
.product-img { height: 200px; overflow: hidden; }
.product-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.product-card:hover .product-img img { transform: scale(1.05); }
.product-body { padding: 1.5rem; }
.product-name { font-family: 'Playfair Display', serif; font-size: 1.25rem; font-weight: 700; margin-bottom: .4rem; }
.product-desc { font-size: .9rem; color: var(--gray); margin-bottom: 1rem; }
.product-price { font-size: 1.6rem; font-weight: 700; color: var(--red); margin-bottom: 1rem; }
.product-price span { font-size: .85rem; font-weight: 400; color: var(--gray); }
.product-btn { width: 100%; justify-content: center; }

/* --- STORIA SEZIONE (home) --- */
.story-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.story-img { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.story-img img { width: 100%; height: 420px; object-fit: cover; }
.story-text .section-sub { max-width: 100%; }
.story-text blockquote {
  border-left: 3px solid var(--red); padding-left: 1.25rem;
  margin: 1.5rem 0; font-style: italic; color: var(--gray); font-size: 1rem;
}
.story-link { margin-top: 1.5rem; }

/* --- BENEFITS --- */
.benefits-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; margin-top: 3rem; }
.benefit-card {
  background: #fff; padding: 2rem 1.5rem; border-radius: var(--radius);
  border: 1px solid var(--border); text-align: center;
}
.benefit-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.benefit-title { font-weight: 600; font-size: 1rem; margin-bottom: .5rem; }
.benefit-text { font-size: .9rem; color: var(--gray); }

/* --- TESTIMONIAL --- */
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; margin-top: 3rem; }
.testimonial-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.75rem;
}
.stars { color: #F5A623; font-size: 1rem; margin-bottom: .75rem; }
.testimonial-text { font-size: .95rem; color: #333; line-height: 1.7; margin-bottom: 1rem; font-style: italic; }
.testimonial-author { font-weight: 600; font-size: .9rem; }
.testimonial-city { font-size: .8rem; color: var(--gray); }

/* --- ORDINE URGENZA --- */
.urgency-bar {
  background: var(--red-dk); color: #fff; text-align: center;
  padding: 1rem; font-size: .95rem; font-weight: 500;
}
.urgency-bar strong { font-weight: 700; }

/* --- FORM ORDINE --- */
.order-section { background: var(--cream); }
.order-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 3rem; align-items: start; margin-top: 3rem; }
.order-products { }
.order-prod-item {
  background: #fff; border: 2px solid var(--border); border-radius: var(--radius);
  padding: 1.25rem 1.5rem; margin-bottom: 1rem; cursor: pointer;
  transition: border-color .2s, box-shadow .2s; display: flex; align-items: center; gap: 1rem;
}
.order-prod-item:hover { border-color: var(--red); }
.order-prod-item.selected { border-color: var(--red); background: var(--red-lt); }
.order-prod-item input[type=radio],
.order-prod-item input[type=checkbox] { accent-color: var(--red); width: 18px; height: 18px; flex-shrink: 0; cursor: pointer; }
.order-prod-info { flex: 1; min-width: 0; }
.order-prod-name { font-weight: 700; font-size: 1rem; color: #1a1a1a; line-height: 1.3; }
.order-prod-sub { font-size: .82rem; color: var(--gray); margin-top: .2rem; }
.order-prod-right { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; gap: .2rem; }
.order-prod-price-row { display: flex; align-items: center; gap: .6rem; }
.order-prod-price { font-weight: 700; color: var(--red); font-size: 1.35rem; white-space: nowrap; }
.order-prod-iva { font-size: .72rem; color: var(--gray); white-space: nowrap; }
.order-qty {
  width: 58px; padding: .35rem .4rem; border: 1.5px solid var(--border);
  border-radius: 6px; font-size: .9rem; text-align: center;
  font-family: inherit; color: #1a1a1a; background: #fff;
  transition: border-color .2s; flex-shrink: 0;
}
.order-qty:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(178,34,34,.1); }
.order-form { background: #fff; border-radius: var(--radius); padding: 2rem; border: 1px solid var(--border); }
.form-title { font-family: 'Playfair Display', serif; font-size: 1.4rem; font-weight: 700; margin-bottom: 1.5rem; }
.form-group { margin-bottom: 1.1rem; }
.form-group label { display: block; font-size: .85rem; font-weight: 600; color: #333; margin-bottom: .4rem; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: .75rem 1rem; border: 1.5px solid var(--border);
  border-radius: 8px; font-size: .95rem; font-family: inherit;
  color: #1a1a1a; background: #fff; transition: border-color .2s;
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(178,34,34,.1); }
.form-group textarea { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-submit { width: 100%; justify-content: center; margin-top: 1.5rem; font-size: 1rem; }
.form-note { font-size: .8rem; color: var(--gray); text-align: center; margin-top: .75rem; }
.whatsapp-alt {
  background: var(--cream); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.25rem 1.5rem; margin-top: 1.5rem; text-align: center;
}
.whatsapp-alt p { font-size: .88rem; color: var(--gray); margin-bottom: .75rem; }
.whatsapp-alt .btn { width: 100%; justify-content: center; }
.alert-success {
  display: none; background: #EAF3DE; border: 1px solid #C0DD97;
  border-radius: 8px; padding: 1rem 1.25rem; margin-bottom: 1.5rem;
  font-size: .95rem; color: #27500A;
}
.alert-error {
  display: none; background: #FCEBEB; border: 1px solid #F09595;
  border-radius: 8px; padding: 1rem 1.25rem; margin-bottom: 1.5rem;
  font-size: .95rem; color: #791F1F;
}

/* --- STORIA PAGE --- */
.storia-hero { padding: 5rem 0 3rem; background: var(--cream); }
.storia-content { padding: 4rem 0; }
.storia-content .container { max-width: 800px; margin: 0 auto; }
.storia-content p { font-size: 1.05rem; color: #333; line-height: 1.85; margin-bottom: 1.5rem; text-align: justify; hyphens: none; }
.storia-content h2 { font-family: 'Playfair Display', serif; font-size: 1.75rem; font-weight: 700; color: var(--red-dk); margin: 2.5rem 0 1rem; text-align: left; }
.storia-img-full { border-radius: var(--radius); overflow: hidden; margin: 2.5rem 0; box-shadow: var(--shadow); }
.storia-img-full img { width: 100%; max-height: 420px; object-fit: cover; }

/* --- SALUTE PAGE --- */
.salute-hero { padding: 5rem 0 3rem; background: var(--cream); }
.nutrienti-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.25rem; margin: 2.5rem 0; }
.nutriente-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem; text-align: center;
}
.nutriente-icon { font-size: 2rem; margin-bottom: .75rem; }
.nutriente-name { font-weight: 600; margin-bottom: .4rem; }
.nutriente-desc { font-size: .88rem; color: var(--gray); }

/* --- CONTATTI PAGE --- */
.contatti-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 3rem; align-items: start; margin-top: 3rem; }
.contatti-info { }
.contact-item { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.contact-item:last-child { border-bottom: none; }
.contact-icon { font-size: 1.4rem; flex-shrink: 0; margin-top: .1rem; }
.contact-label { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--gray); }
.contact-value { font-size: 1rem; color: #1a1a1a; font-weight: 500; }
.contact-value a { color: var(--red); }
.map-container { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.map-container iframe { width: 100%; height: 280px; border: none; display: block; }
.contatti-form-wrap { background: var(--cream); border-radius: var(--radius); padding: 2rem; }

/* --- FOOTER --- */
footer {
  background: #1a1a1a; color: rgba(255,255,255,.8);
  padding: 3.5rem 0 1.5rem;
}
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
.footer-brand { }
.footer-brand .nav-logo-text { color: #fff; font-size: 1.25rem; }
.footer-brand .nav-logo-sub { color: rgba(255,255,255,.5); }
.footer-brand p { font-size: .9rem; margin-top: 1rem; color: rgba(255,255,255,.6); line-height: 1.7; }
.footer-col h4 { color: #fff; font-size: .9rem; font-weight: 600; margin-bottom: 1rem; }
.footer-col ul li { margin-bottom: .5rem; }
.footer-col ul li a { font-size: .88rem; color: rgba(255,255,255,.6); transition: color .2s; }
.footer-col ul li a:hover { color: #fff; }
.footer-col .contact-value { font-size: .9rem; color: rgba(255,255,255,.7); }
.footer-col .contact-value a { color: rgba(255,255,255,.9); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1); padding-top: 1.5rem;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
}
.footer-bottom p { font-size: .82rem; color: rgba(255,255,255,.4); }
.social-links { display: flex; gap: 1rem; }
.social-links a {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.1); display: flex; align-items: center;
  justify-content: center; font-size: 1rem; transition: background .2s;
  color: rgba(255,255,255,.7);
}
.social-links a:hover { background: var(--red); color: #fff; }

/* --- PAGINA ACQUISTA --- */
.page-hero {
  background: var(--cream); padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--border);
}
.page-hero .section-title { margin-bottom: .5rem; }

/* --- PRODOTTO NON DISPONIBILE --- */
.product-sold {
  opacity: .6;
  position: relative;
}
.product-sold .product-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.4);
  z-index: 1;
}
.tag-sold {
  background: #888;
  color: #fff;
}
.btn-disabled {
  background: #ccc;
  color: #888;
  border-color: #ccc;
  cursor: not-allowed;
  pointer-events: none;
  width: 100%;
  justify-content: center;
}
.order-prod-sold {
  opacity: .55;
  cursor: default;
  background: #fafafa;
}
.order-prod-sold:hover {
  border-color: var(--border) !important;
  box-shadow: none !important;
}

/* --- SUCCESS PAGE --- */
.success-page { text-align: center; padding: 6rem 0; }
.success-icon { font-size: 4rem; margin-bottom: 1.5rem; }
.success-page h1 { font-family: 'Playfair Display', serif; font-size: 2.5rem; color: var(--green); margin-bottom: 1rem; }
.success-page p { font-size: 1.1rem; color: var(--gray); max-width: 520px; margin: 0 auto 2rem; }

/* --- FAQ --- */
.faq-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  transition: box-shadow .2s;
}
.faq-item:hover { box-shadow: 0 4px 16px rgba(0,0,0,.07); }
.faq-q {
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: .55rem;
}
.faq-q::before {
  content: 'Q: ';
  color: var(--red);
  font-weight: 700;
}
.faq-a {
  font-size: .95rem;
  color: var(--gray);
  line-height: 1.65;
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }
  .story-grid { grid-template-columns: 1fr; }
  .order-grid { grid-template-columns: 1fr; }
  .order-prod-item { flex-wrap: wrap; }
  .order-qty { margin-left: auto !important; }
  .contatti-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-badge { display: none; }
}
@media (max-width: 600px) {
  .trust-bar .container { gap: 1.5rem; }
  .hero { min-height: 80vh; }
  .hero-btns { flex-direction: column; }
  .hero-btns .btn { width: 100%; justify-content: center; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .form-row { grid-template-columns: 1fr; }
  .section { padding: 3.5rem 0; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* --- COOKIE BANNER GDPR --- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(26, 26, 26, .97);
  color: rgba(255, 255, 255, .9);
  padding: 1.25rem 1.5rem;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, .15);
  transform: translateY(0);
  transition: transform .4s ease, opacity .4s ease;
}
.cookie-banner.hidden {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}
.cookie-banner .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.cookie-banner-text {
  font-size: .9rem;
  line-height: 1.6;
  flex: 1;
  min-width: 240px;
}
.cookie-banner-text a {
  color: var(--red);
  text-decoration: underline;
}
.cookie-banner-text a:hover {
  color: #fff;
}
.cookie-banner-btns {
  display: flex;
  gap: .75rem;
  flex-shrink: 0;
}
.cookie-banner-btns .btn {
  font-size: .85rem;
  padding: .6rem 1.5rem;
}
.cookie-banner-btns .btn-outline {
  border-color: rgba(255, 255, 255, .3);
  color: rgba(255, 255, 255, .8);
}
.cookie-banner-btns .btn-outline:hover {
  border-color: #fff;
  color: #fff;
  background: rgba(255, 255, 255, .1);
}
@media (max-width: 600px) {
  .cookie-banner {
    padding: 1rem;
  }
  .cookie-banner .container {
    flex-direction: column;
    align-items: flex-start;
  }
  .cookie-banner-btns {
    width: 100%;
  }
  .cookie-banner-btns .btn {
    flex: 1;
    justify-content: center;
  }
}
