/* ============================================================
   ai-product-card-generated.css
   YETOWA — Women's Athleisure & Yoga Wear
   Design: Soft-power minimalism, urban feminine grace
   ============================================================ */

/* ── Base card ─────────────────────────────────────────────── */
.ai-card {
  overflow: hidden;
  border-radius: 12px;
  background-color: var(--background); color: var(--foreground);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  position: relative;
}

.ai-card:hover {
  box-shadow: 0 8px 32px rgba(35, 35, 35, 0.10);
  transform: translateY(-2px);
}

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

/* ── Front ──────────────────────────────────────────────────── */
.ai-card__front {
  display: block;
}

/* ── Image area ─────────────────────────────────────────────── */
.ai-card__media {
  aspect-ratio: 3 / 4;
  background-color: var(--brand); color: var(--brand-foreground);
  cursor: pointer;
}

/* ── 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;
}

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

/* ── Discount badge ─────────────────────────────────────────── */
.ai-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background-color: var(--accent);
  color: var(--accent-foreground);
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  z-index: 2;
  line-height: 1.4;
}

/* ── New badge (light up) ───────────────────────────────────── */
.ai-card__badge--new {
  display: inline-flex;
  position: absolute;
  top: 12px;
  right: 12px;
  background-color: var(--secondary);
  color: var(--secondary-foreground);
  font-family: Arial, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  z-index: 2;
  line-height: 1.4;
}

/* ── Wishlist button (light up for lifestyle brand) ─────────── */
.ai-card__wishlist {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.85);
  border: none;
  cursor: pointer;
  z-index: 3;
  transition: background-color 0.2s ease, transform 0.2s ease;
  color: var(--foreground);
}

.ai-card__wishlist svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
}

.ai-card__wishlist:hover {
  background-color: var(--accent);
  color: var(--accent-foreground);
  transform: scale(1.1);
}

/* ── Overlay hover action (slide-up add-to-cart) ────────────── */
.ai-card__overlay {
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
  background: linear-gradient(to top, rgba(35, 35, 35, 0.72) 0%, transparent 100%);
  padding: 16px 12px 12px;
}

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

/* ── Overlay add-to-cart button ─────────────────────────────── */
.ai-card__overlay-btn {
  width: 100%;
  padding: 11px 16px;
  background-color: var(--cta);
  color: var(--cta-foreground);
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, opacity 0.2s ease;
}

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

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

/* ── Hide add-to-cart inside info area (use overlay only) ───── */
.ai-card__add-wrap {
  display: none;
}

/* ── Information area ───────────────────────────────────────── */
.ai-card__info {
  padding: 14px 14px 16px;
  gap: 6px;
  background-color: var(--background); color: var(--foreground);
}

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

/* ── Vendor (hidden) ────────────────────────────────────────── */
.ai-card__vendor {
  display: none;
}

/* ── Product title ──────────────────────────────────────────── */
.ai-card__title {
  font-family: Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.35;
  color: var(--foreground);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.ai-card__info-link:hover .ai-card__title {
  color: var(--brand-foreground);
}

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

.ai-price__current {
  font-family: Arial, sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-foreground);
  letter-spacing: 0.02em;
}

.ai-price__compare {
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: var(--brand-foreground);
  text-decoration: line-through;
  letter-spacing: 0.02em;
}

/* ── Swatches (light up for apparel) ────────────────────────── */
.ai-card__swatches {
  display: flex;
  padding-top: 2px;
}

.ai-card__swatch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 2px;
  border-radius: 50%;
  border: 1.5px solid transparent;
  transition: border-color 0.2s ease;
}

.ai-card__swatch:hover {
  border-color: var(--foreground);
}

.ai-card__swatch-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(35, 35, 35, 0.15);
  display: block;
}

.ai-card__swatch-more {
  font-family: Arial, sans-serif;
  font-size: 11px;
  color: var(--brand-foreground);
  padding: 2px 4px;
  letter-spacing: 0.02em;
}

/* ── Rating (light up) ──────────────────────────────────────── */
.ai-card__rating {
  display: flex;
}

.ai-card__stars {
  font-size: 12px;
  color: var(--accent-foreground);
  letter-spacing: 0.05em;
}

.ai-card__reviews-count {
  font-family: Arial, sans-serif;
  font-size: 11px;
  color: var(--brand-foreground);
  letter-spacing: 0.02em;
}

/* ── Back side (hidden — no flip effect for this design) ─────── */
.ai-card__back {
  display: none;
}

/* ── Add-to-cart state styles (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-color: #4caf76;
 
}

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

@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); }
}

/* ============================================================
   Product List Layout
   ============================================================ */

/* ── 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);
    gap: 20px;
  }
}

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

/* ── Carousel mode ──────────────────────────────────────────── */
.ai-pl-carousel-wrap {
  position: relative;
}

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

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

/* ── Carousel arrows ────────────────────────────────────────── */
.ai-pl-prev,
.ai-pl-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--background);
  color: var(--foreground);
  border: 1.5px solid var(--brand);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
  box-shadow: 0 2px 8px rgba(35, 35, 35, 0.10);
}

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

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

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

.ai-pl-prev svg,
.ai-pl-next svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* ============================================================
   Quick Add-to-Cart Modal (.qac-*)
   ============================================================ */

.qac-wrapper {
  pointer-events: none;
}

.qac-wrapper[data-open] {
  pointer-events: auto;
}

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

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

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

/* ── Modal container ────────────────────────────────────────── */
.qac-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%) scale(0.97);
  width: min(720px, 92vw);
  max-height: 90vh;
  background-color: var(--background); color: var(--foreground);
  border-radius: 16px;
  overflow: hidden;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 64px rgba(35, 35, 35, 0.18);
}

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

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

/* ── Header ─────────────────────────────────────────────────── */
.qac-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px 14px;
  border-bottom: 1px solid var(--brand);
  background-color: var(--background); color: var(--foreground);
  flex-shrink: 0;
}

.qac-product-title {
  font-family: Arial, sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--foreground);
  line-height: 1.3;
  flex: 1;
  padding-right: 12px;
}

.qac-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--brand);
  color: var(--brand-foreground);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color 0.2s ease, color 0.2s ease;
}

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

.qac-close svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

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

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

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

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

/* ── Footer ─────────────────────────────────────────────────── */
.qac-footer {
  padding: 16px 24px 20px;
  border-top: 1px solid var(--brand);
  background-color: var(--background); color: var(--foreground);
  flex-shrink: 0;
}

/* ── Submit button ──────────────────────────────────────────── */
.qac-submit {
  width: 100%;
  padding: 14px 24px;
  background-color: var(--cta);
  color: var(--cta-foreground);
  font-family: Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, opacity 0.2s ease;
}

.qac-submit:hover:not(:disabled):not([data-loading]):not([data-sold-out]) {
  background-color: var(--striking);
  color: var(--striking-foreground);
}

.qac-submit:active:not(:disabled) {
  opacity: 0.85;
}

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

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

.qac-submit[data-success] {
  background-color: #4caf76;
 
  pointer-events: none;
}

.qac-submit[data-error] {
  background-color: #c0392b;
 
}

/* ── Responsive: stack modal on small screens ───────────────── */
@media (max-width: 600px) {
  .qac-modal {
    width: 96vw;
    max-height: 92vh;
    border-radius: 12px;
  }

  .qac-body {
    flex-direction: column;
    overflow-y: auto;
  }

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

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

  .qac-header {
    padding: 14px 16px 12px;
  }

  .qac-footer {
    padding: 12px 16px 16px;
  }
}

/* ── Mobile card info adjustments ───────────────────────────── */
@media (max-width: 749px) {
  .ai-card__title {
    font-size: 13px;
  }

  .ai-price__current {
    font-size: 14px;
  }

  .ai-card__info {
    padding: 10px 10px 12px;
    gap: 5px;
  }
}