/* ai-product-card-generated.css — Fashion / Editorial Monochrome */

/* ============================================================
   PRODUCT LIST LAYOUT
   ============================================================ */

.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;
  }
}

/* Carousel */
.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: 10;
  background: var(--background);
  color: var(--foreground);
  border: 1px solid currentColor;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

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

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

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

/* ============================================================
   CARD BASE
   ============================================================ */

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

.ai-card:hover {
  box-shadow: 0 8px 32px rgba(13, 13, 13, 0.12);
}

.ai-card__inner {
  position: relative;
}

/* ============================================================
   IMAGE / MEDIA
   ============================================================ */

.ai-card__media {
  aspect-ratio: 3 / 4;
}

/* Hover image swap */
.ai-card__img--hover {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.ai-card__media-link: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.5s 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;
  z-index: 2;
  font-family: Inter, "Neue Haas Grotesk", sans-serif;
}

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

/* ============================================================
   WISHLIST
   ============================================================ */

.ai-card__wishlist {
  display: none;
}

/* ============================================================
   OVERLAY (hover slide-up add to cart)
   ============================================================ */

.ai-card__overlay {
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--brand);
  color: var(--brand-foreground);
}

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

.ai-card__overlay-btn {
  width: 100%;
  padding: 14px 16px;
  background: var(--cta);
  color: var(--cta-foreground);
  border: none;
  font-family: Inter, "Neue Haas Grotesk", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

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

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

/* ============================================================
   INFORMATION AREA
   ============================================================ */

.ai-card__info {
  padding: 16px 12px 12px;
  gap: 6px;
  background: var(--background);
  color: var(--foreground);
}

.ai-card__info-link {
  text-decoration: none;
  color: inherit;
}

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

/* Title */
.ai-card__title {
  font-family: "Cormorant Garamond", "Playfair Display", serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.02em;
  color: var(--foreground);
  display: block;
  margin: 0;
}

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

.ai-price__current {
  font-family: Inter, "Neue Haas Grotesk", sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent-foreground);
}

.ai-price__compare {
  font-family: Inter, "Neue Haas Grotesk", sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: var(--secondary-foreground);
  text-decoration: line-through;
}

/* 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 (not used in primary design — hidden via backface)
   ============================================================ */

.ai-card__back {
  display: none;
}

/* ============================================================
   ADD-TO-CART BUTTON STATES
   ============================================================ */

/* Overlay 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: ai-shake 0.4s ease;
}

/* Info area button states (kept for safety) */
ai-quick-add-cart[data-state="loading"] .ai-card__add-btn {
  opacity: 0.6;
  pointer-events: none;
}

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

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

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

/* ============================================================
   QUICK ADD-TO-CART MODAL (.qac-*)
   ============================================================ */

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

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

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

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

.qac-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid currentColor;
}

.qac-product-title {
  font-family: "Cormorant Garamond", "Playfair Display", serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--foreground);
  margin: 0;
}

.qac-close {
  background: transparent;
  color: inherit;
  border: 1px solid currentColor;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
}

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

.qac-close:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

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

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

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

.qac-footer {
  padding: 16px 24px 20px;
  border-top: 1px solid currentColor;
}

.qac-submit {
  width: 100%;
  padding: 16px 24px;
  background: var(--cta);
  color: var(--cta-foreground);
  border: none;
  font-family: Inter, "Neue Haas Grotesk", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, opacity 0.2s;
}

.qac-submit:hover {
  background: var(--accent);
  color: var(--accent-foreground);
}

.qac-submit:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

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

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

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

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

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

/* ============================================================
   RESPONSIVE OVERRIDES
   ============================================================ */

@media (max-width: 749px) {
  .qac-modal {
    width: 94vw;
    max-height: 88vh;
  }

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

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

  .ai-card__title {
    font-size: 13px;
  }

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