/* ai-product-card-generated.css — Arctic Minimalism */

/* ============================================================
   Product Card — Base
   ============================================================ */
.ai-card {
  background: var(--background);
  color: var(--foreground);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--accent);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
  position: relative;
}

.ai-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transform: scale(1.02);
}

.ai-card__inner {
  /* flat card — no flip effect */
}

.ai-card__front {
  /* front only, no perspective transform needed */
}

/* ============================================================
   Image Area
   ============================================================ */
.ai-card__media {
  aspect-ratio: 3 / 4;
}

/* Hover image swap */
.ai-card__img--hover {
  opacity: 0;
  transition: opacity 0.35s 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: 10px;
  left: 10px;
  background: var(--striking);
  color: var(--striking-foreground);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 2px;
  line-height: 1.4;
  z-index: 2;
}

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

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

/* ============================================================
   Hover Overlay — Slide-Up Add to Cart
   ============================================================ */
.ai-card__overlay {
  background: transparent;
  padding: 8px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

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

.ai-card__overlay-btn {
  display: block;
  width: 100%;
  padding: 10px 16px;
  background: var(--cta);
  color: var(--cta-foreground);
  border: none;
  border-radius: 3px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, opacity 0.2s 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 {
  opacity: 0.85;
}

/* ============================================================
   Information Area
   ============================================================ */
.ai-card__info {
  padding: 12px;
  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 — hidden by default */
.ai-card__vendor {
  display: none;
}

/* Title */
.ai-card__title {
  font-family: 'Inter', 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--foreground);
  line-height: 1.4;
  letter-spacing: 0.01em;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.ai-price__current {
  font-family: 'Inter', 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--foreground);
}

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

/* ============================================================
   Swatches — hidden by default
   ============================================================ */
.ai-card__swatches {
  display: none;
}

/* ============================================================
   Rating — hidden by default
   ============================================================ */
.ai-card__rating {
  display: none;
}

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

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

/* ============================================================
   Add-to-Cart Button 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 {
  animation: ai-card-shake 0.4s ease;
}

@keyframes ai-card-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%);
  z-index: 10;
  background: var(--background);
  color: var(--foreground);
  border: 1px solid var(--accent);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  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: -18px;
}

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

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

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

/* ============================================================
   Quick Add-to-Cart Modal (.qac-*)
   ============================================================ */
.qac-wrapper[data-variant-mode="modal"] {
  font-family: 'Inter', 'DM Sans', sans-serif;
}

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

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

/* Modal container */
.qac-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  z-index: 9999;
  background: var(--background);
  color: var(--foreground);
  border-radius: 6px;
  width: min(700px, 92vw);
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

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

.qac-product-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--foreground);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qac-close {
  background: transparent;
  border: none;
  color: var(--foreground);
  cursor: pointer;
  padding: 4px;
  border-radius: 2px;
  line-height: 1;
  font-size: 18px;
  transition: color 0.15s ease, background 0.15s ease;
  flex-shrink: 0;
}

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

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

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

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

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

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

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

/* Submit button */
.qac-submit {
  display: block;
  width: 100%;
  padding: 13px 20px;
  background: var(--cta);
  color: var(--cta-foreground);
  border: none;
  border-radius: 3px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.05em;
  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 {
  background: var(--accent);
  color: var(--accent-foreground);
  cursor: not-allowed;
  opacity: 0.55;
  pointer-events: none;
}

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

/* Loading state */
.qac-submit[data-loading] {
  opacity: 0.65;
  pointer-events: none;
  cursor: wait;
}

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

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

/* ============================================================
   Responsive — Narrow modal on small screens
   ============================================================ */
@media (max-width: 600px) {
  .qac-body {
    flex-direction: column;
  }

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

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

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