:root {
  --accent: #a18256;
  --accent-hover: #8f6c3f;
  --text-main: #111;
  --text-light: #555;
  --font-main: 'Inter', sans-serif;
  --blue-title: #0e1b3f;
}

/* ===========================
   Base
   =========================== */
body {
  font-family: var(--font-main);
  color: var(--text-main);
  background-color: #fafafa;
  padding: 2rem 1rem;
  /*min-height: 100vh; modificato da elisa 22/09*/ 
}

html, body {
  height: auto !important;
  min-height: 100%;
  overflow-y: auto !important;
}


/* Logo grande fuori dalla navbar */
.logo-large {
  max-height: 120px;
  padding-top: 20vh;
}

/* Logo nella navbar */
.logo-navbar {
  height: 6.5rem !important;   /* fisso */
  max-height: none !important; /* no limite */
}

/* --- Desktop (>= lg): logo assoluto centrato --- */
@media (min-width: 992px) {
  .logo-navbar-wrapper {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
}

/* --- Mobile (< lg): logo sotto la prima riga, centrato --- */
@media (max-width: 991.98px) {
  .navbar {
    padding-bottom: 0 !important; /* tolto spazio extra */
  }

  .container-fluid {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }
  .container-fluid > a.nav-link { order: 1; }        /* freccia */
  .logo-navbar-wrapper { 
    order: 2; 
    text-align: center; 
    margin: .25rem auto; 
    position: static; 
    transform: none;
  }
  .container-fluid > .btn, 
  .container-fluid > .navbar-toggler { order: 1; margin-left: auto; } /* login/hamburger */
  #menuTrustag { order: 3; width: 100%; }

  .btn-login-mobile {
    font-size: 0.8rem;
    line-height: 1.1rem;
    padding: 0.25rem 0.5rem;
    white-space: normal;   /* permette l'andata a capo */
    text-align: center;
  }
}

/* ==============================
Main container
===================================

Garantisce che il footer resti visibile e il main non lo copra */

@media (orientation: landscape) {
  body, html { height: 100%; overflow: hidden; }
  .product-page { height: 100%; }
  .row.align-items-center { height: calc(100vh - 150px); display: flex; }
  .row.align-items-center > .col-md-6 { height: 100%; }
  .descrizione-scroll {
    height: 100%; overflow-y: auto; -ms-overflow-style: none; scrollbar-width: none;
  }
  .descrizione-scroll::-webkit-scrollbar { display: none; }
}




/* ===========================
   Titoli
   =========================== */
h1, h2, h3, h4, h5 {
  font-weight: 700;
  color: var(--blue-title);
}
h2 {
  font-size: 1.8rem;
}

/* ===========================
   Form & Input
   =========================== */
label {
  font-weight: 500;
  color: var(--text-light);
  margin-bottom: 0.4rem;
}
input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  border-radius: 12px;
  border: 1px solid #ccc;
  margin-bottom: 1.2rem;
}
.form-control {
  border: 2px solid #CAD6C8 !important;
  border-radius: 0.5rem;
}
.form-control.rounded-pill {
  border-radius: 50rem !important;
}
.form-control:focus {
  border-color: var(--blue-title) !important;
  box-shadow: 0 0 0 0.25rem rgba(14, 27, 63, 0.2);
}

/* ===========================
   Bottoni
   =========================== */
.btn {
  padding: 0.7rem 1.2rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 50px;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
}

/* Varianti */
.btn-outline-dark {
  border: 1px solid var(--text-main);
  color: var(--text-main);
}
.btn-outline-dark:hover {
  background-color: var(--text-main);
  color: #fff;
}

.btn-submit {
  border: 1px solid var(--text-main);
  color: var(--text-main);
}
.btn-submit:hover {
  background-color: var(--text-main);
  color: #fff;
}

/* Bottoni prodotti */
.btn-action {
  border-radius: 50px;
  padding: 0.45rem 1.1rem;
  font-weight: 600;
  font-size: 0.9rem;
}
.btn-transfer {
  border: 2px solid var(--accent);
  color: var(--accent);
}
.btn-transfer:hover {
  background: var(--accent);
  color: #fff;
}
.btn-assist {
  border: 2px solid var(--blue-title);
  color: var(--blue-title);
}
.btn-assist:hover {
  background: var(--blue-title);
  color: #fff;
}

/* ===========================
   NAVBAR
   =========================== */

/* Modifica by Elisa 22/09/2025:
   Ho rimosso il padding-bottom per evitare troppi spazi
   e problemi di scroll */

.navbar {
  /* padding-bottom: 10vh; */  /* <- disattivato */
}

/* Navbar senza sfondo bianco */
.navbar.bg-white {
  background-color: transparent !important;
}

.navbar {
  position: relative;  /* non fixed */
  height: auto;
  padding-bottom: 0 !important; /* già sistemato */
}

.navbar-back {
  color: #000 !important;
  text-decoration: none !important;
}
.navbar-back:hover {
  color: #333 !important;
}

/* ===========================
   QR / Scanner
   =========================== */
.scanner-title {
  font-weight: bold;
  color: var(--blue-title);
  margin-top: 4rem;
  margin-bottom: 2rem;
}
.scanner-box,
.scanner-upload {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

/* ===========================
   Product Page
   =========================== */
.product-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Sezioni */
.product-section {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  padding: 1.5rem;
  margin-bottom: 2rem;
  text-align: left;
}
.product-section h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--blue-title);
  margin-bottom: 1rem;
}

/* ===========================
   Lista prodotti compatta
   =========================== */
.product-list {
  max-width: 750px; /* più stretto */
  margin: 0 auto;
  padding: 0;
}

.product-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between; /* info a sx, bottoni a dx */
  align-items: flex-start;
  gap: 1rem;
  transition: transform 0.15s ease-in-out;
}
.product-card:hover {
  transform: translateY(-3px);
}

/* Info prodotto (sx) */
.product-info {
  flex: 1; /* prende spazio restante */
  text-align: left;
}
.product-info h5 {
  font-weight: 700;
  color: var(--blue-title);
  margin-bottom: 0.3rem;
}
.product-info small {
  display: block;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0.2rem;
}

/* Azioni (dx) */
.product-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-end;
  white-space: nowrap;
}

/* Footer dentro la card */
.product-footer {
  margin-top: 0.8rem;
  font-size: 0.85rem;
}
.product-footer .garanzia {
  color: green;
  font-weight: 600;
}
.product-footer .assistenza {
  color: var(--blue-title);
}

/* Badge */
.badge {
  border-radius: 50px;
  font-size: 0.8rem;
  padding: 0.4rem 0.8rem;
  font-weight: 600;
}
.badge.bg-success {
  background-color: #d1e7dd !important;
  color: #0f5132 !important;
}
.badge.bg-secondary {
  background-color: #e2e3e5 !important;
  color: #41464b !important;
}

/* ===========================
   Footer
   =========================== */
footer p {
  text-align: center;
  color: var(--text-light);
  font-size: 0.85rem;
}
footer p span.trustag {
  display: block;
  font-weight: bold;
}
