/* ── arm-products Section ───────────────────────── */
.arm-products {
  max-width: 140rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* ── Header ── */
.arm-products__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: clamp(4rem, 6vw, 6rem);
  text-align: center;
}

.arm-products__title {
  font-size: clamp(2.4rem, 3vw, 3.6rem);
  font-weight: 600;
  color: var(--color-emphasis);
}

.arm-products__desc {
  font-size: var(--font-size-md);
  color: var(--color-text-subtle);
  line-height: 1.7;
  margin-bottom: clamp(3.2rem, 5vw, 5rem);
}

/* ── Slider Wrapper ── */
.arm-products__slider-wrapper {
  position: relative;
  width: 100%;
}

/* ── Prev / Next nav buttons ── */
.arm-products__nav {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  z-index: 10;
  width: 4.4rem;
  height: 4.4rem;
  border-radius: 50%;
  border: 1.5px solid var(--color-border-primary);
  background-color: var(--color-surface-base);
  color: var(--color-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px var(--color-shadow-md);
  transition:
    background 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.arm-products__nav svg {
  width: 2rem;
  height: 2rem;
}

.arm-products__nav:hover {
  background-color: var(--color-primary);
  color: var(--color-text-inverse);
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(12, 160, 223, 0.35);
}

.arm-products__nav:active {
  transform: translateY(-50%) scale(0.95);
}

.arm-products__nav--prev {
  left: -2.4rem;
}

.arm-products__nav--next {
  right: -2.4rem;
}

.arm-products__nav.is-disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* ══════════════════════════════════════════════════
   CUSTOM SLIDER  (แทน Swiper)
   ══════════════════════════════════════════════════ */
.pc-slider {
  width: 100%;
  overflow: hidden;
  padding-bottom: 4rem;
}

.pc-track {
  display: flex;
  gap: 2.4rem;
  transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
  align-items: stretch;
}

/* ขนาดแต่ละ slide ควบคุมจาก JS ผ่าน CSS variable */
.pc-slide {
  flex: 0 0 var(--slide-width, 100%);
  height: auto;
}

/* ── Product Card ── */
.product-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  background: var(--color-surface-base);
  border: 0.5px solid var(--color-border-secondary);
  box-shadow: 0 0 24px 0 rgba(82, 156, 219, 0.16);
  overflow: hidden;
  transition:
    box-shadow 0.3s ease,
    transform 0.3s ease;
  height: 100%;
}

.product-card:hover {
  transform: translateY(-4px);
}

/* ── Image area ── */
.product-card__image-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--color-surface-subtle);
}

.product-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.product-card__image--placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e8eef5 0%, #d4dde8 100%);
}

.product-card__image-wrap:hover .product-card__image {
  transform: scale(1.06);
}

/* ── Overlay quick view ── */
.product-card__overlay {
  position: absolute;
  inset: 0;
  background: rgba(12, 14, 44, 0.32);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-card__image-wrap:hover .product-card__overlay {
  opacity: 1;
}

.product-card__quick-view {
  width: 4.4rem;
  height: 4.4rem;
  border-radius: 50%;
  background: var(--color-surface-base);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(8px);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.product-card__quick-view svg {
  width: 1.8rem;
  height: 1.8rem;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.product-card__image-wrap:hover .product-card__quick-view {
  transform: translateY(0);
}

/* ── Card Body ── */
.product-card__body {
  padding: 1.6rem 1.8rem 2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.4rem;
}

.product-card__category {
  font-size: var(--font-size-xs);
  font-weight: 500;
  color: var(--color-primary);
  text-transform: uppercase;
}

.product-card__name {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--color-text-base);
  line-height: 1.4;
  margin-top: 0.2rem;
}

.product-card__subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-subtle);
}

/* ── Footer price + button ── */
.product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
  padding-top: 1.4rem;
  border-top: 1px solid var(--color-border-subtle);
}

.product-card__price {
  font-size: var(--font-size-xl);
  font-weight: 700;
  background: var(--color-emphasis);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── Add to Cart Button ── */
.btn-add-to-cart {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;

  font-family: "IBM Plex Sans Thai", sans-serif;
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text-inverse);
  background-color: #13215c;
  border: none;
  border-radius: var(--radius-sm);
  box-shadow: 0 6px 10px var(--color-shadow-sm);
  padding: var(--btn-padding-sm);
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 0.25s ease,
    color 0.25s ease,
    transform 0.2s ease,
    box-shadow 0.25s ease;
}

.btn-add-to-cart svg {
  width: 1.5rem;
  height: 1.5rem;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  flex-shrink: 0;
}

.btn-add-to-cart:hover {
  background-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px var(--color-shadow-md);
}

.btn-add-to-cart:active {
  transform: scale(0.96);
  box-shadow: none;
}

.btn-add-to-cart.is-added {
  background: linear-gradient(90deg, #22c55e, #16a34a);
  box-shadow: 0 3px 10px rgba(34, 197, 94, 0.3);
  pointer-events: none;
}

/* ── View All CTA ── */
.arm-products__cta {
  margin-top: 4rem;
}

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 1100px) {
  .arm-products__nav--prev {
    left: -1rem;
  }
  .arm-products__nav--next {
    right: -1rem;
  }
}

@media (max-width: 768px) {
  .arm-products__nav {
    width: 3.6rem;
    height: 3.6rem;
  }
  .arm-products__nav--prev {
    left: 0;
  }
  .arm-products__nav--next {
    right: 0;
  }
}

@media (max-width: 480px) {
  .product-card__footer {
    flex-direction: column;
    align-items: flex-start;
  }
  .btn-add-to-cart {
    width: 100%;
    justify-content: center;
  }
}
