/* ai-product-card-generated.css — LumiHome Dark Moody LED Theme */

/* ============================================================
   Product List Layout — Grid
   ============================================================ */
.ai-pl-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (min-width: 750px) {
  .ai-pl-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .ai-pl-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
  }
}

/* ============================================================
   Product List Layout — Carousel
   ============================================================ */
.ai-pl-carousel-wrap {
  position: relative;
}

.ai-pl-carousel {
  display: flex;
  overflow: hidden;
}

.ai-pl-carousel ai-product-card {
  flex-shrink: 0;
}

.ai-pl-prev,
.ai-pl-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: var(--accent);
  color: var(--accent-foreground);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  transition: background 0.2s, opacity 0.2s;
  opacity: 0.85;
}

.ai-pl-prev {
  left: 8px;
}

.ai-pl-next {
  right: 8px;
}

.ai-pl-prev:hover,
.ai-pl-next:hover {
  background: var(--striking);
  color: var(--striking-foreground);
  opacity: 1;
}

/* ============================================================
   Card Root
   ============================================================ */
.ai-card {
  background: var(--secondary);
  color: var(--secondary-foreground);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  border: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
  font-family: Inter, sans-serif;
}

.ai-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 16px 2px color-mix(in srgb, var(--accent) 40%, transparent),
              0 4px 24px rgba(0, 0, 0, 0.7);
  transform: translateY(-2px);
}

/* ============================================================
   Image Area
   ============================================================ */
.ai-card__media {
  aspect-ratio: 3 / 4;
}

/* Hover image swap */
.ai-card__img--hover {
  opacity: 0;
  transition: opacity 0.4s ease;
}

.ai-card[data-has-hover-img]:hover .ai-card__img--hover {
  opacity: 1;
}

.ai-card[data-has-hover-img]:hover .ai-card__img {
  opacity: 0;
}

.ai-card__img {
  transition: opacity 0.4s ease;
}

/* ============================================================
   Badges
   ============================================================ */
.ai-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--accent);
  color: var(--accent-foreground);
  font-family: Montserrat, sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 4px;
  z-index: 2;
  line-height: 1.2;
}

.ai-card__badge--new {
  display: none;
}

/* ============================================================
   Wishlist
   ============================================================ */
.ai-card__wishlist {
  display: none;
}

/* ============================================================
   Overlay — Hover Slide-Up Add to Cart
   ============================================================ */
.ai-card__overlay {
  transform: translateY(100%);
  transition: transform 0.3s ease;
  background: linear-gradient(to top, rgba(13, 13, 13, 0.92) 0%, transparent 100%);
  padding: 12px;
}

.ai-card:hover .ai-card__overlay {
  transform: translateY(0);
}

.ai-card__overlay-btn {
  display: block;
  width: 100%;
  background: var(--cta);
  color: var(--cta-foreground);
  border: none;
  border-radius: 6px;
  padding: 10px 16px;
  font-family: Montserrat, sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.ai-card__overlay-btn:hover {
  background: var(--striking);
  color: var(--striking-foreground);
  box-shadow: 0 0 12px 2px color-mix(in srgb, var(--striking) 50%, transparent);
}

.ai-card__overlay-btn:active {
  opacity: 0.85;
}

/* Add-to-cart inside info area — hidden; use overlay only */
.ai-card__add-wrap {
  display: none;
}

/* ============================================================
   Info Area
   ============================================================ */
.ai-card__info {
  padding: 12px;
  gap: 6px;
  background: var(--secondary);
  color: var(--secondary-foreground);
}

.ai-card__info-link {
  text-decoration: none;
  color: inherit;
}

.ai-card__info-link:hover {
  color: inherit;
}

/* ============================================================
   Vendor
   ============================================================ */
.ai-card__vendor {
  display: none;
}

/* ============================================================
   Title
   ============================================================ */
.ai-card__title {
  font-family: Montserrat, sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.03em;
  line-height: 1.3;
  color: inherit;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 750px) {
  .ai-card__title {
    font-size: 15px;
  }
}

/* ============================================================
   Price
   ============================================================ */
.ai-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.ai-price__current {
  font-family: Montserrat, sans-serif;
  font-weight: 800;
  font-size: 15px;
  color: var(--accent-foreground);
  /* current price sits on secondary surface — use accent-foreground for amber highlight */
}

/* Override: we want amber for the price on a dark card */
.ai-card__info .ai-price__current {
  color: inherit;
}

.ai-price__compare {
  font-size: 13px;
  color: inherit;
  opacity: 0.5;
  text-decoration: line-through;
  font-weight: 400;
}

/* ============================================================
   Swatches — Hidden (LED store typically no color variants shown)
   ============================================================ */
.ai-card__swatches {
  display: none;
}

/* ============================================================
   Rating — Hidden
   ============================================================ */
.ai-card__rating {
  display: none;
}

/* ============================================================
   Back side — Hidden (no flip effect)
   ============================================================ */
.ai-card__back {
  display: none;
}

/* ============================================================
   Add-to-Cart State Feedback (overlay button)
   ============================================================ */
ai-quick-add-cart[data-state="loading"] .ai-card__overlay-btn {
  opacity: 0.65;
  pointer-events: none;
}

ai-quick-add-cart[data-state="success"] .ai-card__overlay-btn {
  background: var(--brand);
  color: var(--brand-foreground);
  pointer-events: none;
}

ai-quick-add-cart[data-state="error"] .ai-card__overlay-btn {
  background: var(--striking);
  color: var(--striking-foreground);
  animation: ai-card-shake 0.4s;
}

@keyframes ai-card-shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-5px); }
  40%       { transform: translateX(5px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}

/* ============================================================
   Quick Add-to-Cart Modal (.qac-*)
   ============================================================ */
.qac-wrapper {
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.qac-wrapper[data-open] {
  visibility: visible;
  opacity: 1;
}

.qac-wrapper:not([data-open]) {
  opacity: 0;
  visibility: hidden;
}

.qac-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 9000;
}

.qac-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(700px, 94vw);
  max-height: 90vh;
  background: var(--secondary);
  color: var(--secondary-foreground);
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  box-shadow: 0 0 40px 4px color-mix(in srgb, var(--accent) 20%, transparent),
              0 8px 48px rgba(0, 0, 0, 0.85);
  z-index: 9001;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Header */
.qac-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
  flex-shrink: 0;
}

.qac-product-title {
  font-family: Montserrat, sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: inherit;
  margin: 0;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qac-close {
  background: transparent;
  border: 1px solid currentColor;
  color: inherit;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  flex-shrink: 0;
  margin-left: 12px;
  transition: background 0.2s, color 0.2s;
  line-height: 1;
}

.qac-close:hover {
  background: var(--accent);
  color: var(--accent-foreground);
  border-color: var(--accent);
}

.qac-close:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Body */
.qac-body {
  display: flex;
  flex-direction: row;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.qac-product-media {
  width: 40%;
  flex-shrink: 0;
  background: var(--background);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.qac-product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.qac-product-info {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  color: inherit;
  min-width: 0;
}

/* Footer */
.qac-footer {
  padding: 16px 20px;
  border-top: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
  flex-shrink: 0;
}

.qac-submit {
  display: block;
  width: 100%;
  background: var(--cta);
  color: var(--cta-foreground);
  border: none;
  border-radius: 6px;
  padding: 14px 20px;
  font-family: Montserrat, sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, opacity 0.2s, box-shadow 0.2s;
}

.qac-submit:hover:not(:disabled):not([data-loading]):not([data-sold-out]) {
  background: var(--striking);
  color: var(--striking-foreground);
  box-shadow: 0 0 16px 2px color-mix(in srgb, var(--striking) 45%, transparent);
}

.qac-submit:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.qac-submit:disabled,
.qac-submit[data-sold-out] {
  background: var(--background);
  color: var(--foreground);
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.qac-submit[data-loading] {
  opacity: 0.65;
  pointer-events: none;
  background: var(--cta);
  color: var(--cta-foreground);
}

.qac-submit[data-success] {
  background: var(--brand);
  color: var(--brand-foreground);
  pointer-events: none;
}

.qac-submit[data-error] {
  background: var(--striking);
  color: var(--striking-foreground);
  animation: ai-card-shake 0.4s;
}

/* Mobile modal adjustments */
@media (max-width: 600px) {
  .qac-body {
    flex-direction: column;
  }

  .qac-product-media {
    width: 100%;
    max-height: 240px;
  }
}