/* Small visual improvements for collection pages */
.collection-image-placeholder img {
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}
.collection-image-placeholder img:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
}
.welcome-btn {
  background: #2a3f8f;
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
}
.welcome-btn:hover {
  opacity: 0.95;
}
.qty-control .qty-minus,
.qty-control .qty-plus {
  background: #fff;
  border: 1px solid #ddd;
  padding: 6px 10px;
  border-radius: 4px;
}
.product-actions {
  margin-top: 10px;
}

/* Ensure details under each image are visible on large and small screens */
.featured-cars-txt {
  background: rgba(255, 255, 255, 0.95);
  color: #111;
  padding: 10px 12px;
  border-radius: 6px;
}
.featured-cars-txt h3,
.featured-cars-txt h4,
.featured-cars-txt h5,
.featured-cars-txt p,
.collection-price {
  color: inherit;
  margin: 4px 0;
}

/* Stronger visibility rules for price text in featured blocks */
.single-featured-cars .featured-cars-txt {
  position: relative;
  z-index: 20;
}
.single-featured-cars .featured-cars-txt h3,
.single-featured-cars .featured-cars-txt h5,
.single-featured-cars .featured-cars-txt .collection-price {
  color: #0b1220 !important; /* very dark charcoal */
  font-weight: 800 !important;
  text-shadow: none !important;
}

/* On small screens use a darker translucent background so text remains readable over images */
@media (max-width: 576px) {
  .featured-cars-txt {
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 10px;
  }
  .featured-cars-txt h3,
  .featured-cars-txt h4,
  .featured-cars-txt h5,
  .featured-cars-txt p,
  .collection-price {
    color: inherit;
  }
}

/* Ensure action buttons remain visible above images on small screens */
@media (max-width: 576px) {
  .collection-item,
  .single-featured-cars {
    overflow: visible;
  }
  .collection-image-placeholder,
  .collection-image-placeholder img,
  .featured-cars-img {
    position: relative;
    z-index: 0;
  }
  .featured-cars-txt,
  .product-actions,
  .product-actions .btn-add-to-cart,
  .product-actions .qty-control {
    position: relative;
    z-index: 10;
  }
  /* Make add buttons full-width and clearly separated on very small screens */
  .product-actions .btn-add-to-cart {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-top: 8px;
  }
}

/* Reduce image heights so action buttons are visible earlier */
.collection-image-placeholder,
.featured-cars-img {
  height: 180px !important;
  max-height: 180px !important;
}
.collection-image-placeholder img {
  height: 180px !important;
  max-height: 180px !important;
  object-fit: cover !important;
  display: block;
}

@media (max-width: 768px) {
  .collection-image-placeholder,
  .featured-cars-img {
    height: 160px !important;
    max-height: 160px !important;
  }
  .collection-image-placeholder img {
    height: 160px !important;
    max-height: 160px !important;
  }
}

@media (max-width: 420px) {
  .collection-image-placeholder,
  .featured-cars-img {
    height: 140px !important;
    max-height: 140px !important;
  }
  .collection-image-placeholder img {
    height: 140px !important;
    max-height: 140px !important;
  }
}

/* Image zoom modal styles */
.image-zoom-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100050;
  padding: 24px;
}
.image-zoom-overlay.open {
  display: flex;
}
.image-zoom-card {
  background: #fff;
  color: #111;
  max-width: 980px;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 0;
  max-height: calc(100vh - 80px);
}
.image-zoom-media {
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
}
.image-zoom-media img {
  max-width: 100%;
  max-height: calc(100vh - 160px);
  object-fit: contain;
  display: block;
}

/* Zoom-in transition */
.image-zoom-media img {
  transform: scale(0.96);
  opacity: 0;
  transition:
    transform 260ms cubic-bezier(0.2, 0.9, 0.2, 1),
    opacity 220ms ease;
}
.image-zoom-overlay.open .image-zoom-media img {
  transform: scale(1);
  opacity: 1;
}

/* Prev/Next controls inside the media area */
.image-zoom-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.85);
  border: none;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  z-index: 100060;
}
.image-zoom-prev {
  left: 18px;
}
.image-zoom-next {
  right: 18px;
}
.image-zoom-nav:focus {
  outline: 2px solid rgba(42, 63, 143, 0.9);
}
.image-zoom-counter {
  font-size: 14px;
  color: #666;
  margin-top: 6px;
}

/* Mobile: move prev/next below image and enlarge tap targets */
@media (max-width: 720px) {
  .image-zoom-nav {
    position: static;
    transform: none;
    top: auto;
    left: auto;
    right: auto;
    margin: 8px 6px;
    padding: 12px 14px;
    display: inline-block;
  }
  .image-zoom-prev,
  .image-zoom-next {
    border-radius: 8px;
  }
  .image-zoom-media img {
    max-height: calc(100vh - 260px);
  }
  .image-zoom-actions .welcome-btn {
    font-size: 16px;
    padding: 12px 14px;
  }
}
.image-zoom-details {
  padding: 18px;
  overflow: auto;
}
.image-zoom-details h3 {
  margin: 0 0 8px;
}
.image-zoom-details p {
  margin: 6px 0 12px;
  color: #444;
}
.image-zoom-close {
  position: absolute;
  right: 18px;
  top: 18px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  z-index: 100060;
}
.image-zoom-actions {
  margin-top: 12px;
}
.image-zoom-actions .welcome-btn {
  width: 100%;
}

@media (max-width: 720px) {
  .image-zoom-card {
    grid-template-columns: 1fr;
    max-width: 720px;
  }
  .image-zoom-details {
    max-height: 240px;
  }
}

/* Thumbnails (right column) for large screens */
.image-zoom-thumbs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: calc(100vh - 160px);
  overflow: auto;
  padding-right: 6px;
}
.image-zoom-thumbs img {
  width: 100%;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
}
.image-zoom-thumbs img.active {
  border-color: #2a3f8f;
}

/* Hover effect: subtle scale and shadow for better affordance */
.image-zoom-thumbs img {
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 120ms ease;
}
.image-zoom-thumbs img:hover,
.image-zoom-thumbs img:focus {
  transform: scale(1.06);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  border-color: rgba(42, 63, 143, 0.95);
}

@media (max-width: 720px) {
  .image-zoom-thumbs {
    display: none;
  }
}

/* ==========================================================
   Modern collection and commerce refresh
   ========================================================== */
.collection-block .row,
.featured-cars-content .row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}

.collection-block [class*="col-"],
.featured-cars-content [class*="col-"] {
  display: flex;
}

.collection-block .single-featured-cars,
.featured-cars-content .single-featured-cars,
.collection-item {
  display: flex;
  width: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(17, 19, 24, 0.1);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(17, 19, 24, 0.08);
}

.collection-image-placeholder,
.featured-cars-img {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: auto !important;
  max-height: none !important;
  border-radius: 8px 8px 0 0;
  background: #f2eee6;
}

.collection-image-placeholder::after,
.featured-cars-img::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.14));
  opacity: 0;
  transition: opacity 180ms ease;
}

.single-featured-cars:hover .collection-image-placeholder::after,
.single-featured-cars:hover .featured-cars-img::after {
  opacity: 1;
}

.collection-image-placeholder img,
.featured-cars-img img {
  width: 100%;
  height: auto !important;
  max-height: none !important;
  aspect-ratio: 4 / 5;
  border-radius: 0;
  object-fit: cover !important;
  box-shadow: none;
}

.featured-cars-txt {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px 18px 18px;
  border-radius: 0;
  background: #fff;
}

.featured-cars-txt h2 a,
.featured-cars-txt h4 {
  color: #111318 !important;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.28;
  text-transform: none;
}

.featured-cars-txt p {
  color: #687080;
  font-size: 14px;
}

.collection-price,
.featured-cars-txt h3,
.featured-cars-txt h5,
.image-zoom-price,
#cart-total {
  color: #9b6518 !important;
  font-weight: 900 !important;
}

.collection-price,
.featured-cars-txt h3,
.featured-cars-txt h5 {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 8px 0 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(215, 154, 53, 0.12);
  font-size: 14px;
}

.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: auto;
  padding-top: 16px;
}

.product-actions .welcome-btn,
.product-actions .btn-add-to-cart {
  flex: 1 1 150px;
  height: 44px;
  margin-top: 0;
  padding: 0 14px;
  white-space: normal;
}

.product-actions .qty-control {
  flex: 0 0 auto;
  padding: 4px;
  border: 1px solid rgba(17, 19, 24, 0.1);
  border-radius: 8px;
  background: #fbfaf7;
}

.qty-control .qty-minus,
.qty-control .qty-plus {
  cursor: pointer;
  transition:
    background 180ms ease,
    color 180ms ease,
    border-color 180ms ease;
}

.qty-control .qty-minus:hover,
.qty-control .qty-plus:hover {
  border-color: rgba(215, 154, 53, 0.48);
  background: #d79a35;
  color: #15110a;
}

.qty-control .qty-input {
  border-color: transparent;
  background: transparent;
}

.btn-like {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(17, 19, 24, 0.1);
  border-radius: 8px;
  background: #fff;
  color: #111318;
}

.btn-like:hover,
.btn-like.active {
  border-color: rgba(215, 154, 53, 0.5);
  background: rgba(215, 154, 53, 0.12);
  color: #9b6518;
}

.image-zoom-overlay {
  background: rgba(10, 12, 18, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.image-zoom-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.image-zoom-media {
  background: #111318;
}

.image-zoom-details {
  padding: 24px;
}

.image-zoom-details h3 {
  color: #111318;
  font-size: 24px;
  font-weight: 900;
}

.image-zoom-price {
  display: inline-flex;
  margin: 8px 0 14px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(215, 154, 53, 0.12);
}

.image-zoom-close,
.image-zoom-nav {
  border: 1px solid rgba(17, 19, 24, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: #111318;
}

.image-zoom-close {
  width: 40px;
  height: 40px;
  padding: 0;
}

.image-zoom-nav {
  width: 42px;
  height: 42px;
  padding: 0;
}

.image-zoom-thumbs img {
  border-radius: 8px;
}

#cart-items,
.cart-summary,
.cart-container,
.order-form,
.checkout-form,
.contact-form,
.contact-info,
.about-card,
.legal-content {
  border: 1px solid rgba(17, 19, 24, 0.1);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(17, 19, 24, 0.08);
}

.contact-form,
.order-form,
.checkout-form {
  padding: 28px;
}

.contact-form label,
.order-form label,
.checkout-form label {
  color: #111318;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.contact-form input,
.contact-form textarea,
.order-form input,
.order-form textarea,
.checkout-form input,
.checkout-form textarea {
  width: 100%;
  margin-bottom: 14px;
}

@media (max-width: 767px) {
  .collection-block [class*="col-"],
  .featured-cars-content [class*="col-"] {
    display: block;
  }

  .collection-block .single-featured-cars,
  .featured-cars-content .single-featured-cars {
    margin-bottom: 22px;
  }

  .product-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .product-actions .qty-control {
    justify-content: center;
  }

  .image-zoom-details {
    padding: 18px;
  }
}
