/* ============================================================
   ai-product-card-generated.css
   Fashion / Streetwear — Dark Editorial, Urban Minimalism
   ============================================================ */

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

.ai-card:hover {
  box-shadow: 0 0 0 1px var(--secondary);
}

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

/* ── Image area ─────────────────────────────────────────────── */
.ai-card__media {
  aspect-ratio: 3 / 4;
  background: var(--accent);
}

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

/* ── 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.1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 0;
  line-height: 1.4;
  z-index: 2;
}

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

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

/* ── Overlay (slide-up add-to-cart) ─────────────────────────── */
.ai-card__overlay {
  transform: translateY(100%);
  transition: transform 0.2s ease;
  background: var(--cta);
  color: var(--cta-foreground);
}

.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;
  padding: 14px 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

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

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

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

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

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

/* ── Title ──────────────────────────────────────────────────── */
.ai-card__title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: inherit;
  line-height: 1.3;
}

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

.ai-price__current {
  font-size: 13px;
  font-weight: 700;
  color: var(--foreground);
  letter-spacing: 0.04em;
}

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

/* ── Swatches ───────────────────────────────────────────────── */
.ai-card__swatches {
  display: none;
}

/* ── Rating ─────────────────────────────────────────────────── */
.ai-card__rating {
  display: none;
}

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

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

/* ── Quick-add 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(--brand);
  color: var(--brand-foreground);
}

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

@keyframes 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: 2px;
}

@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: 2px;
  }
}

/* ── Product list — Carousel ────────────────────────────────── */
.ai-pl-carousel-wrap {
  position: relative;
  overflow: hidden;
}

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

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

/* Arrow buttons */
.ai-pl-prev,
.ai-pl-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: var(--background);
  color: var(--foreground);
  border: 1px solid var(--secondary);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 0;
  transition: background 0.15s ease, color 0.15s ease;
  font-size: 16px;
  line-height: 1;
}

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

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

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

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

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

.qac-wrapper {
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

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

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

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

.qac-product-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: inherit;
}

.qac-close {
  background: transparent;
  color: inherit;
  border: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  transition: opacity 0.15s ease;
}

.qac-close:hover,
.qac-close:focus {
  opacity: 0.6;
  outline: none;
  background: transparent;
  color: inherit;
}

.qac-close:active {
  opacity: 0.4;
  background: transparent;
  color: inherit;
}

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

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

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

.qac-product-info {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--background);
  color: var(--foreground);
}

/* Footer */
.qac-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--secondary);
  background: var(--background);
}

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

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

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

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

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

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

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

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

/* ── Responsive adjustments ─────────────────────────────────── */
@media (max-width: 749px) {
  .qac-modal {
    width: 95vw;
  }

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

  .qac-product-media {
    flex: 0 0 auto;
    height: 220px;
  }
}