/* ========================================
   SHOP & PRODUCT PAGES
   ======================================== */

/* ── Shop Index ──────────────────────────── */

.ac-shop {
  display: grid;
  gap: var(--space-8);
  max-width: 720px;
  margin: 0 auto;
}

.ac-shop__card {
  display: flex;
  gap: var(--space-6);
  align-items: center;
  padding: var(--space-6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--color-text);
  transition: box-shadow var(--transition-base), border-color var(--transition-base);
}

.ac-shop__card:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md);
}

.ac-shop__image {
  flex-shrink: 0;
  width: 160px;
}

.ac-shop__image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  background: var(--color-surface-alt);
}

.ac-shop__label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent-dark);
  font-weight: 700;
  margin-bottom: var(--space-1);
}

.ac-shop__title {
  font-size: var(--text-xl);
  font-weight: 700;
  margin: 0 0 var(--space-2);
  color: var(--color-primary);
}

.ac-shop__price {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.ac-shop__price-was {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  text-decoration: line-through;
  font-weight: 400;
}

.ac-shop__rating {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}

.ac-shop__rating svg { vertical-align: middle; }

.ac-shop__cta {
  font-weight: 700;
  color: var(--color-accent-dark);
  font-size: var(--text-sm);
}

/* ── Product Page — Two Column Layout ────── */

.ac-product {
  max-width: 1100px;
  margin: 0 auto;
}

/* Breadcrumbs */
.ac-product__breadcrumb {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}

.ac-product__breadcrumb a {
  color: var(--color-text-muted);
  text-decoration: none;
}

.ac-product__breadcrumb a:hover {
  color: var(--color-primary);
}

.ac-product__breadcrumb span {
  margin: 0 var(--space-1);
}

/* Layout grid */
.ac-product__layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: var(--space-10);
  align-items: start;
}

/* Left column — sticky image + CTA */
.ac-product__left {
  position: sticky;
  top: var(--space-8);
}

.ac-product__image {
  margin-bottom: var(--space-4);
}

.ac-product__image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
}

/* Right column */
.ac-product__right { min-width: 0; }

/* Buy box — price + CTA at the top of the right column. Not sticky — the
   sticky bottom bar handles persistent CTA visibility once user scrolls past. */
.ac-product__buybox {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin: var(--space-3) 0 var(--space-5);
}

.ac-product__buybox .ac-product__price {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.ac-product__price-now {
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1;
}

.ac-product__price-save {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: #dc2626;
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 700;
  border-radius: var(--radius-sm);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.ac-product__buybox-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.ac-product__buybox-trust span {
  white-space: nowrap;
}

.ac-product__label {
  display: inline-block;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff;
  background: var(--color-primary);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  font-weight: 700;
  margin-bottom: var(--space-3);
}

.ac-product__title {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 var(--space-2);
  line-height: 1.2;
}

.ac-product__rating {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.ac-product__rating svg { vertical-align: middle; }

/* Price with strikethrough */
.ac-product__price {
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}

.ac-product__price-was {
  font-size: var(--text-xl);
  color: var(--color-text-muted);
  text-decoration: line-through;
  font-weight: 400;
  margin-right: var(--space-2);
}

.ac-product__desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.6;
  margin: 0 0 var(--space-5);
}

/* Stadium compliance callout */
.ac-product__compliance {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  color: #15803d;
  margin-bottom: var(--space-5);
  line-height: 1.4;
}

.ac-product__compliance svg {
  flex-shrink: 0;
  margin-top: 1px;
}

/* Add to Cart button — primary CTA */
a.ac-product__cart-btn,
a.ac-product__cart-btn:link,
a.ac-product__cart-btn:visited,
a.ac-product__cart-btn:active,
a.ac-product__cart-btn:focus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-4) var(--space-6);
  background: var(--color-accent);
  color: #ffffff !important;
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: center;
  text-decoration: none !important;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(245, 166, 35, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

a.ac-product__cart-btn:hover,
a.ac-product__cart-btn:focus-visible {
  background: var(--color-accent-dark);
  color: #ffffff !important;
  text-decoration: none !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.1), 0 8px 18px rgba(245, 166, 35, 0.35);
}

/* Force white text + icon on every child of the cart buttons.
   Theme link rules cascade into the inner <span>; this ensures readable contrast. */
a.ac-product__cart-btn,
a.ac-product__cart-btn span,
a.ac-product__cart-btn svg,
a.ac-product__sticky-btn,
a.ac-product__sticky-btn span,
a.ac-product__sticky-btn svg {
  color: #ffffff !important;
}
a.ac-product__cart-btn svg,
a.ac-product__sticky-btn svg {
  stroke: #ffffff !important;
}

a.ac-product__cart-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.ac-product__cart-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Dividers */
.ac-product__divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-8) 0;
}

/* Section headings */
.ac-product__right h2 {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 var(--space-4);
}

/* What Fits Inside */
.ac-product__fits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-2);
}

.ac-product__fits-item {
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface-alt);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  text-align: center;
  border: 1px solid var(--color-border);
}

/* Features */
.ac-product__feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.ac-product__feature-list li {
  padding-left: var(--space-6);
  position: relative;
  line-height: 1.5;
  font-size: var(--text-sm);
}

.ac-product__feature-list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--color-success);
  font-weight: 700;
}

/* Reviews */
.ac-product__reviews {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.ac-product__review {
  padding: var(--space-4);
  background: var(--color-surface-alt);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.ac-product__review-stars {
  margin-bottom: var(--space-2);
}

.ac-product__review-text {
  font-size: var(--text-sm);
  line-height: 1.5;
  margin: 0 0 var(--space-2);
  color: var(--color-text);
  font-style: italic;
}

.ac-product__review-author {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 600;
}

/* Product Details Table */
.ac-product__table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.ac-product__table tr {
  border-bottom: 1px solid var(--color-border);
}

.ac-product__table tr:last-child { border-bottom: none; }

.ac-product__table th {
  text-align: left;
  padding: var(--space-3) var(--space-4) var(--space-3) 0;
  color: var(--color-text-muted);
  font-weight: 600;
  width: 130px;
  vertical-align: top;
}

.ac-product__table td {
  padding: var(--space-3) 0;
  color: var(--color-text);
}

/* Disclosure */
.ac-product__disclosure {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-4);
  margin-top: var(--space-8);
}

/* Thumbnail gallery — under main image in the left column */
.ac-product__thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.ac-product__thumb {
  display: block;
  padding: 0;
  background: #fff;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  overflow: hidden;
  transition: border-color var(--transition-fast);
  width: 64px;
  height: 64px;
}

.ac-product__thumb:hover {
  border-color: var(--color-primary);
}

.ac-product__thumb.is-active {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary);
}

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

/* Sticky CTA bar — shown on desktop after scrolling past the inline buybox,
   and always visible on mobile. JS toggles .is-visible based on viewport.
   All visual styling lives on the base class so the background, border, shadow,
   and z-index apply whenever the bar is rendered (mobile or desktop is-visible). */
.ac-product__sticky-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid var(--color-border);
  padding: var(--space-3) var(--space-5);
  align-items: center;
  gap: var(--space-4);
  z-index: 100;
  box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.08);
}

.ac-product__sticky-bar.is-visible {
  display: flex;
  animation: ac-sticky-slide-up 0.2s ease-out;
}

@keyframes ac-sticky-slide-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.ac-product__sticky-price {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
  white-space: nowrap;
}

.ac-product__sticky-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  background: var(--color-accent);
  color: #fff !important;
  font-size: var(--text-base);
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: center;
  text-decoration: none !important;
  border-radius: var(--radius-md);
  border: none;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(245, 166, 35, 0.3);
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.ac-product__sticky-btn:hover,
.ac-product__sticky-btn:visited,
.ac-product__sticky-btn:focus-visible {
  background: var(--color-accent-dark);
  color: #fff !important;
  text-decoration: none !important;
  box-shadow: 0 4px 12px rgba(245, 166, 35, 0.4);
}

.ac-product__sticky-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

@media (min-width: 769px) {
  /* Align inner content with the page's 1200px constrained content area:
     price on the left, CTA on the right, matching the rest of the layout. */
  .ac-product__sticky-bar.is-visible {
    justify-content: space-between;
    padding-top: var(--space-3);
    padding-bottom: var(--space-3);
    padding-left: max(var(--space-8), calc((100vw - 1200px) / 2));
    padding-right: max(var(--space-8), calc((100vw - 1200px) / 2));
  }
  .ac-product__sticky-bar.is-visible .ac-product__sticky-price {
    font-size: var(--text-2xl);
  }
  .ac-product__sticky-bar.is-visible .ac-product__sticky-btn {
    flex: 0 0 auto;
    min-width: 220px;
  }
}

/* ── Mobile ──────────────────────────────── */

@media (max-width: 768px) {
  .ac-product__layout {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .ac-product__left {
    position: static;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .ac-product__left .ac-product__image {
    max-width: 300px;
  }

  /* Hide the inline buy box on mobile — sticky bottom bar handles it */
  .ac-product__buybox {
    display: none;
  }

  .ac-product__title {
    font-size: var(--text-2xl);
  }

  .ac-product__price {
    font-size: var(--text-3xl);
  }

  .ac-product__fits-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ac-product__right h2 {
    font-size: var(--text-lg);
  }

  /* On mobile, the sticky bar is always shown (no scroll trigger needed). */
  .ac-product__sticky-bar {
    display: flex !important;
    padding: var(--space-3) var(--space-4);
    gap: var(--space-3);
    /* keep the price on the left and the button taking the rest */
    justify-content: space-between;
  }

  .ac-product__sticky-bar .ac-product__sticky-price {
    flex: 0 0 auto;
    font-size: var(--text-lg);
  }

  .ac-product__sticky-bar .ac-product__sticky-btn {
    flex: 1 1 auto;
    padding: var(--space-3) var(--space-4);
  }

  /* Extra bottom padding so content isn't hidden behind sticky bar */
  .ac-product__disclosure {
    padding-bottom: 70px;
  }

  .ac-shop__card {
    flex-direction: column;
    text-align: center;
  }

  .ac-shop__image {
    width: 200px;
  }
}
