/* ===== MyCar custom styles (built on top of the Canvas "Real Estate" theme) ===== */

.mycar-main {
  min-height: 40vh;
}

/* Hero banner: multi-image auto-rotating slider. The Canvas real-estate demo only
   shows a single static background image, so this cross-fade slider is custom,
   styled to match the theme's dark/overlay look. */
.mycar-hero {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #111;
}

.mycar-hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  z-index: 1;
}

.mycar-hero-slide.active {
  opacity: 1;
  z-index: 2;
}

.mycar-hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Canvas Single Property Slider overlay and typography */
.slider-element .real-estate-info-wrap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 24px;
  width: 100%;
  z-index: 2;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.slider-element .real-estate-info-wrap p {
  color: #eee;
  max-width: 720px;
}

.mycar-hero-price {
  position: static;
  text-align: center;
}

.mycar-hero-price h3 {
  display: inline-block;
  color: #fff;
  font-size: 2.5rem;
  margin: 0;
  font-weight: 600;
  line-height: 1.1;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.75);
}

.mycar-hero-price span {
  font-size: 1.1rem;
  font-weight: 400;
  opacity: 0.9;
}

@media (max-width: 991px) {
  .slider-element.include-header {
    height: 560px !important;
  }

  .slider-element .real-estate-info-wrap {
    bottom: 16px;
  }

  .slider-element h2 {
    font-size: 1.5rem !important;
  }

  .mycar-hero-price {
    text-align: left;
  }

  .mycar-hero-price h3 {
    font-size: 1.85rem !important;
  }
}

.mycar-hero-caption-text {
  transition: opacity 0.3s ease-in-out;
}

#header.transparent-header.dark {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#header.transparent-header.dark #logo a {
  color: #fff;
}

.mycar-feature-icon img {
  height: 48px;
  width: 48px;
  object-fit: contain;
}

.mycar-gallery-image {
  max-height: 85vh;
  max-width: 100%;
}

.mycar-social-icon-bg {
  background-color: rgba(255, 255, 255, 0.12);
}

#footer .mycar-line-qr {
  max-width: 140px;
  background: #fff;
  padding: 6px;
  border-radius: 4px;
}

/* All Cars: horizontally sliding thumbnail strip (native scroll-snap, JS-driven
   prev/next buttons in car-carousel.js). Used because the car catalog can grow
   but should still fit in a single row without pagination. */
.mycar-carousel-wrap {
  position: relative;
  padding: 0 48px;
}

.mycar-carousel {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 8px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.mycar-carousel::-webkit-scrollbar {
  display: none;
}

.mycar-carousel-item {
  flex: 0 0 auto;
  width: 300px;
  scroll-snap-align: start;
}

.mycar-carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #ddd;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.mycar-carousel-prev {
  left: 0;
}

.mycar-carousel-next {
  right: 0;
}

@media (max-width: 767px) {
  .mycar-carousel-item {
    width: 240px;
  }
}

/* Card layout fix: prevent info icon from overlapping title text */
.real-estate-item-desc .real-estate-item-link {
  position: static !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.real-estate-item-desc h3 {
  margin-bottom: 0;
  line-height: 1.35;
}

/* Rich text formatting for Car Description & Remark */
.mycar-rich-text {
  font-size: 15px;
  line-height: 1.7;
  color: #444;
}

.mycar-rich-text p {
  margin-bottom: 0.85rem;
  line-height: 1.7;
}

.mycar-rich-text p:last-child {
  margin-bottom: 0;
}

/* ===== Sold Car Watermarks (CSS Overlays - Subtle & Translucent) ===== */
/* 1. Thumbnail Card in All Cars */
.real-estate-item-image {
  position: relative;
}

.sold-watermark-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  pointer-events: none;
  z-index: 3;
}

.sold-watermark-stamp {
  color: rgba(255, 255, 255, 0.7);
  background: rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  padding: 4px 16px;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  border-radius: 6px;
  transform: rotate(-12deg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  user-select: none;
  white-space: nowrap;
}

/* 2. Hero Banner Slider in Car Details */
.hero-sold-watermark-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
  pointer-events: none;
}

.hero-sold-watermark-stamp {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.42);
  border: 2px solid rgba(255, 255, 255, 0.28);
  background-color: rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  padding: 10px 44px;
  border-radius: 14px;
  transform: rotate(-12deg);
  letter-spacing: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  user-select: none;
  white-space: nowrap;
}

/* 3. Magnific Popup Lightbox Gallery in Car Details */
body.car-sold .mfp-figure figure {
  position: relative;
  display: inline-block;
}

body.car-sold .mfp-figure figure::after {
  content: "ขายแล้ว";
  position: absolute;
  top: 50%;
  left: 50%;
  bottom: auto !important;
  right: auto !important;
  width: auto !important;
  height: auto !important;
  max-width: 90%;
  display: inline-block !important;
  transform: translate(-50%, -50%) rotate(-12deg);
  font-size: clamp(1.8rem, 4.5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.42);
  border: 2px solid rgba(255, 255, 255, 0.28);
  background-color: rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border-radius: 12px;
  padding: 8px 36px;
  letter-spacing: 6px;
  text-align: center;
  pointer-events: none;
  z-index: 1060;
  white-space: nowrap;
  user-select: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}
