/* Italvibras Catalog — Main Styles */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif; color: #333; line-height: 1.6; background: #fff; }
a { color: #C8001E; text-decoration: none; }
a:hover { opacity: 0.85; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.flex-header { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 15px 0; }

/* Header */
.site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 100; }
.header-top { background: #f8f9fa; padding: 10px 0; font-size: 0.9rem; border-bottom: 1px solid #eee; }
.header-info { display: flex; gap: 30px; align-items: center; }
.header-info span { display: flex; align-items: center; gap: 5px; }
.header-info a { color: #333; text-decoration: none; font-weight: 600; }
.header-info a:hover { color: #C8001E; }
.lang-switcher { display: flex; gap: 10px; }
.lang-switcher a { padding: 4px 12px; border-radius: 4px; background: #fff; border: 1px solid #ddd; color: #333; font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.lang-switcher a.active { background: #C8001E; color: #fff; border-color: #C8001E; }
.lang-switcher a:hover { background: #C8001E; color: #fff; border-color: #C8001E; }

.header-main .container { display: flex; align-items: center; gap: 30px; }
.logo { flex-shrink: 0; }
.logo img { height: 48px; width: auto; display: block; }
.main-nav { flex-grow: 1; }
.main-nav ul { list-style: none; display: flex; gap: 10px; align-items: center; }
.main-nav a { padding: 10px 15px; color: #333; text-decoration: none; font-weight: 500; border-radius: 4px; transition: all 0.3s; }
.main-nav a:hover { background: #f0f0f0; color: #C8001E; }
.search-box { flex-shrink: 0; }
.search-box form { display: flex; gap: 8px; }
.search-box input { padding: 8px 12px; border: 1px solid #ddd; border-radius: 4px; width: 200px; }
.search-box button { padding: 8px 20px; background: #C8001E; color: #fff; border: none; border-radius: 4px; cursor: pointer; font-weight: 600; }
.search-box button:hover { background: #9f0018; }

/* Buttons */
.btn { display: inline-block; padding: 10px 20px; border-radius: 4px; font-weight: 600; text-decoration: none; transition: all 0.3s; border: none; cursor: pointer; }
.btn-primary { background: #C8001E; color: #fff; }
.btn-primary:hover { background: #9f0018; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(200,0,30,0.3); }
.btn-secondary { background: #f0f0f0; color: #333; border: 1px solid #ddd; }
.btn-secondary:hover { background: #e0e0e0; }

/* Hero */
.hero { background: linear-gradient(135deg, #C8001E 0%, #1a1a2e 100%); color: #fff; padding: 80px 20px; text-align: center; }
.hero h1 { font-size: 2.5rem; margin: 0 0 20px; font-weight: 700; }
.hero p { font-size: 1.2rem; margin: 0 0 40px; opacity: 0.95; }

/* Sections */
.trust-section { background: #f8f9fa; padding: 60px 20px; }
.categories-section { padding: 60px 20px; }
.features-section { background: #1a1a2e; color: #fff; padding: 60px 20px; }
.cta-section { background: #e8f4f8; padding: 60px 20px; text-align: center; }

/* Footer */
.site-footer { background: #1a1a2e; color: #fff; padding: 60px 20px 20px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; margin-bottom: 40px; }
.footer-col h4 { color: #C8001E; margin-bottom: 15px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col a { color: #fff; text-decoration: none; }
.footer-col a:hover { color: #C8001E; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; text-align: center; font-size: 0.9rem; color: #999; }

/* Breadcrumbs */
.breadcrumbs { margin-bottom: 30px; }
.breadcrumbs-inner { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; font-size: 0.9rem; }
.breadcrumbs a { color: #C8001E; }
.breadcrumbs span.current { color: #666; }

/* Product Grid */
.cat-card, .prod-card { background: #fff; border: 1px solid #eee; border-radius: 8px; padding: 20px; text-align: center; transition: all 0.3s; text-decoration: none !important; display: flex; flex-direction: column; }
.cat-card:hover, .prod-card:hover { box-shadow: 0 4px 12px rgba(200,0,30,0.15); border-color: #C8001E; }
.cat-card h3 { color: #C8001E; margin: 10px 0; font-size: 1.2rem; }
.cat-card p { color: #666; margin: 0; font-size: 0.9rem; flex-grow: 1; }

/* Forms */
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], textarea, select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #C8001E;
    box-shadow: 0 0 0 3px rgba(200,0,30,0.1);
}
label { display: block; margin-bottom: 5px; font-weight: 600; color: #333; }

/* Tables */
table { width: 100%; border-collapse: collapse; }
th { background: #f8f9fa; padding: 10px; text-align: left; font-weight: 600; border: 1px solid #eee; }
td { padding: 10px; border: 1px solid #eee; }
tr:nth-child(even) { background: #f8f9fa; }

/* Utility */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mb-20 { margin-bottom: 20px; }
.mt-30 { margin-top: 30px; }
.text-muted { color: #999; }
.text-dark { color: #1a1a2e; }

/* Responsive */
@media (max-width: 768px) {
    .flex-header { flex-direction: column; gap: 15px; align-items: flex-start; }
    .main-nav ul { flex-wrap: wrap; }
    .search-box { width: 100%; }
    .search-box input { width: 100%; }
    .hero h1 { font-size: 1.8rem; }
    .hero p { font-size: 1rem; }
    .footer-grid { grid-template-columns: 1fr; }
}

/* ===== DESIGN UPGRADE v2 ===== */

/* --- Product Card v2 --- */
.prod-card-v2 {
  background:#fff; border:1px solid #e5e7eb; border-radius:12px;
  overflow:hidden; box-shadow:0 2px 8px rgba(0,0,0,.06);
  transition:all .25s cubic-bezier(.4,0,.2,1);
  position:relative; cursor:pointer;
}
.prod-card-v2:hover {
  box-shadow:0 6px 20px rgba(0,0,0,.09);
  border-color:#d1d5db; transform:translateY(-2px);
}
.prod-card-v2 .card-img {
  background:linear-gradient(135deg,#fafafa 0%,#f3f4f6 100%);
  height:130px; display:flex; align-items:center; justify-content:center;
  position:relative; overflow:hidden;
}
.prod-card-v2 .series-tag {
  position:absolute; top:8px; left:8px;
  background:rgba(200,0,30,.1); color:#C8001E;
  font-size:.63rem; font-weight:800; letter-spacing:.08em;
  padding:2px 8px; border-radius:20px; text-transform:uppercase;
}
.prod-card-v2 .card-body { padding:14px; }
.prod-card-v2 h3 { font-size:.95rem; font-weight:800; color:#111827; margin:0 0 3px; line-height:1.3; }
.prod-card-v2 .card-name { color:#6b7280; font-size:.8rem; margin:0 0 10px; line-height:1.4; min-height:32px; }
.prod-card-v2 .spec-chips { display:flex; gap:5px; flex-wrap:wrap; margin-bottom:12px; }
.spec-chip {
  background:#f3f4f6; border-radius:6px; padding:3px 8px;
  font-size:.72rem; font-weight:600; color:#374151;
}
.spec-chip em { color:#9ca3af; font-style:normal; }
.prod-card-v2 .card-actions { display:flex; gap:6px; position:relative; z-index:2; }
.prod-card-v2 .btn-detail {
  flex:1; background:#C8001E; color:#fff; border:none;
  border-radius:7px; padding:8px 6px; font-size:.85rem; font-weight:700;
  text-align:center; text-decoration:none; cursor:pointer;
  transition:background .2s; display:block;
}
.prod-card-v2 .btn-detail:hover { background:#9f0018; }
.prod-card-v2 .btn-rfq-icon {
  width:38px; min-width:38px; height:38px;
  background:#f3f4f6; border:1.5px solid #e5e7eb; border-radius:7px;
  display:flex; align-items:center; justify-content:center;
  font-size:1rem; cursor:pointer; transition:all .2s;
  position:relative; z-index:3;
}
.prod-card-v2 .btn-rfq-icon:hover { background:#fee2e2; border-color:#C8001E; }

/* --- Category Card v2 --- */
.cat-card-v2 {
  background:#fff; border-radius:14px; overflow:hidden;
  box-shadow:0 2px 12px rgba(0,0,0,.07);
  transition:all .25s cubic-bezier(.4,0,.2,1);
  text-decoration:none; display:block; color:inherit;
}
.cat-card-v2:hover { transform:translateY(-3px); box-shadow:0 10px 28px rgba(0,0,0,.09); }
.cat-card-v2 .cat-banner {
  height:90px; background:linear-gradient(135deg,#f0f6ff 0%,#e8f0fb 100%);
  display:flex; align-items:center; justify-content:center;
  font-size:2.4rem; position:relative;
}
.cat-card-v2 .cat-banner::after {
  content:''; position:absolute; bottom:0; left:0; right:0; height:3px; background:#C8001E;
}
.cat-card-v2 .cat-body { padding:18px 20px 20px; }
.cat-card-v2 h3 { font-size:1rem; font-weight:800; color:#111827; margin:0 0 6px; line-height:1.3; }
.cat-card-v2 .cat-desc { color:#6b7280; font-size:.82rem; line-height:1.5; margin:0 0 12px; }
.cat-card-v2 .cat-footer {
  display:flex; align-items:center; justify-content:space-between;
  padding-top:12px; border-top:1px solid #f3f4f6;
}
.cat-card-v2 .cat-count { font-size:.75rem; color:#C8001E; font-weight:700; }
.cat-card-v2 .cat-cta { font-size:.82rem; font-weight:700; color:#C8001E; }

/* --- Filter Chips --- */
.filter-chips-wrap {
  background:#fff; border:1px solid #e5e7eb; border-radius:12px;
  padding:14px 18px; box-shadow:0 2px 8px rgba(0,0,0,.05);
  margin-bottom:24px;
}
.filter-chips-row { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-bottom:6px; }
.filter-chips-row + .filter-chips-row { margin-top:8px; }
.fc-label {
  font-size:.72rem; font-weight:800; letter-spacing:.08em;
  text-transform:uppercase; color:#9ca3af; margin-right:4px; white-space:nowrap;
}
.fc-chip {
  padding:5px 14px; border-radius:20px; border:1.5px solid #e5e7eb;
  font-size:.82rem; font-weight:600; color:#374151;
  background:#fff; text-decoration:none; transition:all .15s; white-space:nowrap;
}
.fc-chip:hover { border-color:#C8001E; color:#C8001E; background:#fff5f5; }
.fc-chip.active { border-color:#C8001E; color:#fff; background:#C8001E; }
.fc-reset { font-size:.8rem; color:#9ca3af; padding:4px 10px; border-radius:6px; text-decoration:none; transition:all .15s; }
.fc-reset:hover { color:#C8001E; background:#fee2e2; }
.filter-chips-count { font-size:.82rem; color:#6b7280; padding-top:4px; }
.filter-chips-count strong { color:#111827; }

/* --- Breadcrumb v2 --- */
.breadcrumbs { margin-bottom:24px; }
.breadcrumbs-inner {
  display:inline-flex; flex-wrap:wrap; gap:0; align-items:center;
  font-size:.8rem; background:#f8f9fa; border:1px solid #e5e7eb;
  border-radius:8px; padding:6px 12px;
}
.breadcrumbs-inner a { color:#6b7280; padding:0 5px; transition:color .15s; text-decoration:none; }
.breadcrumbs-inner a:first-child { padding-left:0; }
.breadcrumbs-inner a:hover { color:#C8001E; }
.breadcrumbs .current { color:#111827; font-weight:700; padding:0 5px; }
.breadcrumbs .bc-sep { color:#d1d5db; padding:0 1px; }

/* --- Section Header v2 --- */
.sec-header { margin-bottom:32px; }
.sec-header .eyebrow {
  font-size:.72rem; font-weight:600; letter-spacing:.12em;
  text-transform:uppercase; color:#64748b; margin-bottom:6px; display:block;
}
.sec-header h1, .sec-header h2 { font-size:1.65rem; font-weight:700; color:#1e293b; margin:0 0 10px; line-height:1.2; }
.sec-header .sec-rule { width:36px; height:2px; background:linear-gradient(90deg,#C8001E,rgba(200,0,30,.25)); border-radius:2px; }
.sec-header .sec-desc { color:#6b7280; font-size:.95rem; margin-top:10px; max-width:600px; line-height:1.6; }

/* --- Trust Card v2 --- */
.trust-card-v2 {
  background:#fff; border-radius:12px; padding:28px 24px;
  text-align:center; box-shadow:0 2px 12px rgba(0,0,0,.06);
  border-bottom:3px solid #C8001E; transition:transform .2s;
}
.trust-card-v2:hover { transform:translateY(-3px); }
.trust-card-v2 .trust-icon { font-size:2.2rem; margin-bottom:12px; }
.trust-card-v2 h3 { color:#111827; font-size:1rem; font-weight:800; margin:0 0 6px; }
.trust-card-v2 p { color:#6b7280; font-size:.85rem; margin:0; line-height:1.5; }

/* --- Toast v2 --- */
#iv-toast { min-width:280px; max-width:400px; }

/* ===== OTTIMIZZAZIONI B2B v3 ===== */

/* Touch targets minimi 48px su mobile */
@media(max-width:768px){
  .btn,.fc-chip,.nav-link,.nav-dropdown-btn,
  .btn-detail,.btn-rfq-icon,.pd-btn-rfq,.pd-btn-secondary,
  .cat-cta-btn-primary,.cat-cta-btn-phone,
  .home-btn-primary,.home-btn-outline{min-height:48px;}
  .btn-rfq-icon{min-width:48px;min-height:48px;}
}

/* Skip to content — accessibilità */
.skip-to-content{position:absolute;top:-40px;left:16px;background:#C8001E;color:#fff;padding:8px 16px;border-radius:0 0 6px 6px;font-weight:700;font-size:.85rem;z-index:9999;transition:top .15s;}
.skip-to-content:focus{top:0;}

/* Urgency bar sottile — risparmia spazio mobile */
@media(max-width:600px){
  .urgency-bar{font-size:.72rem;padding:6px 12px;}
  .urgency-item:nth-child(n+3){display:none;}
}

/* Product card — image height ridotta su mobile per mostrare più prodotti */
@media(max-width:480px){
  .prod-card-v2 .card-img{height:100px;}
  .pd-grid{gap:16px;}
  .pd-h1{font-size:1.5rem;}
  .home-hero-h1{font-size:1.4rem;}
}

/* RFQ Float widget — più in alto se sticky bar attiva */
.pd-sticky-bar.visible ~ #rfq-float-widget,
body:has(.pd-sticky-bar.visible) #rfq-float-widget{bottom:76px;}

/* Miglioramento contrasto link footer per WCAG */
.footer-links a:hover,.footer-contact a:hover{opacity:1;}

/* Immagini — aspect-ratio stabile per evitare CLS */
.pd-img-box img{aspect-ratio:4/3;object-fit:contain;}
.prod-card-v2 .card-img img{aspect-ratio:4/3;object-fit:contain;}

/* Bottone "Richiedi Offerta" sulla card — più visibile */
.prod-card-v2 .btn-detail{
  background:#C8001E;
  font-size:.82rem;
  letter-spacing:.02em;
}

/* Search input — feedback visivo migliorato */
.search-input:focus{outline:none;box-shadow:none;}
.header-search form:focus-within{
  box-shadow:0 0 0 3px rgba(200,0,30,.2);
}

/* Print styles — non stampare nav, CTA, footer */
@media print{
  .site-header,.nav-bar,.site-footer,.urgency-bar,
  .pd-sticky-bar,#rfq-float-widget,#expert-cta,
  .pd-cta-group,.pd-trust-box,.cat-cta-block{display:none!important;}
  .pd-specs-table th,.pd-specs-table td{padding:6px 8px;}
  body{font-size:11pt;color:#000;}
}
