/* LilamAuto shopper-facing listing cards — design tokens + layout (LilamAuto surfaces only) */
:root {
  --la-card-radius: 16px;
  --la-card-pad: 16px;
  --la-card-gap: 8px;
  --la-card-bg: #ffffff;
  --la-card-border: 1px solid #e5e7eb;
  --la-card-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  --la-card-shadow-hover: 0 8px 24px rgba(15, 23, 42, 0.1);
  --la-card-img-bg: #f3f4f6;
  --la-color-price: #2563eb;
  --la-color-title: #0f172a;
  --la-color-meta: #6b7280;
  --la-color-loc: #94a3b8;
  --la-overlay-bg: rgba(255, 255, 255, 0.92);
  --la-overlay-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
}

.la-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 640px) {
  .la-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .la-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 1280px) {
  .la-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Full-height cards in CSS grids (vehicle / parts / store product rows) */
.la-card--stretch {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.la-card--stretch .la-card__stack {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.la-card--stretch .la-card__body {
  flex: 1 1 auto;
}
.la-card--stretch .la-card__contact-row--footer {
  flex-shrink: 0;
  margin-top: auto;
}

.la-card {
  position: relative;
  display: block;
  background: var(--la-card-bg);
  border: var(--la-card-border);
  border-radius: var(--la-card-radius);
  box-shadow: var(--la-card-shadow);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}

.la-card--sold {
  opacity: 0.92;
}
.la-card--sold .la-card__image img {
  filter: grayscale(0.35);
}
.la-card__sold-ribbon {
  display: inline-block;
  padding: 0.35rem 0.65rem;
  border-radius: 0.5rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: #1e293b;
  color: #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25);
}
.la-card__sold-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.42);
  pointer-events: none;
}
.la-card__sold-overlay span {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: #dc2626;
  color: #fff;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.45);
  transform: rotate(-8deg);
}
.la-card:hover {
  box-shadow: var(--la-card-shadow-hover);
  transform: translateY(-1px);
}
.la-card:focus-within {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* Full-card variant: stretched hit target (valid HTML; overlays stay interactive) */
.la-card__hit {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}
.la-card__hit:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}
.la-card__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.la-card__stack {
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.la-card__image {
  aspect-ratio: 4 / 3;
  background: var(--la-card-img-bg);
  position: relative;
  overflow: hidden;
}
.la-card__image > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.la-card:hover .la-card__image > img {
  transform: scale(1.04);
}

.la-card__overlay {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
  z-index: 3;
  pointer-events: auto;
}
.la-card__icon-btn {
  background: var(--la-overlay-bg);
  backdrop-filter: blur(4px);
  width: 36px;
  height: 36px;
  border-radius: 999px;
  box-shadow: var(--la-overlay-shadow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: #334155;
}
.la-card__icon-btn:hover {
  color: #059669;
}

/* LilamHomes-style heart/share FABs on listing & merch images */
.product-img-wrap > .ah-prop-fab-row,
.product-img-wrap > .mall-card-fab-row,
.la-card__image > .ah-prop-fab-row,
.la-merch-card-media > .ah-prop-fab-row {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 6;
  display: flex;
  gap: 0.4rem;
  pointer-events: auto;
}
[dir='rtl'] .product-img-wrap > .ah-prop-fab-row,
[dir='rtl'] .product-img-wrap > .mall-card-fab-row,
[dir='rtl'] .la-card__image > .ah-prop-fab-row,
[dir='rtl'] .la-merch-card-media > .ah-prop-fab-row {
  right: auto;
  left: 0.65rem;
}
.ah-prop-fab {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(226, 232, 240, 0.95);
  color: #64748b;
  transition: transform 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  padding: 0;
}
.ah-prop-fab:hover {
  color: #006aff;
  transform: scale(1.06);
  box-shadow: 0 6px 18px rgba(0, 106, 255, 0.2);
}
.ah-prop-fab--liked {
  color: #dc2626;
  border-color: rgba(252, 165, 165, 0.95);
}

.ah-prop-card-contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}
.ah-prop-mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.35rem 0.6rem;
  border-radius: 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
  text-decoration: none;
  cursor: pointer;
}
.ah-prop-mini-btn--wa {
  background: #22c55e;
  color: #fff;
  border-color: #22c55e;
}
.ah-prop-mini-btn--call {
  background: #006aff;
  color: #fff;
  border-color: #006aff;
}
.ah-prop-mini-btn--compare.ah-prop-mini-btn--on {
  background: #fef3c7;
  border-color: #b45309;
  color: #92400e;
}

.la-card__badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  z-index: 3;
  pointer-events: none;
}

.la-card__body {
  padding: var(--la-card-pad);
  display: flex;
  flex-direction: column;
  gap: var(--la-card-gap);
}

.la-card__price {
  color: var(--la-color-price);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.2;
}
.la-card__title {
  color: var(--la-color-title);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.la-card__meta {
  color: var(--la-color-meta);
  font-size: 12px;
}
.la-card__loc {
  color: var(--la-color-loc);
  font-size: 12px;
}

.la-card__whatsapp {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: #25d366;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  pointer-events: auto;
  border: 0;
  padding: 0;
  cursor: pointer;
  box-shadow: var(--la-overlay-shadow);
}
.la-card__whatsapp:hover {
  filter: brightness(1.05);
}

.la-card--mini .la-card__body {
  padding: 12px;
  gap: 4px;
}
.la-card--mini .la-card__price {
  font-size: 16px;
}

[dir='rtl'] .la-card__overlay {
  right: auto;
  left: 12px;
}
[dir='rtl'] .la-card__badges {
  left: auto;
  right: 12px;
}
[dir='rtl'] .la-card__whatsapp {
  right: auto;
  left: 12px;
}

.la-card__contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  pointer-events: auto;
  position: relative;
  z-index: 5;
}
.la-card__contact-row--footer {
  margin-top: 0;
  padding: 0 var(--la-card-pad) var(--la-card-pad);
  flex-shrink: 0;
}
.la-card__actions-footer {
  pointer-events: auto;
  position: relative;
  z-index: 5;
  padding: 0 var(--la-card-pad) var(--la-card-pad);
  flex-shrink: 0;
}
.la-card__actions-footer .ah-prop-card-contact-row {
  margin-top: 0.35rem;
}
.la-card:has(.la-card__actions-footer) .la-card__hit {
  bottom: 11.5rem;
}
.la-card:has(.la-card__contact-row--footer) .la-card__hit {
  bottom: 4.75rem;
}
.la-card__contact-btn {
  flex: 1 1 auto;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--la-color-border, #e2e8f0);
  background: #fff;
  color: #334155;
  pointer-events: auto;
  cursor: pointer;
}
.la-card__contact-btn--wa {
  background: #25d366;
  border-color: #25d366;
  color: #fff;
}
.la-card__contact-btn:hover {
  filter: brightness(0.97);
}
.la-card__contact-btn--wa:hover {
  filter: brightness(1.05);
}
.la-card__contact-btn--compare.la-card__contact-btn--on,
.la-card__contact-btn--compare:hover {
  border-color: var(--store-primary, #0a5c9e);
  color: var(--store-primary, #0a5c9e);
}
.la-card__contact-btn--compare.la-card__contact-btn--on {
  background: var(--store-secondary, #e6f0fa);
}

#la-compare-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.08);
}
.la-compare-bar-inner {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.la-compare-bar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  cursor: pointer;
}
.la-compare-bar-btn--primary {
  background: var(--store-primary, #0a5c9e);
  border-color: var(--store-primary, #0a5c9e);
  color: #fff;
  text-decoration: none;
}

/* LilamAuto home vehicle strips — Souq-inspired carousel cards */
.la-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.la-section-head h2 {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: 0.01em;
}
.la-section-count {
  font-size: 0.6875rem;
  font-weight: 500;
  color: #94a3b8;
  margin-left: 0.35rem;
  font-variant-numeric: tabular-nums;
}
.la-see-all {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--store-primary, #0a5c9e);
  background: none;
  border: 0;
  padding: 0.5rem 0.25rem;
  min-height: 44px;
  cursor: pointer;
  white-space: nowrap;
}
.la-see-all:hover {
  text-decoration: underline;
}

.la-strip-carousel-wrap {
  position: relative;
  margin: 0 -0.25rem;
}
.la-strip-carousel {
  position: relative;
  overflow: hidden;
}
.la-strip-carousel.la-strip-fade-edges::before,
.la-strip-carousel.la-strip-fade-edges::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1.75rem;
  z-index: 4;
  pointer-events: none;
}
.la-strip-carousel.la-strip-fade-edges::before {
  left: 0;
  background: linear-gradient(to right, #ffffff 25%, transparent);
}
.la-strip-carousel.la-strip-fade-edges::after {
  right: 0;
  background: linear-gradient(to left, #ffffff 25%, transparent);
}
.la-strip-track {
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 0.125rem 0.25rem 0.625rem;
}
.la-strip-track::-webkit-scrollbar {
  display: none;
}

.la-strip-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.96);
  color: #334155;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.la-strip-nav:hover {
  background: #fff;
  color: var(--store-primary, #0a5c9e);
}
.la-strip-nav:disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}
.la-strip-nav--prev {
  left: -0.35rem;
}
.la-strip-nav--next {
  right: -0.35rem;
}
@media (max-width: 639px) {
  .la-strip-nav {
    display: none;
  }
}

html[data-store-theme="lilamauto"] .la-strip-carousel.la-strip-fade-edges::before {
  background: linear-gradient(to right, var(--la-souq-bg, #f7f5f1) 25%, transparent);
}
html[data-store-theme="lilamauto"] .la-strip-carousel.la-strip-fade-edges::after {
  background: linear-gradient(to left, var(--la-souq-bg, #f7f5f1) 25%, transparent);
}

.la-strip-card {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  width: 198px;
  min-height: 100%;
  scroll-snap-align: start;
  background: var(--la-card-bg);
  border: var(--la-card-border);
  border-radius: 14px;
  box-shadow: var(--la-card-shadow);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}
@media (max-width: 380px) {
  .la-strip-card {
    width: 172px;
  }
}
.la-strip-card:hover {
  box-shadow: var(--la-card-shadow-hover);
  transform: translateY(-1px);
}
.la-strip-card--premium {
  border-color: #fed7aa;
  background: linear-gradient(180deg, #fff7ed 0%, #fff 40%);
}
.la-strip-card--grid {
  width: 100%;
}

.la-merch-card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--la-card-img-bg);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}
.la-merch-card-img,
.la-merch-card-img-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.la-merch-card-img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #cbd5e1;
}

.la-strip-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 3;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.2rem 0.45rem;
  border-radius: 0.3125rem;
  line-height: 1.2;
}
.la-strip-badge--new {
  background: #1f7a4d;
  color: #fff;
}
.la-strip-badge--popular {
  background: var(--store-primary, #0a5c9e);
  color: #fff;
}
.la-strip-badge--premium {
  background: #ea580c;
  color: #fff;
}

.la-strip-card-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 0.625rem 0.6875rem 0.75rem;
  min-height: 4.75rem;
}
.la-strip-card-title {
  margin: 0 0 0.2rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
  min-height: 2.2em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.la-strip-card-price {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--store-primary, #0a5c9e);
  line-height: 1.2;
}
.la-strip-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: auto;
  padding-top: 0.4rem;
  font-size: 0.6875rem;
  color: #64748b;
}
.la-strip-card-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #e2e8f0;
  flex-shrink: 0;
}
.la-strip-card-loc {
  margin-top: 0.3rem;
  font-size: 0.6875rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
