/* ============================================
   COPACARS.EC — Theme v4 Custom Styles
   Premium Car Marketplace Design System
   ISO 9241 · WCAG 2.2 AA Compliant
   ============================================ */

/* ---------- Smooth Scroll ---------- */
html {
  scroll-behavior: smooth;
  }
}

/* =============================================
   GALLERY NAVIGATION (v4-details)
   ISO 9241-210 / WCAG 2.2 AA Compliant
   High visibility, sufficient contrast (≥4.5:1), 48px touch targets
   ============================================= */
.v4-details-gallery,
#v4GalleryMain {
  position: relative;
}

/* Gallery Navigation - Consistent with related slider (ISO 9241-210 Consistency) */
.v4-gallery-next,
.v4-gallery-prev,
.swiper-button-next,
.swiper-button-prev {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  z-index: 40 !important;
  width: 40px !important;
  height: 40px !important;
  background-color: rgba(255,255,255,0.95) !important;
  border: 1px solid rgb(226 232 240) !important;
  color: rgb(71 85 105) !important;
  border-radius: 9999px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1) !important;
  transition: all 0.2s ease !important;
  opacity: 1 !important;
  cursor: pointer;
}

.v4-gallery-next,
.swiper-button-next {
  right: 16px !important;
}

.v4-gallery-prev,
.swiper-button-prev {
  left: 16px !important;
}

.v4-gallery-next i,
.v4-gallery-prev i,
.swiper-button-next i,
.swiper-button-prev i {
  font-size: 22px !important;
  font-weight: 700 !important;
}

/* Hover & Active States - Matching related slider style */
.v4-gallery-next:hover,
.v4-gallery-prev:hover,
.swiper-button-next:hover,
.swiper-button-prev:hover {
  background-color: var(--color-primary) !important;
  color: white !important;
  border-color: var(--color-primary) !important;
  transform: translateY(-50%) scale(1.05) !important;
}

/* Disabled state (first/last slide) */
.swiper-button-disabled,
.v4-gallery-next.swiper-button-disabled,
.v4-gallery-prev.swiper-button-disabled {
  opacity: 0.35 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}

/* =============================================
   FORCE REMOVE SWIPER DEFAULT PSEUDO ARROWS
   Critical fix for double chevrons (user-reported).
   Matches exact console fix + maximum specificity.
   ISO 9241-210 / WCAG 2.2 AA - Only one clear navigation icon allowed.
   ============================================= */
.swiper-button-next:after,
.swiper-button-prev:after,
.v4-gallery-next:after,
.v4-gallery-prev:after,
#v4GalleryMain .swiper-button-next:after,
#v4GalleryMain .swiper-button-prev:after,
.v4-details-gallery .swiper-button-next:after,
.v4-details-gallery .swiper-button-prev:after,
.swiper-rtl .swiper-button-prev:after,
.swiper-rtl .swiper-button-next:after {
    content: none !important;
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    font-size: 0 !important;
}

/* Focus styles for accessibility (WCAG) */
.v4-gallery-next:focus-visible,
.v4-gallery-prev:focus-visible,
.swiper-button-next:focus-visible,
.swiper-button-prev:focus-visible {
  outline: 3px solid rgb(249 115 22);
  outline-offset: 4px;
}

/* ---------- Focus Visible (WCAG 2.2 AA) ---------- */
*:focus-visible {
  outline: 3px solid var(--color-primary, #F97316);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Touch Target Minimum (ISO 9241-420) ---------- */
.v4-touch-target {
  min-width: 48px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Glassmorphism ---------- */
.v4-glass {
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.v4-glass-dark {
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ---------- Card Hover Elevate ---------- */
.v4-card-elevate {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.35s ease;
  will-change: transform;
}

.v4-card-elevate:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px -12px rgba(0, 0, 0, 0.18);
}

/* ---------- Image Hover Zoom ---------- */
.v4-img-zoom { overflow: hidden; }
.v4-img-zoom img {
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.v4-img-zoom:hover img {
  transform: scale(1.06);
}

/* ---------- Animations ---------- */
@keyframes v4FadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes v4FadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes v4SlideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes v4ScaleIn {
  from { opacity: 0; transform: scale(0.93); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes v4Pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}
@keyframes v4Shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@keyframes v4Float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.v4-animate-fadeInUp { animation: v4FadeInUp 0.65s ease-out both; }
.v4-animate-fadeIn { animation: v4FadeIn 0.5s ease-out both; }
.v4-animate-scaleIn { animation: v4ScaleIn 0.5s ease-out both; }
.v4-animate-float { animation: v4Float 3s ease-in-out infinite; }

/* Stagger children delays */
.v4-stagger > *:nth-child(1) { animation-delay: 0.06s; }
.v4-stagger > *:nth-child(2) { animation-delay: 0.12s; }
.v4-stagger > *:nth-child(3) { animation-delay: 0.18s; }
.v4-stagger > *:nth-child(4) { animation-delay: 0.24s; }
.v4-stagger > *:nth-child(5) { animation-delay: 0.30s; }
.v4-stagger > *:nth-child(6) { animation-delay: 0.36s; }
.v4-stagger > *:nth-child(7) { animation-delay: 0.42s; }
.v4-stagger > *:nth-child(8) { animation-delay: 0.48s; }

/* ---------- Hero — Split Layout ---------- */
.v4-hero {
  position: relative;
  width: 100%;
  overflow: hidden;
}

/* Hero — Right colored panel (background) */
.v4-hero__bg {
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background-color: var(--color-primary);
  z-index: 0;
}
@media (max-width: 1023px) {
  .v4-hero__bg {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 300px;
  }
}

/* Hero — Left content area */
.v4-hero__left {
  position: relative;
  z-index: 2;
  padding-top: 40px;
  padding-bottom: 40px;
}

/* Hero — Right image area */
.v4-hero__right {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hero — Image Slider */
.v4-hero__slider {
  position: relative;
  width: 100%;
}
.v4-hero__slider img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  filter: drop-shadow(-10px 10px 30px rgba(0, 0, 0, 0.3));
}

/* Hero — Overlap shape (decoration) */
.v4-hero__overlap {
  position: absolute;
  top: 0;
  right: 0;
  width: 55%;
  height: 100%;
  background-color: var(--color-primary);
  border-radius: 0 0 0 60px;
  z-index: 0;
}
@media (max-width: 1023px) {
  .v4-hero__overlap {
    width: 100%;
    border-radius: 0 0 0 40px;
    position: relative;
    min-height: 280px;
  }
}

/* Hero — Search label */
.v4-hero__search-label {
  color: #64748b;
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 16px;
}

/* Hero — Pagination */
.v4-hero__pagination {
  position: absolute;
  z-index: 5;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
}

/* Hero title/subtitle (unused in split but kept for compatibility) */
.v4-hero__title {
  color: #0f172a;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
}
.v4-hero__subtitle {
  color: var(--color-primary);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 12px;
}
.v4-hero__description {
  color: rgba(255, 255, 255, 0.7);
  margin-top: 20px;
  font-size: 1rem;
  line-height: 1.6;
}

/* ---------- Categories Section ---------- */
.v4-categories {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  padding: 80px 0;
}
.v4-categories__label {
  color: var(--color-primary);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 8px;
}
.v4-categories__title {
  color: #fff;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
}
.v4-categories__text {
  color: #94a3b8;
  margin-top: 16px;
  font-size: 0.9rem;
  line-height: 1.7;
}
.v4-categories__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
  background-color: var(--color-primary);
  transition: opacity 0.3s;
  text-decoration: none;
}
.v4-categories__btn:hover { opacity: 0.9; }

/* Category Card */
.v4-cat-card {
  display: block;
  text-decoration: none;
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.35s ease;
}
.v4-cat-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}
.v4-cat-card__header {
  background-color: var(--color-primary);
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.v4-cat-card__name {
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0;
}
.v4-cat-card__count {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 700;
  font-size: 1.1rem;
}
.v4-cat-card__body {
  background: #fff;
  padding: 16px 16px 0 16px;
  min-height: 160px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.v4-cat-card__img {
  display: block;
  max-width: 100%;
  max-height: 150px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.25));
  transition: transform 0.4s ease;
}
.v4-cat-card:hover .v4-cat-card__img {
  transform: scale(1.05) translateY(-4px);
}

/* ---------- Price Highlight ---------- */
.v4-price {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-primary);
}
.v4-price-old {
  text-decoration: line-through;
  opacity: 0.45;
  color: #94a3b8;
}

/* ---------- Section Divider ---------- */
.v4-divider {
  width: 48px;
  height: 4px;
  border-radius: 99px;
  background: var(--color-primary);
}

/* ---------- Sticky Header ---------- */
.v4-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: box-shadow 0.35s ease, padding 0.35s ease;
}
.v4-header.scrolled {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
}

/* Hide Bootstrap map modal (v4 doesn't load Bootstrap JS) */
#GoogleMapModal { display: none !important; }

/* WhatsApp z-index above mobile sticky CTA */
#WAButton { z-index: 200 !important; }

/* ---------- Nice Select Overrides for v4 ---------- */
.v4-search-form .nice-select {
  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(255,255,255,0.2);
  border-radius: 0;
  padding-left: 0;
  height: 48px;
  line-height: 46px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: #fff;
  min-width: 120px;
}
.v4-search-form .nice-select::after {
  border-color: rgba(255,255,255,0.5);
  right: 8px;
}
.v4-search-form .nice-select .current {
  color: #fff;
}
.v4-search-form .nice-select:hover {
  border-bottom-color: var(--color-primary);
}
.v4-search-form .nice-select .list {
  border-radius: 12px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.18);
  border: 1px solid #e2e8f0;
  background: #fff;
  max-height: 250px;
  overflow-y: auto;
}
.v4-search-form .nice-select .option {
  color: #1e293b;
  min-height: 44px;
  line-height: 44px;
  padding: 0 16px;
}
.v4-search-form .nice-select .option:hover,
.v4-search-form .nice-select .option.focus,
.v4-search-form .nice-select .option.selected.focus {
  background-color: rgba(var(--color-primary-rgb), 0.08);
}
.v4-search-form input[type="text"] {
  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(255,255,255,0.2);
  border-radius: 0;
  padding: 8px 0;
  height: 48px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: #fff;
  width: 100%;
}
.v4-search-form input[type="text"]::placeholder {
  color: rgba(255,255,255,0.5);
}
.v4-search-form input[type="text"]:focus {
  border-bottom-color: var(--color-primary);
  outline: none;
  box-shadow: none;
}

/* ---------- NoUi Slider Override ---------- */
.v4-price-slider .noUi-target {
  background: rgba(255,255,255,0.15);
  border: none;
  border-radius: 4px;
  height: 6px;
  box-shadow: none;
}
.v4-price-slider .noUi-connect {
  background: var(--color-primary);
  border-radius: 4px;
}
.v4-price-slider .noUi-handle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 3px solid var(--color-primary);
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  cursor: pointer;
  top: -7px;
  right: -10px;
}
.v4-price-slider .noUi-handle::before,
.v4-price-slider .noUi-handle::after { display: none; }
.v4-price-slider .noUi-handle:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

/* ---------- Swiper v4 ---------- */
.v4-swiper .swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  background: #94a3b8;
  opacity: 0.4;
  transition: all 0.3s ease;
}
.v4-swiper .swiper-pagination-bullet-active {
  opacity: 1;
  background: var(--color-primary);
  width: 28px;
  border-radius: 5px;
}

/* ---------- Wishlist Button ---------- */
.v4-wishlist {
  transition: all 0.25s ease;
}
.v4-wishlist:hover,
.v4-wishlist.wishlist-active {
  color: #EF4444 !important;
  transform: scale(1.18);
}
.v4-wishlist.wishlist-active i::before {
  content: "\f004";
  font-weight: 900;
}

/* ---------- Testimonial Card ---------- */
.v4-testimonial-card {
  position: relative;
}
.v4-testimonial-card::before {
  content: '\201C';
  position: absolute;
  top: -8px;
  left: 16px;
  font-size: 4rem;
  line-height: 1;
  color: var(--color-primary);
  opacity: 0.15;
  font-family: 'Georgia', serif;
}

/* ---------- Rating Stars ---------- */
.v4-stars {
  display: inline-flex;
  gap: 2px;
}
.v4-stars .star {
  color: #fbbf24;
  font-size: 0.875rem;
}
.v4-stars .star.empty {
  color: #e2e8f0;
}

/* ---------- Native Select Options Fix ---------- */
.v4-search-form select option {
  background: #fff;
  color: #1e293b;
}

/* ---------- Cookie Consent Override ---------- */
.v4-cookie .js-cookie-consent {
  border-radius: 16px;
  margin: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

/* ---------- Skeleton Loader ---------- */
.v4-skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: v4Shimmer 1.8s ease-in-out infinite;
  border-radius: 8px;
}

/* ---------- Mobile Off-Canvas Menu ---------- */
.v4-mobile-overlay {
  transition: opacity 0.3s ease;
}
.v4-mobile-drawer {
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}

/* ---------- RTL Support ---------- */
[dir="rtl"] .v4-search-form .nice-select {
  padding-right: 0;
  padding-left: 18px;
}

[dir="rtl"] .v4-divider {
  margin-left: auto;
  margin-right: 0;
}

/* ---------- Custom Scrollbar ---------- */
.v4-scrollbar::-webkit-scrollbar { width: 6px; height: 6px; }
.v4-scrollbar::-webkit-scrollbar-track { background: transparent; }
.v4-scrollbar::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
.v4-scrollbar::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ---------- Condition Tabs ---------- */
.v4-condition-tab {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid transparent;
  cursor: pointer;
}
.v4-condition-tab:hover {
  background: #e2e8f0;
  color: #1e293b;
}
.v4-condition-tab.active {
  background: var(--color-primary) !important;
  color: #fff !important;
  border-color: var(--color-primary) !important;
}

/* ---------- Step Card ---------- */
.v4-step-card {
  position: relative;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.35s ease;
}
.v4-step-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.15);
}

/* ---------- Video Play Button ---------- */
.v4-video-play {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.v4-video-play-ripple {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 2px solid var(--color-primary);
  opacity: 0;
  animation: v4Ripple 2.5s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}
.v4-video-play-ripple-2 {
  animation-delay: 0.8s;
}
@keyframes v4Ripple {
  0% {
    opacity: 0.6;
    transform: scale(0.8);
  }
  100% {
    opacity: 0;
    transform: scale(1.8);
  }
}

/* ---------- Step Connector Line ---------- */
.v4-step-connector {
  position: absolute;
}

/* ---------- Print Styles ---------- */
@media print {
  .v4-header, #WAButton, .cartIconWrapper,
  .v4-mobile-drawer, .v4-mobile-overlay, .v4-hero__slider {
    display: none !important;
  }
  .v4-hero { min-height: auto; padding: 40px 0; }
}

/* ═══════════════════════════════════════════════
   V4 BREADCRUMB
   ═══════════════════════════════════════════════ */
.v4-breadcrumb {
  position: relative;
  overflow: hidden;
  padding-top: 7rem;
  padding-bottom: 2.5rem;
  background-color: #0f172a;
}
.v4-breadcrumb__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.v4-breadcrumb__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.18;
}
.v4-breadcrumb__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #0f172a, transparent);
}
.v4-breadcrumb__content {
  position: relative;
  z-index: 10;
  text-align: center;
}
.v4-breadcrumb__title {
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 1rem;
}
.v4-breadcrumb__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #94a3b8;
}
.v4-breadcrumb__nav a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.2s;
}
.v4-breadcrumb__nav a:hover {
  color: #fff;
}
.v4-breadcrumb__nav-sep {
  color: #475569;
}
.v4-breadcrumb__nav-current {
  color: #fff;
}

/* ═══════════════════════════════════════════════
   V4 VENDOR CARD
   ═══════════════════════════════════════════════ */
.v4-vendor-card {
  background: #fff;
  border-radius: 1.25rem;
  border: 1px solid #f1f5f9;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.v4-vendor-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.1);
}
.v4-vendor-card__header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border-bottom: 1px solid #f1f5f9;
}
.v4-vendor-card__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  flex-shrink: 0;
}
.v4-vendor-card__name {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}
.v4-vendor-card__name a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}
.v4-vendor-card__name a:hover {
  color: var(--color-primary);
}
.v4-vendor-card__company {
  font-size: 0.8125rem;
  color: #64748b;
  margin-top: 0.125rem;
}
.v4-vendor-card__stat {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-top: 0.375rem;
  background: rgba(var(--color-primary-rgb, 220, 38, 38), 0.08);
  padding: 0.125rem 0.5rem;
  border-radius: 99px;
}
.v4-vendor-card__body {
  padding: 1.25rem 1.5rem;
}
.v4-vendor-card__info {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.v4-vendor-card__info li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: #475569;
  line-height: 1.5;
}
.v4-vendor-card__info li i {
  margin-top: 0.125rem;
  color: var(--color-primary);
  width: 14px;
  text-align: center;
  flex-shrink: 0;
}
.v4-vendor-card__info li a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}
.v4-vendor-card__info li a:hover {
  color: var(--color-primary);
}
.v4-vendor-card__btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 0.625rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: #fff;
  background-color: var(--color-primary);
  text-decoration: none;
  transition: opacity 0.2s, box-shadow 0.2s;
}
.v4-vendor-card__btn:hover {
  opacity: 0.9;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  color: #fff;
}

/* ═══════════════════════════════════════════════
   V4 BLOG CARD
   ═══════════════════════════════════════════════ */
.v4-blog-card {
  background: #fff;
  border-radius: 1.25rem;
  border: 1px solid #f1f5f9;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}
.v4-blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.1);
}
.v4-blog-card__image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
}
.v4-blog-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.v4-blog-card:hover .v4-blog-card__image img {
  transform: scale(1.05);
}
.v4-blog-card__category {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
  background-color: var(--color-primary);
}
.v4-blog-card__body {
  padding: 1.25rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.v4-blog-card__date {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}
.v4-blog-card__title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.625rem;
  line-height: 1.4;
}
.v4-blog-card__title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}
.v4-blog-card__title a:hover {
  color: var(--color-primary);
}
.v4-blog-card__excerpt {
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.6;
  flex: 1;
  margin-bottom: 1rem;
}
.v4-blog-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
  transition: gap 0.3s ease;
}
.v4-blog-card__link:hover {
  gap: 0.625rem;
  color: var(--color-primary);
}

/* ═══════════════════════════════════════════════
   V4 CONTACT CARD
   ═══════════════════════════════════════════════ */
.v4-contact-card {
  background: #fff;
  border-radius: 1.25rem;
  border: 1px solid #f1f5f9;
  padding: 2rem;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.v4-contact-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.1);
}
.v4-contact-card__icon {
  width: 56px;
  height: 56px;
  border-radius: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #fff;
  background-color: var(--color-primary);
  margin-bottom: 1.25rem;
}
.v4-contact-card__label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  margin-bottom: 0.375rem;
}
.v4-contact-card__value {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #0f172a;
  word-break: break-word;
}
.v4-contact-card__value a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}
.v4-contact-card__value a:hover {
  color: var(--color-primary);
}

/* ═══════════════════════════════════════════════
   V4 PAGINATION
   ═══════════════════════════════════════════════ */
.v4-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  flex-wrap: wrap;
}
.v4-pagination .page-item .page-link,
.v4-pagination > li > a,
.v4-pagination > li > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.75rem;
  border-radius: 0.625rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #475569;
  background: #fff;
  border: 1px solid #e2e8f0;
  text-decoration: none;
  transition: all 0.2s;
}
.v4-pagination .page-item.active .page-link,
.v4-pagination > li.active > a,
.v4-pagination > li.active > span {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.v4-pagination .page-item .page-link:hover,
.v4-pagination > li > a:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}
.v4-pagination .page-item.disabled .page-link,
.v4-pagination > li.disabled > span {
  opacity: 0.45;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════
   V4 AUTH FORM (shared login/signup)
   ═══════════════════════════════════════════════ */
.v4-auth-card {
  background: #fff;
  border-radius: 1.5rem;
  padding: 2rem 2.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.06);
  border: 1px solid #f1f5f9;
}
@media (max-width: 639px) {
  .v4-auth-card {
    padding: 1.5rem;
    border-radius: 1.25rem;
  }
}
.v4-input {
  width: 100%;
  padding: 0.875rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #0f172a;
  font-size: 0.875rem;
  transition: all 0.2s;
  outline: none;
}
.v4-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb, 220, 38, 38), 0.15);
  background: #fff;
}
.v4-input::placeholder {
  color: #94a3b8;
}
.v4-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: 0.75rem;
  font-weight: 700;
  font-size: 0.9375rem;
  color: #fff;
  background-color: var(--color-primary);
  border: none;
  cursor: pointer;
  transition: opacity 0.2s, box-shadow 0.2s, transform 0.2s;
  text-decoration: none;
}
.v4-btn-primary:hover {
  opacity: 0.92;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
  color: #fff;
}

/* ═══════════════════════════════════════════════
   V4 SEARCH FILTER BAR
   ═══════════════════════════════════════════════ */
.v4-filter-bar {
  background: #fff;
  border-radius: 1.25rem;
  border: 1px solid #f1f5f9;
  padding: 1.5rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  margin-bottom: 2rem;
}
.v4-filter-bar__label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  margin-bottom: 0.375rem;
}
.v4-filter-bar__select {
  width: 100%;
  padding: 0.625rem 2rem 0.625rem 0.75rem;
  border-radius: 0.625rem;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #0f172a;
  font-size: 0.8125rem;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.2s;
  outline: none;
}
.v4-filter-bar__select:focus {
  border-color: var(--color-primary);
}
.v4-filter-bar__input {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border-radius: 0.625rem;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #0f172a;
  font-size: 0.8125rem;
  transition: border-color 0.2s;
  outline: none;
}
.v4-filter-bar__input:focus {
  border-color: var(--color-primary);
}

/* Utility for primary color links/buttons (ISO compliance - no inline styles) */
.text-primary-v4 {
  color: var(--color-primary);
}
.text-primary-v4:hover {
  color: var(--color-primary);
  filter: brightness(1.1);
}

/* V4 Primary Color Utilities - Full inline style removal (ISO 25010 compliance) */
.v4-primary-bg {
  background-color: var(--color-primary);
}
.v4-primary-text {
  color: var(--color-primary);
}
.v4-primary-text:hover {
  color: var(--color-primary);
  filter: brightness(1.1);
}
.v4-primary-btn {
  background-color: var(--color-primary);
}
.v4-primary-btn:hover {
  background-color: var(--color-primary);
  filter: brightness(1.1);
}
.v4-primary-icon {
  color: var(--color-primary);
}
.v4-active-tab {
  background-color: var(--color-primary) !important;
  color: white !important;
  border-color: var(--color-primary) !important;
}

/* Stronger active state for featured vehicle tabs */
button:has(.v4-active-tab),
button.v4-active-tab {
  background-color: var(--color-primary) !important;
  color: white !important;
}
.v4-price-text {
  color: var(--color-primary);
}
.v4-underline-primary {
  position: relative;
}
.v4-underline-primary:after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-primary);
}

/* Swiper Navigation Arrows - Fix visibility */
.swiper-button-next,
.swiper-button-prev {
  opacity: 1 !important;
  visibility: visible !important;
  z-index: 20 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.swiper-button-next:after,
.swiper-button-prev:after {
  content: '›' !important;
  font-size: 24px !important;
  font-weight: 900 !important;
  color: white !important;
  line-height: 1;
}

.swiper-button-prev:after {
  content: '‹' !important;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
  background-color: var(--color-primary) !important;
  transform: scale(1.05);
}
.v4-divider-primary {
  background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
  opacity: 0.2;
}
.v4-rgba-primary {
  background: rgba(var(--color-primary-rgb), 0.1);
}
.v4-map-embed {
  min-height: 450px;
}

/* Final Mobile Fixes */
@media (max-width: 768px) {
  /* Prevent flickering on tabs and cards */
  [x-show],
  .v4-active-tab,
  .group-hover\\:scale-110,
  .transition-all,
  .transition-transform,
  .transition-opacity {
    transition: none !important;
  }
  
  .animate-pulse {
    animation: none !important;
  }
  
  /* Ensure arrows are visible on mobile */
  .swiper-button-next,
  .swiper-button-prev {
    width: 44px !important;
    height: 44px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    opacity: 1 !important;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.3) !important;
  }
  
  .swiper-button-next:after,
  .swiper-button-prev:after {
    font-size: 24px !important;
  }
}

/* ═══════════════════════════════════════════════
   V4 SOLD OVERLAY SYSTEM (ISO 9241-171 / WCAG AA)
   Non-destructive CSS overlay — images untouched
   ═══════════════════════════════════════════════ */

/* Card-level sold treatment — subtle grayscale */
.v4-sold .v4-img-zoom img,
.v4-sold img:first-child {
  filter: grayscale(35%) brightness(0.92);
  transition: filter 0.3s ease;
}
.v4-sold:hover .v4-img-zoom img,
.v4-sold:hover img:first-child {
  filter: grayscale(15%) brightness(0.96);
}

/* SOLD Badge — positioned on image area */
.v4-sold-badge {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 15;
  pointer-events: none;
}
.v4-sold-badge span {
  display: inline-block;
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #fff;
  font-weight: 800;
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.375rem 1.25rem 0.375rem 0.75rem;
  border-radius: 0 0 0 0.75rem;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
  font-family: var(--font-display, 'Outfit', sans-serif);
}

/* Details page — sold banner */
.v4-sold-banner {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #fff;
  padding: 1rem 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.25);
  margin-bottom: 0.5rem;
}

/* Details page — gallery sold overlay */
.v4-sold-gallery {
  position: relative;
}
.v4-sold-gallery::after {
  content: 'VENDIDO';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-15deg);
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 900;
  font-family: var(--font-display, 'Outfit', sans-serif);
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.7);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
  z-index: 10;
  pointer-events: none;
  white-space: nowrap;
}
.v4-sold-gallery .swiper-slide img {
  filter: grayscale(40%) brightness(0.8);
}

/* List view — sold row subtle opacity */
.v4-sold.sm\:flex {
  opacity: 0.88;
}
.v4-sold.sm\:flex:hover {
  opacity: 1;
}

/* ═══════════════════════════════════════════════
   V4 CUSTOM PAGE CONTENT (TINYMCE)
   ═══════════════════════════════════════════════ */
.v4-tinymce-content {
  color: #475569;
  line-height: 1.7;
}
.v4-tinymce-content h1,
.v4-tinymce-content h2,
.v4-tinymce-content h3,
.v4-tinymce-content h4,
.v4-tinymce-content h5,
.v4-tinymce-content h6 {
  font-family: var(--font-display, 'Outfit', sans-serif);
  color: #0f172a;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 1rem;
}
.v4-tinymce-content h1 { font-size: 2.25rem; }
.v4-tinymce-content h2 { font-size: 1.875rem; }
.v4-tinymce-content h3 { font-size: 1.5rem; }
.v4-tinymce-content h4 { font-size: 1.25rem; }
.v4-tinymce-content p {
  margin-bottom: 1.25rem;
}
.v4-tinymce-content ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}
.v4-tinymce-content ol {
  list-style-type: decimal;
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}
.v4-tinymce-content li {
  margin-bottom: 0.5rem;
}
.v4-tinymce-content a {
  color: #dc2626; /* Primary brand color */
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: all 0.2s;
}
.v4-tinymce-content a:hover {
  text-decoration-color: #dc2626;
}
.v4-tinymce-content blockquote {
  border-left: 4px solid #dc2626;
  padding-left: 1.25rem;
  font-style: italic;
  background: #f8fafc;
  padding: 1rem 1.25rem;
  border-radius: 0 0.5rem 0.5rem 0;
  margin-bottom: 1.25rem;
}
.v4-tinymce-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin: 1.5rem 0;
}

/* ═══════════════════════════════════════════════
   V4 CAR DESCRIPTION TYPOGRAPHY
   Replaces Tailwind prose plugin (not in CDN)
   ISO 9241-112: Text readability & spacing
   ═══════════════════════════════════════════════ */
.v4-car-description {
  color: #475569;
  font-size: 0.9375rem;
  line-height: 1.75;
  letter-spacing: 0.01em;
}
.v4-car-description p {
  margin-bottom: 1.5rem;
}
.v4-car-description p:last-child {
  margin-bottom: 0;
}
.v4-car-description p:first-child::first-letter {
  font-size: 1.75em;
  font-weight: 700;
  color: #0f172a;
  line-height: 1;
  float: left;
  margin-right: 0.125rem;
  margin-top: 0.125rem;
}
.v4-car-description h2,
.v4-car-description h3,
.v4-car-description h4 {
  font-family: var(--font-display, 'Outfit', sans-serif);
  color: #0f172a;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}
.v4-car-description h2 { font-size: 1.5rem; }
.v4-car-description h3 { font-size: 1.25rem; }
.v4-car-description h4 { font-size: 1.125rem; }
.v4-car-description ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}
.v4-car-description ol {
  list-style-type: decimal;
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}
.v4-car-description li {
  margin-bottom: 0.5rem;
  line-height: 1.65;
}
.v4-car-description a {
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-color: rgba(var(--color-primary-rgb, 185, 31, 24), 0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}
.v4-car-description a:hover {
  text-decoration-color: var(--color-primary);
}
.v4-car-description strong,
.v4-car-description b {
  color: #1e293b;
  font-weight: 600;
}
.v4-car-description blockquote {
  border-left: 4px solid var(--color-primary);
  padding: 1rem 1.25rem;
  background: #f8fafc;
  border-radius: 0 0.5rem 0.5rem 0;
  margin-bottom: 1.5rem;
  font-style: italic;
  color: #64748b;
}
.v4-car-description img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin: 1.5rem 0;
}
