/* ==========================================================================
   The AI Academy — Single Product Page Styles
   
   Uses the site's oklch color palette as CSS custom properties.
   
   INSTALL OPTIONS:
   1. Paste into WP Admin > Appearance > Customize > Additional CSS
   2. Or enqueue via functions.php (see aa-product-functions.php)
   ========================================================================== */

/* Import Poppins if not already loaded by your theme — remove if redundant */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');


/* --------------------------------------------------------------------------
   CUSTOM PROPERTIES — referencing the site palette
   We re-declare them here scoped to .aa-product-page so these styles are
   self-contained. If your theme already sets these on :root you can remove
   this block entirely.
   -------------------------------------------------------------------------- */
.aa-product-page {
  --background:         #040404;
  --background:         oklch(12% .01 270);
  --foreground:         oklch(98% 0 0);
  --card:               oklch(18% .02 270);
  --card-foreground:    oklch(98% 0 0);
  --primary:            oklch(65% .22 210);
  --primary-foreground: oklch(98% 0 0);
  --secondary:          oklch(60% .25 315);
  --secondary-foreground: oklch(98% 0 0);
  --muted:              oklch(22% .02 270);
  --muted-foreground:   oklch(65% .02 270);
  --accent:             oklch(65% .26 305);
  --accent-foreground:  oklch(98% 0 0);
  --border:             oklch(28% .03 270);
  --input:              oklch(22% .02 270);
  --ring:               oklch(65% .22 305);
  --gradient-cyan:      oklch(70% .2 195);
  --gradient-blue:      oklch(62% .23 230);
  --gradient-purple:    oklch(58% .26 280);
  --gradient-pink:      oklch(65% .26 305);
  --radius:             0.5rem;

  /* Computed helpers */
  --gradient-main:      linear-gradient(135deg, var(--gradient-cyan), var(--gradient-blue), var(--gradient-purple), var(--gradient-pink));
  --gradient-short:     linear-gradient(135deg, var(--gradient-cyan), var(--gradient-purple));
  --glow-primary:       oklch(65% .22 210 / .25);
  --glow-accent:        oklch(65% .26 305 / .20);
  --surface-hover:      oklch(24% .03 270);
}


/* --------------------------------------------------------------------------
   PAGE-LEVEL RESET
   -------------------------------------------------------------------------- */
body.single-product {
  background: var(--background) !important;
}

body.single-product .site-content,
body.single-product .content-area,
body.single-product #content,
body.single-product #primary,
body.single-product .entry-content,
body.single-product main {
  background: transparent !important;
  padding: 0 !important;
  max-width: 100% !important;
}

/* Kill any theme container width constraints */
body.single-product .site-main,
body.single-product .woocommerce {
  max-width: 100% !important;
  padding: 0 !important;
}


/* --------------------------------------------------------------------------
   AA-PRODUCT-PAGE — Master wrapper
   -------------------------------------------------------------------------- */
.aa-product-page {
  font-family: 'Poppins', -apple-system, 'Segoe UI', sans-serif;
  color: var(--foreground);
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 2rem 4rem;
}


/* --------------------------------------------------------------------------
   HERO — Image + Summary grid
   -------------------------------------------------------------------------- */
.aa-product-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  padding: 2rem 0 3rem;
}


/* ── Product Image ──────────────────────────────────────────── */
.aa-product-image {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.25rem;
  overflow: hidden;
}

.aa-image-glow {
  position: absolute;
  top: -60%;
  left: -40%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 40%, var(--glow-primary), transparent 55%);
  pointer-events: none;
  z-index: 0;
  opacity: .5;
}

.aa-product-image img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  border-radius: .75rem;
  display: block;
}

.aa-lightbox-trigger {
  display: block;
  cursor: zoom-in;
}

/* Gallery thumbnails */
.aa-gallery-thumbs {
  display: flex;
  gap: .5rem;
  margin-top: .75rem;
  position: relative;
  z-index: 1;
}

.aa-gallery-thumb {
  flex: 0 0 60px;
  border-radius: .5rem;
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color .25s ease;
}

.aa-gallery-thumb:hover {
  border-color: var(--primary);
}

.aa-gallery-thumb img {
  width: 100%;
  height: 60px;
  object-fit: cover;
  display: block;
}


/* ── Product Summary ────────────────────────────────────────── */
.aa-product-summary {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}


/* Breadcrumb */
.aa-breadcrumb {
  font-size: .8rem;
  color: var(--muted-foreground);
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-wrap: wrap;
}

.aa-breadcrumb a {
  color: var(--primary);
  text-decoration: none;
  transition: color .2s ease;
}

.aa-breadcrumb a:hover {
  color: var(--accent);
}

.aa-bc-sep {
  opacity: .4;
}

.aa-bc-current {
  color: var(--muted-foreground);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


/* Title */
.aa-product-title {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  margin: 0;
  background: var(--gradient-short);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}


/* Subtitle / short description */
.aa-product-subtitle {
  color: var(--muted-foreground);
  font-size: 1rem;
  line-height: 1.65;
}

.aa-product-subtitle p {
  margin: 0;
}


/* Price */
.aa-product-price {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--foreground);
  letter-spacing: -.02em;
}

.aa-product-price del {
  color: var(--muted-foreground);
  font-size: 1.25rem;
  font-weight: 400;
  margin-right: .5rem;
}

.aa-product-price ins {
  text-decoration: none;
}

.aa-product-price .woocommerce-Price-amount {
  color: inherit;
}


/* Trust badges */
.aa-trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.aa-badge {
  display: flex;
  align-items: center;
  gap: .4rem;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: 2rem;
  padding: .4rem .9rem;
  font-size: .78rem;
  font-weight: 500;
  color: var(--muted-foreground);
  letter-spacing: .02em;
}

.aa-badge svg {
  color: var(--primary);
  flex-shrink: 0;
}


/* ── Add to Cart ────────────────────────────────────────────── */
.aa-add-to-cart-wrap {
  margin-top: .25rem;
}

/* Target the WC form inside our wrapper */
.aa-add-to-cart-wrap form.cart {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0;
  padding: 0;
}

/* Quantity */
.aa-add-to-cart-wrap .quantity input[type="number"] {
  background: var(--input) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius);
  color: var(--foreground) !important;
  font-family: inherit;
  font-size: 1rem;
  width: 68px;
  height: 52px;
  text-align: center;
  -webkit-appearance: none;
  -moz-appearance: textfield;
  transition: border-color .25s ease, box-shadow .25s ease;
}

.aa-add-to-cart-wrap .quantity input[type="number"]:focus {
  border-color: var(--primary) !important;
  outline: none;
  box-shadow: 0 0 0 3px var(--glow-primary);
}

/* Button */
.aa-add-to-cart-wrap .single_add_to_cart_button,
.aa-add-to-cart-wrap button[type="submit"] {
  flex: 1;
  background: var(--gradient-main) !important;
  background-size: 200% 200%;
  color: var(--foreground) !important;
  font-family: inherit !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  letter-spacing: .04em;
  text-transform: uppercase;
  border: none !important;
  border-radius: var(--radius);
  padding: 0 2rem !important;
  height: 52px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease, background-position .6s ease;
  box-shadow: 0 4px 24px var(--glow-primary);
  animation: aa-gradient-drift 4s ease infinite;
}

@keyframes aa-gradient-drift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

.aa-add-to-cart-wrap .single_add_to_cart_button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--glow-primary), 0 0 60px var(--glow-accent);
}

.aa-add-to-cart-wrap .single_add_to_cart_button:active {
  transform: translateY(0);
}

/* Shimmer sweep */
.aa-add-to-cart-wrap .single_add_to_cart_button::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,.12) 44%, rgba(255,255,255,.2) 50%, rgba(255,255,255,.12) 56%, transparent 62%);
  transform: translateX(-120%);
  transition: transform .65s ease;
  pointer-events: none;
}

.aa-add-to-cart-wrap .single_add_to_cart_button:hover::after {
  transform: translateX(120%);
}


/* Meta */
.aa-product-meta {
  font-size: .8rem;
  color: var(--muted-foreground);
  padding-top: .75rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
}

.aa-meta-label {
  color: var(--muted-foreground);
}

.aa-product-meta a {
  color: var(--primary);
  text-decoration: none;
  transition: color .2s ease;
}

.aa-product-meta a:hover {
  color: var(--accent);
}


/* --------------------------------------------------------------------------
   SECTION HEADERS — reusable pattern
   -------------------------------------------------------------------------- */
.aa-section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.aa-section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--foreground);
  margin: 0 0 .75rem;
}

.aa-section-line {
  width: 80px;
  height: 3px;
  margin: 0 auto;
  background: var(--gradient-short);
  border-radius: 3px;
}


/* --------------------------------------------------------------------------
   DESCRIPTION SECTION
   -------------------------------------------------------------------------- */
.aa-product-description-section {
  padding: 3rem 0;
}

.aa-product-description {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 2.5rem 3rem;
  color: var(--muted-foreground);
  line-height: 1.8;
  font-size: .95rem;
  box-shadow: 0 20px 60px oklch(12% .01 270 / .5);
}

.aa-product-description h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--foreground);
  margin: 0 0 1rem;
}

.aa-product-description h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--foreground);
  margin: 2rem 0 .75rem;
  padding-left: .85rem;
  border-left: 3px solid var(--primary);
  line-height: 1.4;
}

.aa-product-description p {
  color: var(--muted-foreground);
  margin-bottom: 1rem;
}

.aa-product-description strong {
  color: var(--foreground);
  font-weight: 600;
}

.aa-product-description a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color .2s ease;
}

.aa-product-description a:hover {
  color: var(--accent);
}

/* Styled list items — checkmarks */
.aa-product-description ul {
  list-style: none;
  padding-left: 0;
  margin: 1rem 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.aa-product-description ul li {
  position: relative;
  padding-left: 1.75rem;
  color: var(--muted-foreground);
  line-height: 1;
  margin-bottom: 0px;
}

.aa-product-description ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .35em;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  /* Checkmark via CSS mask */
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  -webkit-mask-size: 12px;
  mask-size: 12px;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

.aa-product-description ul li strong {
  color: var(--foreground);
}


/* --------------------------------------------------------------------------
   TABS (for additional info / reviews)
   -------------------------------------------------------------------------- */
.aa-product-tabs-section {
  padding: 2rem 0 3rem;
}

.aa-tabs-nav {
  display: flex;
  gap: .5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.aa-tab-btn {
  font-family: inherit;
  font-size: .9rem;
  font-weight: 500;
  color: var(--muted-foreground);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: .75rem 1.5rem;
  cursor: pointer;
  transition: color .25s ease, border-color .25s ease;
}

.aa-tab-btn:hover {
  color: var(--foreground);
}

.aa-tab-btn.aa-tab-active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.aa-tab-panel {
  display: none;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 2rem 2.5rem;
  color: var(--muted-foreground);
  line-height: 1.75;
}

.aa-tab-panel.aa-tab-panel-active {
  display: block;
}

.aa-tab-panel h2 {
  font-size: 1.35rem;
  color: var(--foreground);
  font-weight: 700;
  margin-bottom: 1rem;
}


/* --------------------------------------------------------------------------
   CTA BANNER
   -------------------------------------------------------------------------- */
.aa-cta-banner {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 3.5rem 3rem;
  text-align: center;
  margin: 3rem 0;
  overflow: hidden;
}

.aa-cta-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, var(--glow-primary), transparent 50%),
    radial-gradient(ellipse at 80% 50%, var(--glow-accent), transparent 50%);
  opacity: .4;
  pointer-events: none;
}

.aa-cta-title {
  position: relative;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--foreground);
  margin: 0 0 .75rem;
}

.aa-cta-text {
  position: relative;
  color: var(--muted-foreground);
  font-size: 1rem;
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.65;
}

.aa-cta-actions {
  position: relative;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.aa-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  padding: .8rem 2rem;
  transition: transform .25s ease, box-shadow .25s ease;
}

.aa-cta-btn-primary {
  background: var(--gradient-main);
  background-size: 200% 200%;
  color: var(--foreground);
  box-shadow: 0 4px 20px var(--glow-primary);
  animation: aa-gradient-drift 4s ease infinite;
}

.aa-cta-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--glow-primary);
}

.aa-cta-btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--border);
}

.aa-cta-btn-secondary:hover {
  background: var(--muted);
  transform: translateY(-2px);
}


/* --------------------------------------------------------------------------
   RELATED PRODUCTS
   -------------------------------------------------------------------------- */
.aa-related-section {
  padding: 2rem 0 3rem;
}

.aa-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.aa-related-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

.aa-related-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px oklch(12% .01 270 / .6);
  border-color: var(--primary);
}

.aa-related-card-img {
  overflow: hidden;
  aspect-ratio: 1;
}

.aa-related-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}

.aa-related-card:hover .aa-related-card-img img {
  transform: scale(1.05);
}

.aa-related-card-body {
  padding: 1.25rem;
}

.aa-related-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--foreground);
  margin: 0 0 .4rem;
  line-height: 1.35;
}

.aa-related-card-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
}


/* --------------------------------------------------------------------------
   WC NOTICES
   -------------------------------------------------------------------------- */
.aa-product-page .woocommerce-message,
.aa-product-page .woocommerce-info {
  background: var(--card) !important;
  border-left: 4px solid var(--primary) !important;
  color: var(--muted-foreground) !important;
  border-radius: var(--radius);
  padding: 1rem 1.5rem !important;
  font-family: inherit;
}

.aa-product-page .woocommerce-message a,
.aa-product-page .woocommerce-info a {
  color: var(--primary) !important;
}

.aa-product-page .woocommerce-error {
  background: var(--card) !important;
  border-left: 4px solid var(--destructive, #e24b4a) !important;
  color: var(--muted-foreground) !important;
  border-radius: var(--radius);
}

nav.woocommerce-breadcrumb {
    max-width: 1200px;
    margin: 0px auto !important;
    color: #fff !important;
}
/* --------------------------------------------------------------------------
   RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .aa-product-hero {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .aa-product-page {
    padding: 1rem 1.25rem 3rem;
  }

  .aa-product-description {
    padding: 1.75rem 1.5rem;
  }

  .aa-product-title {
    font-size: 1.6rem;
  }

  .aa-product-price {
    font-size: 1.75rem;
  }

  .aa-add-to-cart-wrap form.cart {
    flex-wrap: wrap;
  }

  .aa-add-to-cart-wrap .single_add_to_cart_button {
    width: 100%;
    text-align: center;
  }

  .aa-cta-banner {
    padding: 2.5rem 1.5rem;
  }
}

@media (max-width: 600px) {
  .aa-product-image {
    padding: .75rem;
  }

  .aa-trust-badges {
    gap: .5rem;
  }

  .aa-badge {
    font-size: .72rem;
    padding: .3rem .7rem;
  }

  .aa-tabs-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .aa-tab-btn {
    white-space: nowrap;
    font-size: .82rem;
    padding: .6rem 1rem;
  }

  .aa-product-description h3 {
    font-size: 1.05rem;
  }

  .aa-cta-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .aa-cta-btn {
    text-align: center;
  }
}

.aa-product-description p {
    font-size: inherit;
    line-height: inherit;
    margin: 0px 0px 10px;
}
