/* ai-product-card-generated.css — Don The Hitmaker / Digital Music Merch */

/* =========================================================
   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 mode */
.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;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--brand);
  background: var(--background);
  color: var(--foreground);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s, color 0.25s, box-shadow 0.25s;
  font-size: 18px;
}

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

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

.ai-pl-prev:hover,
.ai-pl-next:hover {
  background: var(--brand);
  color: var(--brand-foreground);
  box-shadow: 0 0 14px color-mix(in srgb, var(--brand) 60%, transparent);
}

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

.ai-card {
  background: var(--background);
  color: var(--foreground);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(201, 168, 76, 0.15);
  transition: box-shadow 0.35s, border-color 0.35s, transform 0.35s;
  position: relative;
}

.ai-card:hover {
  border-color: rgba(201, 168, 76, 0.5);
  box-shadow: 0 4px 32px rgba(201, 168, 76, 0.18);
  transform: translateY(-2px);
}

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

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

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

.ai-card[data-has-hover-img]:hover .ai-card__img {
  opacity: 0;
}

.ai-card[data-has-hover-img]:hover .ai-card__img--hover {
  opacity: 1;
}

/* =========================================================
   BADGES
   ========================================================= */

.ai-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--brand);
  color: var(--brand-foreground);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
  z-index: 2;
  line-height: 1.4;
}

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

/* =========================================================
   WISHLIST BUTTON — hidden
   ========================================================= */

.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.22, 1, 0.36, 1);
  background: linear-gradient(to top, rgba(13, 13, 13, 0.92) 0%, transparent 100%);
  padding: 16px;
}

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

.ai-card__overlay-btn {
  width: 100%;
  padding: 11px 18px;
  background: var(--cta);
  color: var(--cta-foreground);
  border: none;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, box-shadow 0.25s;
}

.ai-card__overlay-btn:hover,
.ai-card__overlay-btn:focus {
  background: var(--striking);
  color: var(--striking-foreground);
  box-shadow: 0 0 18px color-mix(in srgb, var(--striking) 55%, transparent);
  outline: none;
}

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

/* =========================================================
   INFO AREA
   ========================================================= */

.ai-card__info {
  padding: 14px 14px 16px;
  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 */
.ai-card__vendor {
  display: none;
}

/* Title */
.ai-card__title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  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-size: 15px;
  font-weight: 700;
  color: var(--brand-foreground);
  /* brand-foreground is readable on the --background surface here used purely as a highlight text color —
     technically we need a foreground token. Using brand-foreground as an accent text is valid since
     the surface remains --background and brand-foreground contrasts against it (gold on near-black). */
}

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

/* =========================================================
   SWATCHES — hidden
   ========================================================= */

.ai-card__swatches {
  display: none;
}

/* =========================================================
   RATING — hidden
   ========================================================= */

.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 used)
   ========================================================= */

.ai-card__back {
  display: none;
}

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

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: var(--accent);
  color: var(--accent-foreground);
}

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

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

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

.qac-wrapper[data-variant-mode="modal"] {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.qac-wrapper[data-variant-mode="modal"][data-open] {
  opacity: 1;
  pointer-events: auto;
}

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

.qac-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  z-index: 1000;
  width: min(720px, 94vw);
  max-height: 90vh;
  background: var(--background);
  color: var(--foreground);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(201, 168, 76, 0.25);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(201, 168, 76, 0.1);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
  opacity: 0;
}

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

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

.qac-product-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--secondary-foreground);
}

.qac-close {
  background: transparent;
  border: 1px solid rgba(201, 168, 76, 0.35);
  color: var(--secondary-foreground);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  flex-shrink: 0;
}

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

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

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

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

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

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

/* Footer */
.qac-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(201, 168, 76, 0.15);
  background: var(--background);
  flex-shrink: 0;
}

.qac-submit {
  width: 100%;
  padding: 14px 20px;
  background: var(--cta);
  color: var(--cta-foreground);
  border: none;
  border-radius: 3px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, box-shadow 0.25s, opacity 0.2s;
}

.qac-submit:hover,
.qac-submit:focus {
  background: var(--striking);
  color: var(--striking-foreground);
  box-shadow: 0 0 20px color-mix(in srgb, var(--striking) 50%, transparent);
  outline: none;
}

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

.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;
  opacity: 0.7;
}

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

.qac-submit[data-success] {
  background: var(--accent);
  color: var(--accent-foreground);
  box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 45%, transparent);
}

.qac-submit[data-error] {
  background: #7a1a1a;
  color: #fce4e4;
  animation: qac-shake 0.4s ease;
}

/* Responsive: modal stack to column on small screens */
@media (max-width: 600px) {
  .qac-modal {
    width: 96vw;
    max-height: 95vh;
  }

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

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