/* ============================================================
   ai-product-card-generated.css
   Design: Digital Education & Wealth Coaching — Luxury Dark-Gold
   ============================================================ */

/* ── Product Card Base ──────────────────────────────────────── */
.ai-card {
  background: var(--background);
  color: var(--foreground);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(201, 168, 76, 0.25);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
  transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
  position: relative;
}

.ai-card:hover {
  border-color: rgba(201, 168, 76, 0.7);
  box-shadow: 0 6px 28px rgba(201, 168, 76, 0.18), 0 2px 8px rgba(0, 0, 0, 0.5);
  transform: translateY(-2px);
}

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

/* Hover image swap */
.ai-card__img--hover {
  opacity: 0;
  transition: opacity 0.45s 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;
}

/* ── Discount Badge ─────────────────────────────────────────── */
.ai-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--striking);
  color: var(--striking-foreground);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 2px;
  z-index: 2;
  line-height: 1.2;
}

/* ── New Badge — hidden by default ─────────────────────────── */
.ai-card__badge--new {
  display: none;
}

/* ── Wishlist — hidden by default ──────────────────────────── */
.ai-card__wishlist {
  display: none;
}

/* ── Hover Overlay (slide-up add to cart) ───────────────────── */
.ai-card__overlay {
  background: linear-gradient(to top, rgba(10, 10, 15, 0.9) 60%, transparent);
  transform: translateY(100%);
  transition: transform 0.35s ease;
  padding: 14px;
}

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

.ai-card__overlay-btn {
  display: block;
  width: 100%;
  padding: 11px 18px;
  background: var(--cta);
  color: var(--cta-foreground);
  font-family: 'DM Sans', Inter, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, opacity 0.25s ease;
}

.ai-card__overlay-btn:hover,
.ai-card__overlay-btn:focus {
  background: var(--brand);
  color: var(--brand-foreground);
  outline: none;
}

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

/* ── Add-to-cart in info area — hidden (using overlay instead) ─ */
.ai-card__add-wrap {
  display: none;
}

/* ── Card Info Area ─────────────────────────────────────────── */
.ai-card__info {
  padding: 14px 14px 16px;
  gap: 7px;
  background: var(--background);
  color: var(--foreground);
}

.ai-card__info-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* ── Vendor — hidden by default ─────────────────────────────── */
.ai-card__vendor {
  display: none;
}

/* ── Title ──────────────────────────────────────────────────── */
.ai-card__title {
  font-family: 'Playfair Display', 'Cormorant Garamond', Georgia, serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: inherit;
  letter-spacing: 0.02em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.ai-price__current {
  font-family: 'DM Sans', Inter, sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--brand-foreground);
}

/* Override: price sits on --background surface, use brand accent tone */
.ai-card__info .ai-price__current {
  color: var(--brand-foreground);
}

.ai-price__compare {
  font-family: 'DM Sans', Inter, sans-serif;
  font-size: 13px;
  font-weight: 400;
  text-decoration: line-through;
  opacity: 0.55;
  color: inherit;
}

/* ── Swatches — hidden by default ───────────────────────────── */
.ai-card__swatches {
  display: none;
}

/* ── Rating — hidden by default ─────────────────────────────── */
.ai-card__rating {
  display: none;
}

/* ── Back side — hidden by default (not using flip) ─────────── */
.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.6;
  pointer-events: none;
}

ai-quick-add-cart[data-state="success"] .ai-card__overlay-btn {
  background: var(--accent);
  color: var(--accent-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 ease;
}

@keyframes ai-card-shake {
  0%, 100% { transform: translateX(0); }
  25%       { transform: translateX(-5px); }
  75%       { transform: translateX(5px); }
}

/* ── Gold shimmer sweep on CTA ──────────────────────────────── */
@keyframes ai-gold-sweep {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* ── QAC Modal ──────────────────────────────────────────────── */

/* Overlay */
.qac-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

/* Wrapper */
.qac-wrapper[data-variant-mode="modal"] {
  z-index: 9999;
}

/* Modal panel */
.qac-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%);
  width: 680px;
  max-width: 94vw;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--background);
  color: var(--foreground);
  border: 1px solid rgba(201, 168, 76, 0.35);
  border-radius: 6px;
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(201, 168, 76, 0.12);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.qac-wrapper[data-open] .qac-modal {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.qac-wrapper:not([data-open]) .qac-modal {
  opacity: 0;
  transform: translate(-50%, -48%);
  pointer-events: none;
}

/* Header */
.qac-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 14px;
  border-bottom: 1px solid rgba(201, 168, 76, 0.2);
}

.qac-product-title {
  font-family: 'Playfair Display', 'Cormorant Garamond', Georgia, serif;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: inherit;
  margin: 0;
}

.qac-close {
  background: transparent;
  border: 1px solid rgba(201, 168, 76, 0.35);
  color: inherit;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
}

.qac-close:hover,
.qac-close:focus {
  background: var(--brand);
  color: var(--brand-foreground);
  border-color: var(--brand);
  outline: none;
}

.qac-close:active {
  opacity: 0.8;
}

/* Body */
.qac-body {
  display: flex;
  flex-direction: row;
  flex: 1;
  overflow: hidden;
}

/* Image */
.qac-product-media {
  flex: 0 0 40%;
  overflow: hidden;
  background: var(--accent);
}

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

/* Options area */
.qac-product-info {
  flex: 1;
  padding: 22px 22px 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--background);
  color: var(--foreground);
}

/* Footer */
.qac-footer {
  padding: 16px 22px 20px;
  border-top: 1px solid rgba(201, 168, 76, 0.2);
  background: var(--background);
}

/* Submit button */
.qac-submit {
  display: block;
  width: 100%;
  padding: 13px 22px;
  background: var(--cta);
  color: var(--cta-foreground);
  font-family: 'DM Sans', Inter, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, opacity 0.25s ease;
}

.qac-submit:hover,
.qac-submit:focus {
  background: var(--brand);
  color: var(--brand-foreground);
  outline: none;
}

.qac-submit:active {
  opacity: 0.85;
}

.qac-submit:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  pointer-events: none;
}

.qac-submit[data-sold-out] {
  background: var(--secondary);
  color: var(--secondary-foreground);
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.7;
}

.qac-submit[data-loading] {
  opacity: 0.65;
  pointer-events: none;
  cursor: wait;
}

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

.qac-submit[data-error] {
  background: var(--striking);
  color: var(--striking-foreground);
}

/* ── Product List — Grid Mode ───────────────────────────────── */
.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 — Carousel Mode ───────────────────────────── */
.ai-pl-carousel {
  display: flex;
  overflow: hidden;
}

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

.ai-pl-carousel-wrap {
  position: relative;
}

.ai-pl-prev,
.ai-pl-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  background: var(--background);
  color: var(--foreground);
  border: 1px solid rgba(201, 168, 76, 0.4);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

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

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

.ai-pl-prev:hover,
.ai-pl-prev:focus,
.ai-pl-next:hover,
.ai-pl-next:focus {
  background: var(--brand);
  color: var(--brand-foreground);
  border-color: var(--brand);
  outline: none;
}

.ai-pl-prev:active,
.ai-pl-next:active {
  opacity: 0.8;
}

/* ── Responsive: QAC Modal on mobile ────────────────────────── */
@media (max-width: 749px) {
  .qac-modal {
    width: 96vw;
    max-height: 88vh;
  }

  .qac-body {
    flex-direction: column;
  }

  .qac-product-media {
    flex: 0 0 200px;
    width: 100%;
  }

  .qac-product-info {
    padding: 16px;
  }
}