/* ai-product-card-generated.css — Ultra-premium dark luxury, Health & Wellness */

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

.ai-card:hover {
  border-color: rgba(201, 168, 76, 0.45);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(201, 168, 76, 0.2);
  transform: translateY(-2px);
}

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

/* ============================================================
   MEDIA / IMAGE AREA
   ============================================================ */
.ai-card__media {
  aspect-ratio: 3 / 4;
  background: var(--background);
}

/* 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: 12px;
  left: 12px;
  background: var(--striking);
  color: var(--striking-foreground);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 2px;
  z-index: 2;
  font-family: 'Inter', 'Neue Haas Grotesk', 'Aktiv Grotesk', sans-serif;
}

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

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

/* ============================================================
   HOVER OVERLAY — Slide-up Add to Cart
   ============================================================ */
.ai-card__overlay {
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  background: linear-gradient(to top, rgba(10, 10, 10, 0.9) 0%, rgba(10, 10, 10, 0.0) 100%);
  padding: 16px;
}

.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: 3px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
  font-family: 'Inter', 'Neue Haas Grotesk', 'Aktiv Grotesk', sans-serif;
}

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

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

/* ============================================================
   INFO AREA
   ============================================================ */
.ai-card__info {
  padding: 14px 16px 16px;
  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;
}

/* ============================================================
   VENDOR (hidden by default)
   ============================================================ */
.ai-card__vendor {
  display: none;
}

/* ============================================================
   TITLE
   ============================================================ */
.ai-card__title {
  font-family: 'Inter', 'Neue Haas Grotesk', 'Aktiv Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--secondary-foreground);
  line-height: 1.35;
  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: 'Inter', 'Neue Haas Grotesk', 'Aktiv Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--striking-foreground);
  background: var(--striking);
  padding: 1px 6px;
  border-radius: 2px;
}

.ai-price__compare {
  font-size: 12px;
  font-weight: 400;
  text-decoration: line-through;
  opacity: 0.5;
  color: var(--secondary-foreground);
}

/* ============================================================
   SWATCHES (hidden)
   ============================================================ */
.ai-card__swatches {
  display: none;
}

/* ============================================================
   RATING (hidden)
   ============================================================ */
.ai-card__rating {
  display: none;
}

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

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

/* ============================================================
   ADD TO CART BUTTON STATES
   ============================================================ */
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);
}

ai-quick-add-cart[data-state="error"] .ai-card__overlay-btn {
  animation: shake 0.4s ease;
}

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

/* ============================================================
   PRODUCT LIST — GRID
   ============================================================ */
.ai-pl-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

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

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

/* ============================================================
   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%);
  z-index: 10;
  background: var(--secondary);
  color: var(--secondary-foreground);
  border: 1px solid rgba(201, 168, 76, 0.35);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  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-next:hover,
.ai-pl-prev:focus,
.ai-pl-next:focus {
  background: var(--striking);
  color: var(--striking-foreground);
  border-color: var(--striking);
  outline: none;
}

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

/* ============================================================
   QUICK ADD TO CART MODAL (.qac-*)
   ============================================================ */
.qac-wrapper[data-variant-mode="modal"] {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.qac-wrapper[data-variant-mode="modal"][data-open] {
  opacity: 1;
  pointer-events: auto;
}

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

.qac-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 680px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 9999;
  background: var(--secondary);
  color: var(--secondary-foreground);
  border-radius: 6px;
  border: 1px solid rgba(201, 168, 76, 0.25);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
}

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

.qac-product-title {
  font-family: 'Inter', 'Neue Haas Grotesk', 'Aktiv Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--secondary-foreground);
  margin: 0;
}

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

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

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

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

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

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

.qac-product-info {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.qac-submit {
  width: 100%;
  padding: 14px 24px;
  background: var(--cta);
  color: var(--cta-foreground);
  border: none;
  border-radius: 3px;
  font-family: 'Inter', 'Neue Haas Grotesk', 'Aktiv Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

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

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

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

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

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

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

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

/* Modal animation — entrance/exit */
.qac-wrapper:not([data-open]) .qac-modal {
  transform: translate(-50%, -48%);
  opacity: 0;
}

.qac-wrapper[data-open] .qac-modal {
  transform: translate(-50%, -50%);
  opacity: 1;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

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

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

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

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