/* ai-product-card-generated.css — Financial Wellness & Credit Repair theme */

/* ============================================================
   PRODUCT CARD — BASE
   ============================================================ */
.ai-card {
  background: var(--secondary);
  color: var(--secondary-foreground);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.35), 0 0 0 1px rgba(201,168,76,0.12);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  position: relative;
}

.ai-card:hover {
  box-shadow: 0 6px 28px rgba(0,0,0,0.5), 0 0 0 1.5px rgba(201,168,76,0.45);
  transform: translateY(-2px);
}

.ai-card__inner {
  position: relative;
  width: 100%;
}

/* ============================================================
   FRONT SIDE
   ============================================================ */
.ai-card__front {
  display: flex;
  flex-direction: column;
}

/* ============================================================
   MEDIA / 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(--striking);
  color: var(--striking-foreground);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 3px;
  text-transform: uppercase;
  z-index: 2;
}

.ai-card__badge--new {
  display: none;
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--accent);
  color: var(--accent-foreground);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 3px;
  text-transform: uppercase;
  z-index: 2;
}

/* ============================================================
   WISHLIST BUTTON — hidden by default
   ============================================================ */
.ai-card__wishlist {
  display: none;
}

/* ============================================================
   HOVER OVERLAY — slide-up add to cart
   ============================================================ */
.ai-card__overlay {
  transform: translateY(100%);
  transition: transform 0.35s ease;
  background: linear-gradient(to top, rgba(10,22,40,0.92) 60%, transparent);
  padding: 12px;
}

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

.ai-card__overlay-btn {
  width: 100%;
  padding: 10px 16px;
  background: var(--cta);
  color: var(--cta-foreground);
  border: none;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.ai-card__overlay-btn:hover,
.ai-card__overlay-btn:focus {
  background: var(--brand);
  color: var(--brand-foreground);
  box-shadow: 0 0 0 2px var(--cta);
  outline: none;
}

.ai-card__overlay-btn:active {
  background: var(--striking);
  color: var(--striking-foreground);
}

/* ============================================================
   INFO AREA
   ============================================================ */
.ai-card__info {
  padding: 14px 12px 12px;
  gap: 8px;
  background: var(--secondary);
  color: var(--secondary-foreground);
}

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

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

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

/* Title */
.ai-card__title {
  font-family: 'DM Sans', 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: inherit;
  margin: 0;
  letter-spacing: 0.01em;
}

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

.ai-price__current {
  font-size: 15px;
  font-weight: 700;
  color: var(--striking-foreground);
  /* Use striking-foreground as a gold accent text on secondary surface */
}

.ai-price__compare {
  font-size: 12px;
  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;
}

/* ============================================================
   ADD-TO-CART in info area — hidden (using overlay instead)
   ============================================================ */
.ai-card__add-wrap {
  display: none;
}

/* ============================================================
   BACK SIDE — hidden (no flip effect used)
   ============================================================ */
.ai-card__back {
  display: none;
}

/* ============================================================
   QUICK-ADD-CART STATE FEEDBACK (overlay button)
   ============================================================ */
ai-quick-add-cart[data-state="loading"] .ai-card__overlay-btn {
  opacity: 0.65;
  pointer-events: none;
  cursor: not-allowed;
}

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

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

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

/* ============================================================
   PRODUCT LIST — 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 — 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%);
  background: var(--secondary);
  color: var(--secondary-foreground);
  border: 1.5px solid rgba(201,168,76,0.35);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

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

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

.ai-pl-prev:hover,
.ai-pl-next:hover,
.ai-pl-prev:focus,
.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 {
  background: var(--striking);
  color: var(--striking-foreground);
  border-color: var(--striking);
}

/* ============================================================
   QAC MODAL — QUICK ADD-TO-CART
   ============================================================ */
.qac-wrapper[data-variant-mode="modal"] {
  font-family: 'DM Sans', 'Inter', sans-serif;
}

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

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

/* Modal container */
.qac-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%);
  width: min(700px, 92vw);
  max-height: 90vh;
  background: var(--secondary);
  color: var(--secondary-foreground);
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.55), 0 0 0 1px rgba(201,168,76,0.18);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

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

/* Header */
.qac-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(201,168,76,0.2);
  background: var(--secondary);
  color: var(--secondary-foreground);
  flex-shrink: 0;
}

.qac-product-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: inherit;
  margin: 0;
}

.qac-close {
  background: transparent;
  color: inherit;
  border: 1px solid currentColor;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  transition: background 0.2s ease, 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 {
  background: var(--striking);
  color: var(--striking-foreground);
  border-color: var(--striking);
}

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

/* Product image */
.qac-product-media {
  width: 40%;
  flex-shrink: 0;
  background: var(--background);
  overflow: hidden;
}

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

/* Product info / options */
.qac-product-info {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  background: var(--secondary);
  color: var(--secondary-foreground);
}

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

/* Submit button */
.qac-submit {
  width: 100%;
  padding: 13px 20px;
  background: var(--cta);
  color: var(--cta-foreground);
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, opacity 0.25s ease, box-shadow 0.25s ease;
}

.qac-submit:hover,
.qac-submit:focus {
  background: var(--brand);
  color: var(--brand-foreground);
  box-shadow: 0 0 0 2px var(--cta);
  outline: none;
}

.qac-submit:active {
  background: var(--striking);
  color: var(--striking-foreground);
}

.qac-submit:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
  background: var(--cta);
  color: var(--cta-foreground);
}

/* Submit state feedback */
.qac-submit[data-loading] {
  opacity: 0.65;
  pointer-events: none;
  cursor: not-allowed;
}

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

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

/* Sold-out state */
.qac-submit[data-sold-out] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* Responsive — mobile QAC body stacks vertically */
@media (max-width: 600px) {
  .qac-body {
    flex-direction: column;
  }

  .qac-product-media {
    width: 100%;
    height: 220px;
    flex-shrink: 0;
  }

  .qac-modal {
    width: 96vw;
    max-height: 92vh;
  }
}