/* ai-product-card-generated.css — Neon Command Deck / Hacker Terminal */

/* ============================================================
   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: 2;
  background: var(--background);
  color: var(--foreground);
  border: 1px solid rgba(191, 255, 0, 0.4);
  border-radius: 4px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
}

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

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

.ai-pl-prev:hover,
.ai-pl-next:hover {
  background: var(--brand);
  color: var(--brand-foreground);
  border-color: var(--brand);
  box-shadow: 0 0 12px rgba(191, 255, 0, 0.3);
}

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

.ai-card {
  background: var(--background);
  color: var(--foreground);
  border: 1px solid rgba(191, 255, 0, 0.18);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
  font-family: 'Inter', sans-serif;
}

.ai-card:hover {
  border-color: rgba(191, 255, 0, 0.6);
  box-shadow: 0 0 16px rgba(191, 255, 0, 0.15);
  transform: translateY(-2px);
}

.ai-card__inner {
  /* no special transform; using overlay pattern */
}

.ai-card__front {
  /* standard front face */
}

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

.ai-card__media {
  aspect-ratio: 2 / 3;
  background: #0D1117;
}

/* 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(--brand);
  color: var(--brand-foreground);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 2px;
  z-index: 2;
  line-height: 1.4;
}

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

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

.ai-card__wishlist {
  display: none;
}

/* ============================================================
   OVERLAY — SLIDE-UP ADD TO CART
   ============================================================ */

.ai-card__overlay {
  background: rgba(5, 8, 10, 0.88);
  transform: translateY(100%);
  transition: transform 0.28s ease;
  padding: 12px;
}

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

.ai-card__overlay-btn {
  width: 100%;
  background: var(--cta);
  color: var(--cta-foreground);
  border: none;
  border-radius: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.ai-card__overlay-btn:hover {
  background: var(--brand);
  color: var(--brand-foreground);
  box-shadow: 0 0 12px rgba(191, 255, 0, 0.25);
}

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

/* ============================================================
   CARD INFO 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__vendor {
  display: none;
}

.ai-card__title {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--foreground);
  line-height: 1.3;
  margin: 0;
}

/* ============================================================
   PRICE
   ============================================================ */

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

.ai-price__current {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-foreground);
  /* accent surface used for price callout — rendered on background surface,
     so we use accent-foreground to keep semantic integrity while showing cyan highlight */
}

/* Price on background surface — use foreground pair but style as accent highlight via a custom approach */
/* Actually: price sits on --background surface, so must use --foreground or a creative accent approach.
   Per color contract: text on --background must use --foreground.
   We'll style the price wrapper with accent surface to establish the pair. */
.ai-price {
  background: transparent;
  color: var(--foreground);
}

.ai-price__current {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--foreground);
}

.ai-price__compare {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 400;
  color: var(--foreground);
  opacity: 0.45;
  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 — Hidden (not using flip effect)
   ============================================================ */

.ai-card__back {
  display: none;
}

/* ============================================================
   ADD-TO-CART BUTTON STATES (overlay placement)
   ============================================================ */

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);
  box-shadow: 0 0 14px rgba(191, 255, 0, 0.3);
}

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

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

/* ============================================================
   QAC MODAL — QUICK ADD TO CART
   ============================================================ */

.qac-wrapper[data-variant-mode="modal"] {
  /* Root container appended to body */
}

.qac-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 10, 0.75);
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

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

.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: 1px solid rgba(191, 255, 0, 0.3);
  border-radius: 4px;
  width: 680px;
  max-width: 95vw;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 40px rgba(191, 255, 0, 0.1);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.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: 14px 20px;
  border-bottom: 1px solid rgba(191, 255, 0, 0.12);
  background: var(--background);
  color: var(--foreground);
}

.qac-product-title {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--foreground);
  margin: 0;
}

.qac-close {
  background: transparent;
  border: 1px solid rgba(191, 255, 0, 0.25);
  border-radius: 2px;
  color: var(--foreground);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  line-height: 1;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  flex-shrink: 0;
}

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

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

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

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

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

.qac-product-info {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background: var(--background);
  color: var(--foreground);
}

/* Footer */
.qac-footer {
  padding: 14px 20px;
  border-top: 1px solid rgba(191, 255, 0, 0.12);
  background: var(--background);
  display: flex;
  gap: 10px;
  align-items: center;
}

.qac-submit {
  flex: 1;
  background: var(--cta);
  color: var(--cta-foreground);
  border: none;
  border-radius: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 12px 20px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.qac-submit:hover {
  background: var(--brand);
  color: var(--brand-foreground);
  box-shadow: 0 0 14px rgba(191, 255, 0, 0.25);
}

.qac-submit:focus {
  outline: none;
  background: var(--brand);
  color: var(--brand-foreground);
  box-shadow: 0 0 14px rgba(191, 255, 0, 0.25);
}

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

.qac-submit:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: var(--background);
  color: var(--foreground);
  border: 1px solid rgba(191, 255, 0, 0.18);
}

.qac-submit[data-sold-out] {
  opacity: 0.4;
  cursor: not-allowed;
  background: var(--background);
  color: var(--foreground);
  border: 1px solid rgba(191, 255, 0, 0.15);
}

.qac-submit[data-loading] {
  opacity: 0.6;
  pointer-events: none;
  background: var(--cta);
  color: var(--cta-foreground);
}

.qac-submit[data-success] {
  background: var(--brand);
  color: var(--brand-foreground);
  box-shadow: 0 0 16px rgba(191, 255, 0, 0.3);
}

.qac-submit[data-error] {
  background: var(--striking);
  color: var(--striking-foreground);
  animation: ai-card-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 220px;
    width: 100%;
  }

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

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