:root {
  --ml-accent: rgb(4, 111, 123);
  --ml-border: #e9e9e9;
  --ml-text: #111;
  --ml-muted: #777;
  --ml-card-shadow: 0 12px 30px rgba(0, 0, 0, .08);
}

/* ===== HERO ===== */
/* HERO full-bleed (edge-to-edge) chiar dacă tema are container boxed */
.ml-hero {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  border-radius: 0;
  position: relative;
  z-index: 1;
  height: 520px;
}

/* Hero is full-bleed, no need for body overflow constraint */
/* Removed overflow-x: hidden as it blocks position: sticky */



.ml-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
}

.ml-hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .35);
  /* overlay ca în poză */
}

.ml-hero-inner {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 20px;
}

.ml-hero-title {
  margin: 0;
  color: #fff !important;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 4rem !important;
  /* ca în exemplu */
  line-height: 1;
}

@media (max-width: 1024px) {
  .ml-hero {
    height: 420px;
  }

  .ml-hero-title {
    font-size: 64px;
  }
}

@media (max-width: 640px) {
  .ml-hero {
    height: 300px;
  }

  .ml-hero-title {
    font-size: 44px;
  }
}

/* spațiu sub hero înainte de conținut */
.ml-barci-container {
  padding-top: 35px;
}


.ml-barci-container {
  max-width: 1280px;
  margin: 0 auto;
  /* padding: 40px 20px; */
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.ml-barci-header {
  text-align: center;
  margin-bottom: 0;
  /* Reduced from 10px for compact sticky */

  /* STICKY POSITIONING - moved from .ml-barci-tabs to parent */
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;

  /* Better visibility when sticky on desktop */
  border-bottom: 2px solid var(--ml-border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);

  /* Prevent tabs from being cut off */
  padding-top: 8px;
  overflow: visible;
}

.ml-barci-title {
  font-size: 3.2em;
  font-weight: 900;
  margin: 0 0 18px 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #000;
  display: none;
  /* Hidden - title is already in hero */
}


/* ====== TABS (match reference: flat bar + separators) ====== */
.ml-barci-tabs {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 auto 8px;
  /* Reduced from 26px for compact sticky */
  padding: 0;
  background: #fff;
  border-top: 1px solid var(--ml-border);
  border-bottom: 1px solid var(--ml-border);
  /* Scroll indicator on mobile */
  scrollbar-width: thin;
  scrollbar-color: var(--ml-accent) #f0f0f0;

  /* Sticky removed from here - now on parent .ml-barci-header */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Webkit scrollbar styling for better mobile indication */
.ml-barci-tabs::-webkit-scrollbar {
  height: 6px;
}

.ml-barci-tabs::-webkit-scrollbar-track {
  background: #f0f0f0;
}

.ml-barci-tabs::-webkit-scrollbar-thumb {
  background: var(--ml-accent);
  border-radius: 3px;
}

/* Mobile: multi-row wrap layout to show all manufacturers */
@media (max-width: 768px) {
  .ml-barci-tabs {
    flex-wrap: wrap;
    justify-content: center;
    padding: 4px;
    /* Reduced from 8px */
    overflow-x: visible;
    gap: 2px;
    /* Reduced from 4px */
  }

  /* Remove fade gradient on mobile since we're wrapping */
  .ml-barci-tabs::after {
    display: none;
  }
}

.ml-barci-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  text-decoration: none;
  background: transparent;
  color: #111 !important;
  text-transform: uppercase;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .4px;
  border-right: 1px solid var(--ml-border);
  white-space: nowrap;
  transition: all 0.2s ease;
}

/* Mobile: more compact tabs for multi-row layout */
@media (max-width: 768px) {
  .ml-barci-tab {
    padding: 6px 10px;
    /* Reduced from 8px 12px */
    font-size: 10px;
    /* Reduced from 11px */
    border: 1px solid var(--ml-border);
    border-radius: 4px;
    margin: 1px;
    /* Reduced from 2px */
  }

  .ml-barci-tab:first-child {
    border-left: 1px solid var(--ml-border);
  }

  .ml-barci-tab img.ml-tab-logo {
    height: 24px;
  }
}

.ml-barci-tab:first-child {
  border-left: 1px solid var(--ml-border);
}

.ml-barci-tab:hover {
  color: var(--ml-accent);
}

.ml-barci-tab.active {
  background: var(--ml-accent);
  color: #fff;
}

/* .ml-barci-tab::before{
  content:"";
  width: 10px;
  height: 10px;
  border: 2px solid currentColor;
  display:inline-block;
  box-sizing:border-box;
  opacity:.7;
} */
.ml-barci-tab:not(.active)::before {
  opacity: .25;
}

.ml-barci-tab img.ml-tab-logo {
  height: 30px;
  width: auto;
  object-fit: contain;
  display: block;
}

/* .ml-barci-tab.active img.ml-tab-logo{
  filter: brightness(0) invert(1);
} */

/* ====== SECTION TITLE ====== */
.ml-manufacturer-section {
  margin-bottom: 60px;
}

.ml-manufacturer-title {
  font-size: 2.6em;
  font-weight: 900;
  color: rgb(4, 111, 123) !important;
  margin: 0 0 18px 0;
  text-align: left;
  /* Align with cards (accounting for card margin) */
  margin-left: 1rem;
}

.ml-manufacturer-divider {
  height: 1px;
  background: var(--ml-border);
  margin-bottom: 28px;
}

/* ====== GRID ====== */
.ml-boats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 35px;
}

/* Force line break: next card after .ml-force-break starts on new row */
/* Spacing is applied via inline margin-bottom from PHP */
.ml-boat-card.ml-force-break+.ml-boat-card {
  grid-column-start: 1;
  /* Force to first column = new row */
}

@media (max-width: 1024px) {
  .ml-boats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ml-boat-card.ml-force-break+.ml-boat-card {
    grid-column-start: 1;
    /* Force to first column in 2-col grid */
  }
}

@media (max-width: 640px) {
  .ml-boats-grid {
    grid-template-columns: 1fr;
  }

  .ml-manufacturer-title {
    margin-left: 1rem;
    /* Keep alignment on mobile */
  }

  /* On mobile, tabs need better visibility */
  .ml-barci-tabs {
    justify-content: flex-start;
    /* Align left on mobile */
    padding-left: 1rem;
  }
}


/* ====== CARD ====== */
.ml-boat-card {
  display: block;
  background: #fff;
  text-decoration: none;
  color: inherit;
  border-radius: 6px;
  box-shadow: var(--ml-card-shadow);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
  margin: 0 1rem;
}

.ml-boat-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 45px rgba(0, 0, 0, .12);
}

.ml-boat-image {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f5f5f5;
}

.ml-boat-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ml-boat-content {
  padding: 18px 18px 16px;
  text-align: center;
}

.ml-boat-model {
  font-size: 2.1em;
  font-weight: 900;
  margin: 12px 0 14px 0;
  color: rgb(4, 111, 123) !important;
}

/* ensure any old separator is gone */
.ml-specs-separator {
  display: none !important;
}

/* ====== SPECS (match reference table style + vertical divider) ====== */
.ml-specs-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ml-border);
}

.ml-spec-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 140px;
  align-items: center;
  min-height: 52px;
  border-bottom: 1px solid var(--ml-border);
  padding: 0;
}

.ml-spec-row::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(100% - 140px);
  width: 1px;
  background: var(--ml-border);
}

.ml-spec-left {
  display: flex;
  align-items: center;
  gap: 12px;
  /* padding: 12px 14px; */
}

.ml-spec-icon {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ml-spec-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--ml-accent);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ml-spec-label {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .35px;
  color: var(--ml-muted);
}

.ml-spec-value {
  /* padding: 12px 14px; */
  text-align: right;
  font-size: 18px;
  font-weight: 900;
  color: var(--ml-text);
}

/* ====== PRICE ====== */
.ml-price {
  padding-top: 14px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ml-text);
  text-align: center;
}

.ml-price-value {
  color: var(--ml-accent);
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.ml-price-suffix {
  color: var(--ml-text);
  font-weight: 700;
}

/* Small adjustments on mobile */
@media (max-width: 420px) {
  .ml-barci-title {
    font-size: 2.4em;
  }

  .ml-manufacturer-title {
    font-size: 2.1em;
  }

  .ml-spec-row {
    grid-template-columns: 1fr 120px;
  }

  .ml-spec-row::after {
    left: calc(100% - 120px);
  }

  .ml-spec-value {
    font-size: 16px;
  }
}

/* taie orice fâșie 1-2px la top/bottom */
.ml-hero {
  overflow: hidden !important;
}

/* overlay-ul să acopere 100% sigur + ușor “bleed” */
.ml-hero-overlay {
  top: -2px !important;
  bottom: -2px !important;
  left: 0 !important;
  right: 0 !important;
}

/* alternativ / recomandat: dacă păstrezi scale(1.02) pe bg, scalează și overlay */
.ml-hero-overlay {
  transform: scale(1.02);
  transform-origin: center;
}

.ml-hero-overlay {
  background: rgba(0, 3, 32, 0.6) !important;
  top: -2px !important;
  bottom: -2px !important;
  left: 0 !important;
  right: 0 !important;
  pointer-events: none !important;
}