/*
 * Tailwind-inspired utility layer for TB Immo
 * Prefix: tbitw-
 */
:root {
  --tbitw-font-sans: "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --tbitw-primary: #ee3334;
  --tbitw-primary-dark: #d12b2c;
  --tbitw-surface: #ffffff;
  --tbitw-slate-50: #f8fafc;
  --tbitw-slate-100: #f1f5f9;
  --tbitw-slate-200: #e2e8f0;
  --tbitw-slate-300: #cbd5f5;
  --tbitw-slate-500: #6b7280;
  --tbitw-slate-600: #4b5563;
  --tbitw-slate-700: #374151;
  --tbitw-slate-900: #0f172a;
  --tbitw-green: #16a34a;
  --tbitw-red: #ef4444;
  --tbitw-blue: #2563eb;
  --tbitw-amber: #f59e0b;
}

/* Typography */
.tbitw-font-sans { font-family: var(--tbitw-font-sans); }
.tbitw-text-xs { font-size: 0.75rem; line-height: 1rem; }
.tbitw-text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.tbitw-text-base { font-size: 1rem; line-height: 1.5rem; }
.tbitw-text-lg { font-size: 1.125rem; line-height: 1.5rem; }
.tbitw-text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.tbitw-text-2xl { font-size: 1.5rem; line-height: 2rem; }
.tbitw-font-medium { font-weight: 500; }
.tbitw-font-semibold { font-weight: 600; }
.tbitw-font-bold { font-weight: 700; }
.tbitw-uppercase { text-transform: uppercase; }
.tbitw-tracking-wide { letter-spacing: 0.08em; }
.tbitw-leading-snug { line-height: 1.35; }
.tbitw-leading-tight { line-height: 1.25; }
.tbitw-text-center { text-align: center; }
.tbitw-text-right { text-align: right; }
.tbitw-line-clamp-2 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

/* Colors */
.tbitw-text-slate-900 { color: var(--tbitw-slate-900); }
.tbitw-text-slate-700 { color: var(--tbitw-slate-700); }
.tbitw-text-slate-600 { color: var(--tbitw-slate-600); }
.tbitw-text-slate-500 { color: var(--tbitw-slate-500); }
.tbitw-text-white { color: #ffffff; }
.tbitw-text-primary { color: var(--tbitw-primary); }
.tbitw-bg-white { background-color: #ffffff; }
.tbitw-bg-slate-50 { background-color: var(--tbitw-slate-50); }
.tbitw-bg-slate-100 { background-color: var(--tbitw-slate-100); }
.tbitw-bg-primary { background-color: var(--tbitw-primary); }
.tbitw-bg-primary-dark { background-color: var(--tbitw-primary-dark); }
.tbitw-bg-status-nuovo { background: linear-gradient(135deg, #22c55e, #16a34a); }
.tbitw-bg-status-usato { background: linear-gradient(135deg, #ef4444, #dc2626); }
.tbitw-bg-status-aziendale { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.tbitw-bg-status-km-0 { background: linear-gradient(135deg, #f59e0b, #d97706); }

/* Layout */
.tbitw-grid { display: grid; }
.tbitw-flex { display: flex; }
.tbitw-inline-flex { display: inline-flex; }
.tbitw-flex-col { flex-direction: column; }
.tbitw-flex-wrap { flex-wrap: wrap; }
.tbitw-items-center { align-items: center; }
.tbitw-items-start { align-items: flex-start; }
.tbitw-items-stretch { align-items: stretch; }
.tbitw-self-stretch { align-self: stretch; }
.tbitw-justify-between { justify-content: space-between; }
.tbitw-justify-center { justify-content: center; }
.tbitw-justify-end { justify-content: flex-end; }
.tbitw-h-full { height: 100%; }
.tbitw-w-full { width: 100%; }
.tbitw-w-32 { width: 8rem; }
.tbitw-w-48 { width: 12rem; }
.tbitw-h-24 { height: 6rem; }
.tbitw-shrink-0 { flex-shrink: 0; }
.tbitw-overflow-hidden { overflow: hidden; }
.tbitw-relative { position: relative; }
.tbitw-absolute { position: absolute; }
.tbitw-block { display: block; }
.tbitw-hidden { display: none; }
.tbitw-mt-auto { margin-top: auto; }
.tbitw-space-y-6 > * + * { margin-top: 1.5rem; }

/* Grid columns */
.tbitw-grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.tbitw-grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tbitw-grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tbitw-grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tbitw-grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tbitw-grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

@media (min-width: 640px) {
  .tbitw-sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tbitw-sm\:flex-row { flex-direction: row; }
}
@media (min-width: 768px) {
  .tbitw-md\:grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
  .tbitw-md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tbitw-md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tbitw-md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tbitw-md\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .tbitw-lg\:grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
  .tbitw-lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tbitw-lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tbitw-lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tbitw-lg\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .tbitw-lg\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .tbitw-lg\:grid-cols-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}

/* Spacing */
.tbitw-gap-1 { gap: 0.25rem; }
.tbitw-gap-2 { gap: 0.5rem; }
.tbitw-gap-3 { gap: 0.75rem; }
.tbitw-gap-4 { gap: 1rem; }
.tbitw-gap-6 { gap: 1.5rem; }
.tbitw-gap-x-2 { column-gap: 0.45rem; }
.tbitw-gap-x-3 { column-gap: 0.75rem; }
.tbitw-gap-x-4 { column-gap: 1rem; }
.tbitw-gap-y-2 { row-gap: 0.5rem; }
.tbitw-gap-y-3 { row-gap: 0.75rem; }
.tbitw-p-4 { padding: 1rem; }
.tbitw-p-5 { padding: 1.25rem; }
.tbitw-p-6 { padding: 1.5rem; }
.tbitw-px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.tbitw-px-4 { padding-left: 1rem; padding-right: 1rem; }
.tbitw-px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.tbitw-px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.tbitw-py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.tbitw-py-1-5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.tbitw-py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.tbitw-py-2-5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.tbitw-py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.tbitw-pt-6 { padding-top: 1.5rem; }
.tbitw-pb-6 { padding-bottom: 1.5rem; }
.tbitw-pb-8 { padding-bottom: 2rem; }
.tbitw-pr-4 { padding-right: 1rem; }
.tbitw-pl-4 { padding-left: 1rem; }
.tbitw-pl-6 { padding-left: 1.5rem; }
.tbitw-mb-4 { margin-bottom: 1rem; }
.tbitw-mb-6 { margin-bottom: 1.5rem; }
.tbitw-mb-8 { margin-bottom: 2rem; }
.tbitw-mt-3 { margin-top: 0.75rem; }
.tbitw-mt-4 { margin-top: 1rem; }
.tbitw-mt-5 { margin-top: 1.25rem; }
.tbitw-mt-6 { margin-top: 1.5rem; }

/* Position helpers */
.tbitw-top-3 { top: 0.75rem; }
.tbitw-right-3 { right: 0.75rem; }
.tbitw-left-3 { left: 0.75rem; }
.tbitw-bottom-3 { bottom: 0.75rem; }
.tbitw-inset-0 { top: 0; right: 0; bottom: 0; left: 0; }

/* Borders & radius */
.tbitw-border { border-width: 1px; border-style: solid; border-color: var(--tbitw-slate-200); }
.tbitw-border-transparent { border-color: transparent; }
.tbitw-border-primary { border-color: var(--tbitw-primary); }
.tbitw-border-slate-200 { border-color: var(--tbitw-slate-200); }
.tbitw-border-slate-300 { border-color: #d1d5db; }
.tbitw-rounded-lg { border-radius: 0.75rem; }
.tbitw-rounded-xl { border-radius: 1rem; }
.tbitw-rounded-2xl { border-radius: 1.25rem; }
.tbitw-rounded-full { border-radius: 9999px; }

/* Shadows */
.tbitw-shadow-card { box-shadow: 0 18px 40px -28px rgba(15, 23, 42, 0.6); }
.tbitw-shadow-soft { box-shadow: 0 15px 35px -25px rgba(15, 23, 42, 0.55); }
.tbitw-hover\:shadow-card-strong:hover { box-shadow: 0 35px 60px -25px rgba(15, 23, 42, 0.35); }

/* Aspect ratio & images */
.tbitw-aspect-4-3 { aspect-ratio: 4 / 3; }
.tbitw-object-cover { object-fit: cover; }
.tbitw-thumb-placeholder {
  background: repeating-linear-gradient(135deg, #f3f4f6 0 14px, #e2e8f0 14px 28px);
}

/* Transform & transitions */
.tbitw-transform { transform: translateZ(0); }
.tbitw-transition { transition-property: all; }
.tbitw-duration-200 { transition-duration: 200ms; }
.tbitw-ease-out { transition-timing-function: cubic-bezier(0, 0, 0.2, 1); }
.tbitw-hover\:-translate-y-0\.5:hover { transform: translateY(-2px); }

/* Focus */
.tbitw-focus-visible\:ring-2:focus-visible {
  outline: 2px solid var(--tbitw-primary);
  outline-offset: 2px;
}
.tbitw-focus-visible\:ring-offset-2:focus-visible {
  box-shadow: 0 0 0 2px #ffffff;
}

/* Links */
.tbitw-no-underline { text-decoration: none; }
.tbitw-underline { text-decoration: underline; }
.tb-sr-only,
.tbitw-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;
}

/* Utilities */
.tbitw-max-w-screen-xl { max-width: 1280px; margin-left: auto; margin-right: auto; }
.tbitw-bg-gradient-card {
  background: linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(248,250,252,1) 100%);
}
.tbitw-ring-primary { box-shadow: 0 0 0 2px rgba(238, 51, 52, 0.3); }

/* Pagination component */
.tbitw-pagination .page-numbers {
  display: inline-flex;
  gap: 0.5rem;
  padding-left: 0;
  margin: 0;
  list-style: none;
}
.tbitw-pagination .page-numbers > li > a,
.tbitw-pagination .page-numbers > li > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.85rem;
  border-radius: 9999px;
  border: 1px solid var(--tbitw-slate-200);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--tbitw-slate-600);
  text-decoration: none;
  background: #ffffff;
  transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease;
}
.tbitw-pagination .page-numbers > li > a:hover {
  border-color: var(--tbitw-primary);
  color: var(--tbitw-primary);
}
.tbitw-pagination .page-numbers > li > span.current {
  border-color: var(--tbitw-primary);
  color: #ffffff;
  background: var(--tbitw-primary);
}

/* Loop helpers */
.tbimmo-loop__item > * { height: 100%; }

/* Badges */
.tbitw-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.375rem 0.85rem;
  color: #ffffff;
  box-shadow: 0 12px 30px -18px rgba(15, 23, 42, 0.6);
}
.tbimmo .tbimmo-badge--tag {
  background: rgba(238, 51, 52, 0.82);
  color: #ffffff;
}
.tbitw-price-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.95rem;
  border-radius: 9999px;
  background: var(--tbitw-primary);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 18px 45px -28px rgba(238, 51, 52, 0.55);
}
.tbimmo .tbimmo-badge--contract {
  background: rgba(238, 51, 52, 0.88);
  box-shadow: 0 18px 45px -28px rgba(238, 51, 52, 0.45);
  color: #ffffff;
}

.tbimmo-row .tbimmo-badge {
  font-size: 0.625rem;
  padding: 0.25rem 0.65rem;
}

.tbimmo-row .tbimmo-badge strong {
  font-size: inherit;
  font-weight: 700;
}

.tbimmo-row .tbimmo-badge--contract {
  font-size: 0.75rem;
  padding: 0.35rem 0.75rem;
}

/* Buttons */
.tbitw-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  border-radius: 0.75rem;
  background: var(--tbitw-primary);
  color: #ffffff !important;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 200ms ease, background-color 200ms ease;
}
.tbitw-btn-primary:hover { background: var(--tbitw-primary-dark); transform: translateY(-1px); }
.tbitw-btn-primary:focus-visible { outline: 2px solid #ffffff; outline-offset: 2px; }
.tbitw-btn-primary:active { transform: translateY(0); }

/* Buttons Car Card*/
.tbitw-btn-carcard {
  display: inline-flex;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  border-radius: 0.75rem;
  background: var(--tbitw-primary);
  color: #ffffff !important;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none !important;
  text-transform: uppercase;
  transition: transform 200ms ease, background-color 200ms ease;
  align-items: center;
  justify-content: center;
}
.tbitw-btn-carcard:hover { background: var(--tbitw-primary-dark); transform: translateY(-1px); }
.tbitw-btn-carcard:focus-visible { outline: 2px solid #ffffff; outline-offset: 2px; }
.tbitw-btn-carcard:active { transform: translateY(0); }

.tbitw-btn-carcard--icon {
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border-radius: 9999px;
}

.tbitw-btn-carcard--icon .tbimmo-ico {
  width: 1.25rem;
  height: 1.25rem;
}

/* List rows */
.tbitw-list-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--tbitw-slate-200);
  border-radius: 1.25rem;
  background: #ffffff;
  box-shadow: 0 12px 35px -30px rgba(15, 23, 42, 0.5);
}

.tbitw-list-row .tbimmo-row-thumb--list {
  flex: 0 0 clamp(13rem, 28vw, 18rem);
  width: clamp(13rem, 28vw, 18rem);
  /*min-height: clamp(13rem, 32vw, 22rem);*/
  display: flex;
  align-items: stretch;
  height: 100%;
}

.tbitw-list-row .tbimmo-row-thumb--list img,
.tbitw-list-row .tbimmo-row-thumb--list .tbimmo-row-thumb-placeholder {
  position: static;
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tbitw-list-row .tbimmo-row-thumb--list .tbimmo-thumb__overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

@media (max-width: 768px) {
  .tbitw-list-row {
    flex-direction: column;
  }

  .tbitw-list-row .tbimmo-row-thumb--list {
    width: 100%;
    min-height: 16rem;
  }

  .tbitw-list-row .tbimmo-row-body {
    width: 100%;
  }
}

/* Gallery */
.tbitw-gallery-main {
  overflow: hidden;
  border-radius: 1.25rem;
  background: #000;
}
.tbitw-gallery-main img { display: block; width: 100%; height: auto; object-fit: cover; }
.tbitw-thumb-grid {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.tbitw-thumb-button {
  position: relative;
  border: 2px solid transparent;
  border-radius: 0.75rem;
  padding: 0;
  overflow: hidden;
  background: transparent;
  cursor: pointer;
}
.tbitw-thumb-button img {
  width: 90px;
  height: 64px;
  object-fit: cover;
  display: block;
}
.tbitw-thumb-button.tbitw-is-active { border-color: var(--tbitw-primary); }
.tbitw-thumb-button:focus-visible { outline: 2px solid var(--tbitw-primary); outline-offset: 2px; }

/* Forms */
.tbitw-form label { display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.875rem; color: var(--tbitw-slate-600); }
.tbitw-form input,
.tbitw-form textarea {
  border: 1px solid var(--tbitw-slate-200);
  border-radius: 0.75rem;
  padding: 0.65rem 0.9rem;
  font-family: var(--tbitw-font-sans);
  font-size: 0.95rem;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}
.tbitw-form input:focus,
.tbitw-form textarea:focus {
  border-color: var(--tbitw-primary);
  box-shadow: 0 0 0 1px rgba(238, 51, 52, 0.15);
  outline: none;
}

/* Sidebar list */
.tbitw-lined-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}
.tbitw-lined-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.95rem;
  color: var(--tbitw-slate-600);
}
.tbitw-lined-list li strong { color: var(--tbitw-slate-700); }

/* Accessories grid */
.tbitw-acc-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  list-style: none;
  padding: 0;
  margin: 0;
}
.tbitw-acc-pill {
  padding: 0.5rem 0.9rem;
  border-radius: 9999px;
  background: rgba(238, 51, 52, 0.1);
  color: var(--tbitw-primary);
  font-size: 0.85rem;
  font-weight: 500;
}

/* Responsive layout single */
.tbitw-single-grid {
  display: grid;
  gap: 2rem;
}
@media (min-width: 1024px) {
  .tbitw-single-grid { grid-template-columns: 1.75fr 1fr; }
}

/* Dealer widget */
.tbitw-dealer {
  display: grid;
  gap: 0.35rem;
  font-size: 0.95rem;
  color: var(--tbitw-slate-600);
}
.tbitw-dealer__name { font-size: 1.05rem; font-weight: 600; color: var(--tbitw-slate-700); }

/* Header CTA */
.tbitw-sticky-card {
  position: sticky;
  top: 1.5rem;
}

/* Tables/meta */
.tbitw-meta-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  font-size: 0.95rem;
  color: var(--tbitw-slate-600);
  list-style: none;
  padding: 0;
  margin: 0;
}
.tbitw-meta-grid strong { color: var(--tbitw-slate-700); margin-right: 0.35rem; }

/* Content */
.tbitw-prose p { margin-bottom: 1rem; }

/* Buttons general */
.tbitw-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-radius: 0.85rem;
  border: 1px solid var(--tbitw-primary);
  color: var(--tbitw-primary);
  font-weight: 600;
  background: #ffffff;
  text-decoration: none;
  transition: background-color 200ms ease, color 200ms ease;
}
.tbitw-btn-outline:hover {
  background: var(--tbitw-primary);
  color: #ffffff;
}

/* Utility wrappers */
.tbimmo-loop { font-family: var(--tbitw-font-sans); color: var(--tbitw-slate-900); }
.tbimmo-loop a { color: inherit; }
.tbimmo-loop a:hover { text-decoration: none; }

/* === TB Immo — Admin CMB2 Grid Helpers === */
.cmb2-wrap .cmb2-grid {
  display: grid !important;
  gap: 1rem !important;
  padding: 1.8em 1.6em;
}

/* Colonne dinamiche (1–6) */
.cmb2-wrap .tbtw-grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)) !important; }
.cmb2-wrap .tbtw-grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.cmb2-wrap .tbtw-grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.cmb2-wrap .tbtw-grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
.cmb2-wrap .tbtw-grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
.cmb2-wrap .tbtw-grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }

/* Responsive: si riducono tutte insieme */
@media (max-width: 1024px){
  .cmb2-wrap .cmb2-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 768px){
  .cmb2-wrap .cmb2-grid { grid-template-columns: 1fr !important; }
}

/* Spanning opzionale */
.cmb2-wrap .col-span-2 { grid-column: span 2 / span 2 !important; }
.cmb2-wrap .col-span-3 { grid-column: span 3 / span 3 !important; }
.cmb2-wrap .col-span-4 { grid-column: span 4 / span 4 !important; }

/* === TB Immo — Label sopra al campo (solo per classi specifiche) === */
.cmb2-wrap .tbtw-label-top.cmb-row {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.cmb2-wrap .tbtw-label-top .cmb-th,
.cmb2-wrap .tbtw-label-top .cmb-td {
  display: block !important;
  width: 100% !important;
  padding: 0 !important;
}

/* Label style coerente con il tema */
.cmb2-wrap .tbtw-label-top .cmb-th label {
  display: block;
  margin-bottom: 0.15rem;
  font-weight: 600;
  color: #374151; /* slate-700 */
  font-size: 0.875rem;
}

/* -------------------------- TABS ------------------------  */
/* === TBImmo — Modern Tabs (v3 refined) === */
.tbimmo-tabs {
  display: flex;
  align-items: flex-end;
  gap: 0.25rem;
  border-bottom: 1px solid var(--tbtw-slate-200);
  margin-bottom: 1.25rem;
  position: relative;
  background: #fff;
}

/* Tab base */
.tbimmo-tab {
  position: relative;
  padding: 0.6rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--tbtw-slate-600);
  background: #f9fafb;
  border: 1px solid transparent;
  border-radius: 0.75rem 0.75rem 0 0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tbimmo-tab:hover {
  color: var(--tbtw-slate-900);
  background: #f3f4f6;
}

/* Attiva — blu, con linguetta viva e underline coerente */
.tbimmo-tab.is-active {
  color: #2563eb; /* blue-600 */
  background: #ffffff;
  border: 1px solid #2563eb;
  border-bottom-color: #ffffff; /* stacco dal pannello */
  font-weight: 600;
  box-shadow: 0 -2px 4px rgba(37, 99, 235, 0.15);
}

/* Underline decorativo dentro la linguetta */
.tbimmo-tab.is-active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 15%;
  right: 15%;
  height: 2px;
  background-color: #2563eb;
  border-radius: 9999px;
}

/* === Panels === */
.tbimmo-tabpanel {
  display: none;
  background: #fff;
  border: 1px solid var(--tbtw-slate-200);
  border-radius: 0 0.75rem 0.75rem 0.75rem;
  box-shadow: 0 15px 35px -25px rgba(15,23,42,0.1);
  padding: 1.25rem;
}

.tbimmo-tabpanel.is-active {
  display: block;
}

/* === Fields (CMB2) — sempre visibili e coerenti === */
.cmb2-wrap .cmb-row {
  display: grid;
  gap: 1rem;
  align-items: start;
  border-bottom: 1px solid #f1f5f9;
  padding: 0.75rem 0;
}

.cmb2-wrap .cmb-th label {
  font-weight: 600;
  color: #374151;
}

.cmb2-wrap .cmb2-metabox-description {
  font-size: 0.875rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

/* Input e select sempre visibili */
.cmb2-wrap input[type="text"],
.cmb2-wrap input[type="number"],
.cmb2-wrap select,
.cmb2-wrap textarea {
  width: 100%;
  border: 1px solid #d1d5db; /* gray-300 */
  border-radius: 0.75rem;
  padding: 0.5rem 0.75rem;
  color: #111827;
  font: inherit;
  background-color: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cmb2-wrap input:focus,
.cmb2-wrap select:focus,
.cmb2-wrap textarea:focus {
  border-color: var(--tbtw-primary, #ee3334);
  box-shadow: 0 0 0 2px rgba(238, 51, 52, 0.25);
  outline: none;
}

.cmb2-wrap input:disabled,
.cmb2-wrap select:disabled,
.cmb2-wrap textarea:disabled {
  background: #f8fafc;
  color: #9ca3af;
  border-color: #e5e7eb;
}

/* Campo con prefisso € moderno */
.tbimmo-field-prefix {
  position: relative;
  display: flex;
  align-items: center;
}

.tbimmo-field-prefix::before {
  content: "€";
  position: absolute;
  left: 0.75rem;
  color: #6b7280;
  font-size: 0.95rem;
  pointer-events: none;
}

.tbimmo-field-prefix input {
  padding-left: 1.8rem; /* spazio per simbolo */
}

/* Responsive tweak */
@media (max-width: 640px) {
  .tbimmo-tabs { flex-wrap: wrap; }
  .tbimmo-tab { flex: 1 1 auto; text-align: center; }
}


/* Modern layout for CMB2 prefix */
/* === TBImmo — Input wrapper con prefissi/suffissi === */
.tbimmo-fieldwrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

/* Prefisso (sinistra) */
.tbimmo-fieldwrap.tbimmo-prefix::before {
  content: attr(data-prefix);
  position: absolute;
  left: 0.75rem;
  color: #6b7280;
  font-weight: 500;
  pointer-events: none;
  font-size: 0.95rem;
}

/* Suffisso (destra) */
.tbimmo-fieldwrap.tbimmo-suffix::after {
  content: attr(data-suffix);
  position: absolute;
  right: 0.75rem;
  color: #6b7280;
  font-weight: 500;
  pointer-events: none;
  font-size: 0.95rem;
}

.tbimmo-fieldwrap input {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 0.75rem;
  padding: 0.5rem 0.75rem;
  font: inherit;
  color: #111827;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Padding per non sovrapporre i simboli */
.tbimmo-fieldwrap.tbimmo-prefix input { padding-left: 1.8rem !important; }
.tbimmo-fieldwrap.tbimmo-suffix input { padding-right: 1.8rem !important; }

/* Focus visibile */
.tbimmo-fieldwrap input:focus {
  border-color: var(--tbtw-primary, #ee3334);
  box-shadow: 0 0 0 2px rgba(238, 51, 52, 0.25);
  outline: none;
}


