.ag-product-page {
  --ag-ink: #111827;
  --ag-soft: #f3f5f6;
  --ag-accent: #efd1d1;
  color: var(--ag-ink);
}

.ag-product-page .ag-product-layout {
  align-items: flex-start;
  padding-bottom: 3rem;
}

.ag-product-gallery {
  padding: 0 3%;
}

.ag-product-stage {
  position: relative;
  max-width: 720px;
  margin: 20px auto 14px;
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  touch-action: pan-y;
}

.ag-product-main-image {
  display: block;
  width: 100%;
  max-height: 720px;
  margin: 0 auto;
  object-fit: contain;
  background: #fff;
  user-select: none;
}

.ag-product-page #imgproduct_preview.ag-product-main-image {
  width: 100% !important;
  height: auto !important;
  max-height: 720px;
  aspect-ratio: 1 / 1;
  background: #fff;
}

.ag-product-thumbnails {
  display: flex;
  justify-content: center;
  gap: 10px;
  max-width: 720px;
  margin: 0 auto;
  padding: 4px 2px 10px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
}

.ag-product-thumbnail {
  flex: 0 0 92px;
  width: 92px;
  height: 92px;
  appearance: none;
  padding: 0;
  overflow: hidden;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  scroll-snap-align: start;
  transition: border-color .2s ease, transform .2s ease;
}

.ag-product-thumbnail[aria-current="true"] {
  border-color: #000;
}

.ag-product-thumbnail:hover {
  border-color: #6b7280;
  transform: translateY(-2px);
}

.ag-product-thumbnail img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.ag-slider-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(17, 24, 39, .12);
  border-radius: 50%;
  background: rgba(255, 255, 255, .94);
  color: #111827;
  box-shadow: 0 8px 24px rgba(17, 24, 39, .16);
  font: 400 2rem/1 Arial, sans-serif;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background-color .2s ease, transform .2s ease;
}

.ag-slider-arrow:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.06);
}

.ag-slider-arrow--previous {
  left: 14px;
}

.ag-slider-arrow--next {
  right: 14px;
}

.ag-product-panel {
  max-width: 560px;
  padding: 12px 3% 0;
}

.ag-product-panel h1 {
  margin: 8px 0 12px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.05;
}

.ag-product-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #6b7280;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.ag-product-kicker img {
  width: 118px;
  height: auto;
}

.ag-price-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 12px 0;
  font-family: var(--theme-font-headings);
}

.ag-current-price {
  font-size: 1.85rem;
  font-weight: 700;
}

.ag-old-price {
  color: #6b7280;
  text-decoration: line-through;
}

.ag-discount {
  padding: 4px 8px;
  border-radius: 4px;
  background: var(--ag-accent);
  font-size: .78rem;
  font-weight: 700;
}

.ag-product-summary {
  max-width: 48ch;
  color: #4b5563;
  line-height: 1.7;
}

.ag-product-points {
  padding: 0;
  margin: 18px 0;
  list-style: none;
}

.ag-product-points li {
  margin: 8px 0;
  font-family: var(--theme-font-headings);
}

.ag-color-options {
  display: flex;
  flex-wrap: wrap;
  margin-top: 12px;
}

.ag-color-options input:focus-visible + label,
.ag-product-thumbnail:focus-visible,
.ag-product-stage:focus-visible,
.ag-slider-arrow:focus-visible,
.ag-buy-button:focus-visible {
  outline: 3px solid #6f46ff;
  outline-offset: 3px;
}

.ag-color-options input:checked + label {
  border-color: #000;
  background: #000;
  color: #fff;
}

.ag-buy-button {
  width: 100%;
  margin-top: 16px;
  border-radius: 7px;
  background: #000;
  color: #fff;
  font-family: var(--theme-font-headings);
  font-size: 1rem;
  letter-spacing: .06em;
}

.ag-secure-note {
  margin: 12px 0 0;
  color: #6b7280;
  font-size: .82rem;
  text-align: center;
}

.ag-trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 28px 0 0;
  background: #e5e7eb;
  border: 1px solid #e5e7eb;
}

.ag-trust-item {
  padding: 22px 12px;
  background: #fff;
  text-align: center;
}

.ag-trust-item img {
  width: 36px;
  height: 36px;
  margin-bottom: 8px;
}

.ag-trust-item strong,
.ag-trust-item small {
  display: block;
}

.ag-trust-item small {
  margin-top: 5px;
  color: #6b7280;
  line-height: 1.4;
}

.ag-story {
  max-width: 1180px;
  margin: 0 auto;
  padding: 4rem 4.375rem;
}

.ag-story-heading {
  max-width: 760px;
  margin: 0 auto 3rem;
  text-align: center;
}

.ag-story-heading h2 {
  margin-bottom: 12px;
  font-family: var(--theme-font-headings);
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.ag-story-heading p {
  color: #6b7280;
  line-height: 1.7;
}

.ag-story-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(2rem, 7vw, 7rem);
  margin: 4rem 0;
}

.ag-story-row:nth-child(odd) .ag-story-media {
  order: 2;
}

.ag-story-media img {
  display: block;
  width: 100%;
  max-height: 650px;
  border-radius: .25rem;
  object-fit: contain;
  background: #fff;
}

.ag-story-copy h2 {
  margin-bottom: 14px;
  font-family: var(--theme-font-headings);
  font-size: clamp(1.8rem, 3vw, 2.7rem);
}

.ag-story-copy p {
  color: #4b5563;
  line-height: 1.8;
}

.ag-specs {
  padding: 4rem 4.375rem;
  background: var(--ag-soft);
}

.ag-specs-inner {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 7vw, 7rem);
  max-width: 1180px;
  margin: 0 auto;
}

.ag-specs img {
  width: 100%;
  border-radius: 12px;
}

.ag-spec-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 24px;
}

.ag-spec-card {
  padding: 18px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}

.ag-spec-card span,
.ag-spec-card strong {
  display: block;
}

.ag-spec-card span {
  margin-bottom: 5px;
  color: #6b7280;
  font-size: .76rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.ag-details {
  max-width: 920px;
  margin: 0 auto;
  padding: 4rem 4.375rem 5rem;
}

.ag-details h2 {
  margin-bottom: 24px;
  font-family: var(--theme-font-headings);
  font-size: clamp(2rem, 4vw, 3rem);
}

.ag-details details {
  border-top: 1px solid #d1d5db;
}

.ag-details details:last-child {
  border-bottom: 1px solid #d1d5db;
}

.ag-details summary {
  padding: 20px 4px;
  font-family: var(--theme-font-headings);
  font-size: 1.2rem;
  cursor: pointer;
}

.ag-details details p {
  padding: 0 4px 20px;
  color: #4b5563;
  line-height: 1.7;
}

.ag-bottom-buy {
  padding: 38px 4.375rem;
  background: #000;
  color: #fff;
  text-align: center;
}

.ag-bottom-buy h2 {
  margin: 0 0 18px;
  color: #fff;
  font-family: var(--theme-font-headings);
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.ag-bottom-buy a {
  display: inline-block;
  padding: 15px 28px;
  border-radius: 6px;
  background: #fff;
  color: #000;
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 991px) {
  .ag-story,
  .ag-specs,
  .ag-details {
    padding-right: 2rem;
    padding-left: 2rem;
  }
}

@media (max-width: 767px) {
  body nav.navbar .navbar-brand img {
    width: 116px !important;
    max-width: 116px !important;
    height: auto !important;
  }

  .ag-product-panel {
    max-width: none;
    padding: 24px 16px 0;
  }

  .ag-product-gallery {
    padding: 0 16px;
  }

  .ag-product-stage {
    margin-top: 10px;
    border-radius: 14px;
  }

  .ag-product-main-image {
    margin-top: 0;
  }

  .ag-product-thumbnails {
    justify-content: flex-start;
    margin-right: -16px;
    padding-right: 16px;
  }

  .ag-product-thumbnail {
    flex-basis: 76px;
    width: 76px;
    height: 76px;
  }

  .ag-slider-arrow {
    width: 40px;
    height: 40px;
  }

  .ag-slider-arrow--previous {
    left: 10px;
  }

  .ag-slider-arrow--next {
    right: 10px;
  }

  .ag-trust-grid,
  .ag-story-row,
  .ag-specs-inner {
    grid-template-columns: 1fr;
  }

  .ag-story-row:nth-child(odd) .ag-story-media {
    order: initial;
  }

  .ag-story,
  .ag-specs,
  .ag-details,
  .ag-bottom-buy {
    padding: 3rem 16px;
  }

  .ag-story-row {
    gap: 1.5rem;
    margin: 3rem 0;
  }

  .ag-spec-list {
    grid-template-columns: 1fr;
  }

  .ag-trust-item {
    padding: 18px 8px;
  }
}
