/* ============================================================
   ai-product-card-generated.css
   Tech & Electronics Retail — Fieldfare Navy / Electric Blue
   ============================================================ */

/* ── Product Card Base ──────────────────────────────────── */
.ai-card {
  background: var(--background);
  color: var(--foreground);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #E5E7EB;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  position: relative;
}

.ai-card:hover {
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.12);
  transform: translateY(-2px);
}

.ai-card__inner {
  position: relative;
}

/* ── Card Front ─────────────────────────────────────────── */
.ai-card__front {
  background: var(--background);
  color: var(--foreground);
}

/* ── Media / Image Area ─────────────────────────────────── */
.ai-card__media {
  aspect-ratio: 3 / 4;
  background: #F5F7FA;
}

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

/* ── Badge (Discount) ───────────────────────────────────── */
.ai-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--striking);
  color: var(--striking-foreground);
  font-size: 11px;
  font-weight: 700;
  font-family: 'Inter', 'Manrope', sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  line-height: 1.4;
  z-index: 2;
}

/* ── New Badge (hidden by default) ─────────────────────── */
.ai-card__badge--new {
  display: none;
}

/* ── Wishlist Button (hidden by default) ────────────────── */
.ai-card__wishlist {
  display: none;
}

/* ── Hover Overlay / Add-to-Cart Slide-Up ───────────────── */
.ai-card__overlay {
  background: rgba(11, 18, 32, 0.72);
  transform: translateY(100%);
  transition: transform 0.25s ease;
  padding: 12px;
}

.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;
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Inter', 'Manrope', sans-serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

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

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

/* ── Add-to-cart state feedback (overlay) ───────────────── */
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: #16A34A;
  color: #FFFFFF;
}

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

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

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

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

/* Title */
.ai-card__title {
  font-family: 'Inter', 'Manrope', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--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', 'Manrope', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: inherit;
}

.ai-price__compare {
  font-family: 'Inter', 'Manrope', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: #6B7280;
  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 — overlay used) ── */
.ai-card__add-wrap {
  display: none;
}

/* ── Card Back (hidden by default) ──────────────────────── */
.ai-card__back {
  display: none;
}

/* ── Shake Animation ─────────────────────────────────────── */
@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 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);
  }
}

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

/* ── Product List — Carousel Mode ───────────────────────── */
.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%);
  background: var(--background);
  color: var(--foreground);
  border: 1px solid #E5E7EB;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
  z-index: 10;
}

.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(--brand);
  color: var(--brand-foreground);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.18);
  outline: none;
}

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

/* ── QAC Modal ───────────────────────────────────────────── */
.qac-wrapper {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

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

.qac-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 18, 32, 0.55);
  z-index: 1000;
}

.qac-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(720px, 95vw);
  max-height: 90vh;
  background: var(--background);
  color: var(--foreground);
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1001;
}

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

.qac-product-title {
  font-family: 'Inter', 'Manrope', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--foreground);
  margin: 0;
}

.qac-close {
  background: transparent;
  border: 1px solid #E5E7EB;
  color: var(--foreground);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  transition: background 0.18s ease, color 0.18s ease;
  flex-shrink: 0;
}

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

.qac-close:active {
  background: var(--accent);
  color: var(--accent-foreground);
}

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

.qac-product-media {
  flex: 0 0 40%;
  background: #F5F7FA;
  overflow: hidden;
}

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

.qac-product-info {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

.qac-footer {
  padding: 16px 20px;
  border-top: 1px solid #E5E7EB;
  background: var(--background);
  flex-shrink: 0;
}

.qac-submit {
  display: block;
  width: 100%;
  background: var(--cta);
  color: var(--cta-foreground);
  border: none;
  border-radius: 6px;
  padding: 13px 20px;
  font-family: 'Inter', 'Manrope', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}

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

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

.qac-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: #9CA3AF;
  color: #FFFFFF;
}

.qac-submit[data-sold-out] {
  background: #6B7280;
  color: #FFFFFF;
  cursor: not-allowed;
}

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

.qac-submit[data-success] {
  background: #16A34A;
  color: #FFFFFF;
}

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

/* ── Responsive Adjustments ─────────────────────────────── */
@media (max-width: 600px) {
  .qac-body {
    flex-direction: column;
  }

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

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

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