/*
 * Vehicle Sales page stylesheet - VERSIONED DELIVERY.
 * Served by wp-content/mu-plugins/spl-vehicle-sales-css.php.
 * Content mirrors the WPBakery page Custom CSS box as applied 15 Aug 2026
 * (hero/contrast fixes + Aaron's card CSS) so switching delivery is a
 * zero-visual-change operation. Once verified live, the WPBakery box can be
 * emptied and this file becomes the single source of truth.
 * Background: docs/vehicle-sales-card-incident.md
 * Annotated card CSS reference: docs/code-snippets/vehicle-sales-card.aaron-annotated.css
 */
/* FORCE LAYOUT AND CONTRAST FIXED */

/* 1. Force the blue hero background and text color to display properly */
.custom-lovable-hero {
    background: linear-gradient(135deg, #0b1e3f 0%, #14305f 100%) !important;
    color: #ffffff !important;
    padding: 96px 24px 72px !important;
    display: block !important;
    height: auto !important;
    min-height: 250px !important;
    position: relative !important;
}

/* 2. Force the big main heading to turn white */
.custom-lovable-hero h1, 
.custom-lovable-hero .vc_custom_heading h1,
.custom-lovable-hero h1 * { 
    color: #ffffff !important; 
}

/* 3. Force the subtext paragraph to turn white */
.custom-lovable-hero p,
.custom-lovable-hero .wpb_text_column p { 
    color: rgba(255, 255, 255, 0.9) !important; 
}

/* 4. Force the hidden phone button text to turn white */
.cl-btn-ghost, 
.custom-lovable-hero a.cl-btn-ghost {
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
}

/* 5. Force the Category columns to clear the top banner block and stop overlapping */
.custom-lovable-cats { 
    display: grid !important; 
    grid-template-columns: 1fr 1fr !important; 
    gap: 24px !important; 
    margin-top: 40px !important; /* Forces it below the hero completely */
    clear: both !important;
    position: relative !important;
    z-index: 99 !important;
}

@media (max-width: 768px) { 
    .custom-lovable-cats { 
        grid-template-columns: 1fr !important; 
    } 
}

/* ============ TRUST BAR GRID LAYOUT ============ */

.custom-lovable-trust {
    background: #ffffff;
    border-top: 1px solid var(--cl-border, #e2e6ec);
    border-bottom: 1px solid var(--cl-border, #e2e6ec);
    padding: 40px 24px;
    margin-top: 40px;
}

/* The Grid Container */
.custom-lovable-trust .cl-trust-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important; /* 4 columns on desktop */
    gap: 24px !important;
    max-width: 1280px;
    margin: 0 auto;
}

/* Individual Grid Items */
.custom-lovable-trust .cl-trust-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

/* Icon Styling */
.custom-lovable-trust .cl-trust-item i {
    color: var(--cl-red, #d92231);
    font-size: 28px;
    margin-bottom: 12px;
}

/* Header Text Styling */
.custom-lovable-trust .cl-trust-item h4 {
    margin: 0 0 6px 0 !important;
    font-size: 16px !important;
    color: var(--cl-navy, #0b1e3f);
    font-weight: 600;
}

/* Paragraph Text Styling */
.custom-lovable-trust .cl-trust-item p {
    margin: 0 !important;
    font-size: 14px !important;
    color: var(--cl-muted, #5b6577);
    line-height: 1.4;
}

/* ============ RESPONSIVE BREAKPOINTS ============ */

/* Tablet View (2x2 Grid) */
@media (max-width: 1024px) {
    .custom-lovable-trust .cl-trust-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Mobile View (Single Column) */
@media (max-width: 576px) {
    .custom-lovable-trust .cl-trust-grid {
        grid-template-columns: 1fr !important;
        gap: 32px !important;
    }
}

/* ------------------------------------------------------------------
   Vehicle Sales listing cards
   Goes in the Vehicle Sales page custom CSS (WPBakery page settings).
   Page scoped, so it cannot affect anything else on the site.

   Does two jobs:
   1. Reveals the listings. The7 hides grid items with .iso-item{opacity:0}
      and fades them in with JS, but it never adopts a page-builder grid,
      so without this the products are invisible.
   2. Styles the sandbox-* card markup, which has no CSS behind it.
   ------------------------------------------------------------------ */

/* --- 1. Reveal the listings --------------------------------------- */

.dt-products .wf-cell.iso-item {
  opacity: 1 !important;
  visibility: visible !important;
}

/* --- 2. Grid ------------------------------------------------------ */

.woocommerce .dt-products {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
  width: 100%;
}

/* The theme's clearfix pseudo elements become grid items once the
   container is a grid, and swallow the first cell. */
.woocommerce .dt-products::before,
.woocommerce .dt-products::after {
  display: none !important;
  content: none !important;
}

.woocommerce .dt-products .wf-cell {
  width: auto !important;
  max-width: none !important;
  float: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex;
}

.dt-products article.product,
.dt-products figure.woocom-project,
.dt-products figcaption.woocom-list-content {
  width: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

/* The7 outputs its own thumbnail and cart button above the custom card,
   which duplicates the card image. Hide it and let the card do the work. */
.dt-products .woo-buttons-on-img {
  display: none !important;
}

/* Leftover from a half-finished card rebuild. Only the footer of that
   design was ever added to the markup, and it is not wired up: the price
   is an empty "Sale Price" label and the Details link has no href.
   Hidden so it does not sit under every listing. */
.dt-products .spr-card__footer {
  display: none !important;
}

/* --- 3. Card shell ------------------------------------------------ */

.smart-premium-card-sandbox {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  background: #fff;
  border: 1px solid #e3e6ea;
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow .25s ease, transform .25s ease;
}

.smart-premium-card-sandbox:hover {
  box-shadow: 0 10px 28px rgba(38, 45, 89, .13);
  transform: translateY(-3px);
}

/* --- 4. Image ----------------------------------------------------- */

.sandbox-media-panel {
  position: relative;
  overflow: hidden;
  background: #f4f5f7;
  aspect-ratio: 4 / 3;
}

.sandbox-img-link {
  display: block;
  width: 100%;
  height: 100%;
}

.sandbox-prime-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}

.smart-premium-card-sandbox:hover .sandbox-prime-img {
  transform: scale(1.04);
}

.sandbox-brand-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  background: #262d59;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 4px;
  line-height: 1.2;
}

/* --- 5. Body ------------------------------------------------------ */

.sandbox-details-panel {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 18px;
  gap: 16px;
}

.sandbox-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.sandbox-header-left {
  min-width: 0;
}

.sandbox-meta-sub {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #8a8f94;
  line-height: 1.3;
}

.sandbox-main-title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  color: #262d59;
}

.sandbox-main-title a {
  color: inherit;
  text-decoration: none;
}

.sandbox-main-title a:hover {
  color: #d92231;
}

.sandbox-header-right {
  flex: 0 0 auto;
  text-align: right;
  line-height: 1.2;
}

.sandbox-price-value,
.sandbox-price-value .woocommerce-Price-amount {
  font-size: 20px;
  font-weight: 700;
  color: #d92231;
  white-space: nowrap;
}

.sandbox-vat-tag {
  display: block;
  font-size: 11px;
  color: #8a8f94;
  margin-top: 2px;
}

/* --- 6. Spec grid ------------------------------------------------- */

.sandbox-specs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
  padding: 14px 0;
  border-top: 1px solid #eceef1;
  border-bottom: 1px solid #eceef1;
}

.sandbox-grid-item {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.sandbox-svg-icon-frame {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f2f4f7;
  border-radius: 6px;
  color: #d92231;
}

.sandbox-svg-icon-frame svg {
  width: 16px;
  height: 16px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sandbox-grid-meta {
  min-width: 0;
  line-height: 1.25;
}

.sandbox-grid-meta small {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #9aa0a6;
}

.sandbox-grid-meta strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #262d59;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- 7. Trust pills ----------------------------------------------- */

.sandbox-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sandbox-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 100px;
  line-height: 1.4;
  white-space: nowrap;
}

.sandbox-pill.pill-green { background: #e7f6ed; color: #1c7a45; }
.sandbox-pill.pill-blue  { background: #e8eefb; color: #2a4b9b; }
.sandbox-pill.pill-gray  { background: #f0f1f3; color: #5f6569; }

/* --- 8. Buttons --------------------------------------------------- */

.sandbox-btn-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}

.sandbox-btn {
  display: block;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  padding: 11px 14px;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.sandbox-btn.btn-outline {
  border: 1px solid #262d59;
  color: #262d59;
  background: #fff;
}

.sandbox-btn.btn-outline:hover {
  background: #262d59;
  color: #fff;
}

.sandbox-btn.btn-solid {
  border: 1px solid #d92231;
  background: #d92231;
  color: #fff;
}

.sandbox-btn.btn-solid:hover {
  background: #b81a27;
  border-color: #b81a27;
  color: #fff;
}

/* --- 9. Responsive ------------------------------------------------ */

/* Column count comes from the auto-fill track above, which reacts to the
   container rather than the viewport, so it stays correct alongside the
   filter sidebar. Only the card internals need a breakpoint. */

@media (max-width: 600px) {
  .woocommerce .dt-products { gap: 20px; }
  .sandbox-card-header { flex-direction: column; }
  .sandbox-header-right { text-align: left; }
}
