/* Proses Makina — single product page */

.pm-product {
  --pm-green: #2f9108;
  --pm-green-dark: #27800a;
  --pm-green-soft: #eef6ea;
  --pm-ink: #141814;
  --pm-muted: #667066;
  --pm-line: rgba(20, 24, 20, 0.1);
  --pm-bg: #f5f7f4;
  --pm-font-display: var(--pm-font-display, 'Outfit', sans-serif);
  --pm-font-body: var(--pm-font-body, 'Figtree', sans-serif);
  font-family: var(--pm-font-body);
  color: var(--pm-ink);
  background: #fff;
  overflow-x: hidden;
}

.pm-product h1,
.pm-product h2,
.pm-product h3,
.pm-product__btn,
.pm-product__cat,
.pm-product__related a {
  font-family: var(--pm-font-display);
}

/* Hero */
.pm-product__hero {
  padding: clamp(1.75rem, 4vw, 2.75rem) 0;
  background:
    linear-gradient(135deg, rgba(47, 145, 8, 0.06) 0%, transparent 40%),
    linear-gradient(180deg, #f7faf5 0%, #fff 100%);
  border-bottom: 1px solid var(--pm-line);
}

.pm-product__hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.pm-product__crumbs {
  margin-bottom: 0.85rem;
}

.pm-product__crumbs .breadcrumbs,
.pm-product__crumbs .breadcrumb {
  background: transparent !important;
  margin: 0;
  padding: 0;
  font-size: 0.8rem;
  text-transform: none !important;
  color: var(--pm-muted);
}

.pm-product__crumbs a {
  color: var(--pm-green) !important;
  text-decoration: none;
}

.pm-product__cat {
  display: inline-block;
  margin: 0 0 0.7rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--pm-green) !important;
  text-decoration: none !important;
}

.pm-product__title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 3.6vw, 2.55rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.pm-product__lead {
  margin: 0 0 1.35rem;
  max-width: 38rem;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--pm-muted);
}

.pm-product__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.pm-product__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.55rem 1.2rem;
  background: var(--pm-green);
  color: #fff !important;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none !important;
  border: 1px solid var(--pm-green);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.pm-product__btn:hover {
  background: var(--pm-green-dark);
  border-color: var(--pm-green-dark);
  color: #fff !important;
  transform: translateY(-1px);
}

.pm-product__btn--ghost {
  background: transparent;
  color: var(--pm-ink) !important;
  border-color: var(--pm-line);
}

.pm-product__btn--ghost:hover {
  background: transparent;
  border-color: var(--pm-ink);
  color: var(--pm-ink) !important;
}

.pm-product__hero-media {
  background: #fff;
  border: 1px solid var(--pm-line);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow: hidden;
}

.pm-product__hero-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  mix-blend-mode: multiply;
}

/* Body */
.pm-product__body {
  padding: clamp(2rem, 5vw, 3.25rem) 0 clamp(3rem, 6vw, 4rem);
  background: linear-gradient(180deg, #fff 0%, var(--pm-bg) 100%);
  overflow-x: hidden;
}

.pm-product__layout {
  display: grid;
  grid-template-columns: 1.45fr 0.7fr;
  gap: clamp(1.25rem, 3vw, 2.25rem);
  align-items: start;
  min-width: 0;
  max-width: 100%;
}

.pm-product__content {
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  background: #fff;
  border: 1px solid var(--pm-line);
  padding: clamp(1.35rem, 3vw, 2rem);
  box-shadow: 0 14px 34px rgba(16, 20, 16, 0.04);
}

.pm-product__content > *:first-child {
  margin-top: 0;
}

.pm-product__content h2,
.pm-product__content h3 {
  margin: 1.75rem 0 0.7rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--pm-ink);
}

.pm-product__content h2 {
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--pm-line);
}

.pm-product__content h3 {
  font-size: 1.1rem;
  color: var(--pm-ink);
}

.pm-product__content p {
  margin: 0 0 1rem;
  font-size: 1.02rem;
  line-height: 1.65;
  color: #3d463c;
}

.pm-product__content strong {
  color: var(--pm-ink);
  font-weight: 650;
  font-weight: 600;
}

.pm-product__content ul,
.pm-product__content ol {
  margin: 0 0 1.2rem;
  padding: 0;
  list-style: none;
  border: 1px solid var(--pm-line);
  background: var(--pm-bg);
}

.pm-product__content li {
  position: relative;
  padding: 0.75rem 1rem 0.75rem 2.1rem;
  border-bottom: 1px solid var(--pm-line);
  font-size: 0.98rem;
  line-height: 1.45;
}

.pm-product__content li:last-child {
  border-bottom: 0;
}

.pm-product__content li::before {
  content: "";
  position: absolute;
  left: 0.95rem;
  top: 1.1rem;
  width: 6px;
  height: 6px;
  background: var(--pm-green);
}

.pm-product__content .pm-product__split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.25rem 0 1.5rem;
  align-items: start;
}

.pm-product__content .pm-product__split-col {
  min-width: 0;
}

.pm-product__content .pm-product__split-col h2 {
  margin-top: 0;
}

.pm-product__content .pm-product__split-col ul {
  margin-bottom: 0;
}

@media (max-width: 767px) {
  .pm-product__content .pm-product__split {
    grid-template-columns: 1fr;
  }
}

/* Technical tables */
.pm-product__content figure.wp-block-table,
.pm-product__content .pm-table-wrap {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 1rem 0 1.5rem;
  border: 1px solid var(--pm-line);
  background: #fff;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(47, 145, 8, 0.45) var(--pm-bg);
}

.pm-product__content figure.wp-block-table {
  padding: 0;
}

.pm-product__content figure.wp-block-table > .pm-table-wrap {
  margin: 0;
  border: 0;
}

.pm-product__content figure.wp-block-table::after,
.pm-product__content .pm-table-wrap::after {
  content: "SCROLL →";
  position: absolute;
  top: 0.55rem;
  right: 0.65rem;
  z-index: 2;
  padding: 0.2rem 0.45rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--pm-line);
  font-family: var(--pm-font-display);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--pm-muted);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.pm-product__content figure.wp-block-table.is-scrollable:not(.is-scrolled-end)::after,
.pm-product__content .pm-table-wrap.is-scrollable:not(.is-scrolled-end)::after {
  opacity: 1;
}

.pm-product__content table {
  width: max-content;
  min-width: 100%;
  max-width: none;
  margin: 0 !important;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.86rem;
  line-height: 1.35;
  background: #fff;
}

.pm-product__content table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 0.7rem 0.75rem;
  background: var(--pm-green);
  color: #fff;
  font-family: var(--pm-font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: left;
  white-space: normal;
  line-height: 1.25;
  max-width: 6.5rem;
  border: 0;
  vertical-align: middle;
}

.pm-product__content table thead th:first-child {
  max-width: none;
  white-space: nowrap;
}

.pm-product__content table tbody td {
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid var(--pm-line);
  color: var(--pm-ink);
  white-space: nowrap;
  vertical-align: middle;
  background: #fff;
}

.pm-product__content table tbody tr:nth-child(even) td {
  background: var(--pm-bg);
}

.pm-product__content table tbody tr:last-child td {
  border-bottom: 0;
}

.pm-product__content table tbody tr:hover td {
  background: var(--pm-green-soft);
}

.pm-product__content table th:first-child,
.pm-product__content table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 7rem;
  font-weight: 700;
  font-family: var(--pm-font-display);
  box-shadow: 4px 0 10px rgba(16, 20, 16, 0.04);
}

.pm-product__content table thead th:first-child {
  z-index: 3;
  background: var(--pm-green-dark, #27800a);
}

.pm-product__content table tbody td:first-child {
  background: #fff;
}

.pm-product__content table tbody tr:nth-child(even) td:first-child {
  background: var(--pm-bg);
}

.pm-product__content table tbody tr:hover td:first-child {
  background: var(--pm-green-soft);
}

.pm-product.has-wide-table .pm-product__layout {
  grid-template-columns: 1fr;
}

.pm-product.has-wide-table .pm-product__aside {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  position: static;
}

.pm-product.has-wide-table .pm-product__content .pm-table-wrap,
.pm-product.has-wide-table .pm-product__content figure.wp-block-table {
  margin-left: 0;
  margin-right: 0;
}

.pm-product__content iframe {
  display: block;
  width: 100% !important;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  height: auto !important;
  min-height: 280px;
  border: 0;
  margin: 0.5rem 0 1.25rem;
  background: #111;
}

/* Keep classic responsive embed wrappers working (padding-bottom + absolute iframe) */
.pm-product__content div[style*="padding-bottom"],
.pm-product__content .wp-block-embed__wrapper,
.pm-product__content .wp-has-aspect-ratio {
  position: relative !important;
  height: 0 !important;
  overflow: hidden !important;
  max-width: 100%;
  margin: 0.5rem 0 1.25rem;
}

.pm-product__content div[style*="padding-bottom"] iframe,
.pm-product__content .wp-block-embed__wrapper iframe,
.pm-product__content .wp-has-aspect-ratio iframe {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  aspect-ratio: auto !important;
}

.pm-product__content .wp-block-gallery,
.pm-product__content .gallery {
  display: block !important;
  margin: 1rem 0 0 !important;
  padding: 0 !important;
  float: none !important;
  clear: both !important;
  width: 100% !important;
  max-width: none !important;
}

.pm-product__content .wp-block-gallery .blocks-gallery-grid,
.pm-product__content .wp-block-gallery.has-nested-images,
.pm-product__content .gallery {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  float: none !important;
  align-items: stretch !important;
  flex-wrap: unset !important;
}

/* WP classic gallery inserts <br clear> every N columns — breaks 3-up layout */
.pm-product__content .gallery br {
  display: none !important;
}

.pm-product__content .wp-block-gallery.has-nested-images > .wp-block-image,
.pm-product__content .wp-block-gallery .wp-block-image,
.pm-product__content .wp-block-gallery .blocks-gallery-item,
.pm-product__content .wp-block-gallery .blocks-gallery-item > figure,
.pm-product__content .gallery .gallery-item,
.pm-product__content .gallery dl.gallery-item {
  margin: 0 !important;
  width: 100% !important;
  max-width: none !important;
  float: none !important;
  clear: none !important;
  background: var(--pm-bg);
  border: 1px solid var(--pm-line);
  aspect-ratio: 4 / 3;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  overflow: hidden;
  flex-grow: 0 !important;
  flex-basis: auto !important;
  text-align: center;
}

.pm-product__content .wp-block-gallery .blocks-gallery-item > figure {
  border: 0;
  background: transparent;
  padding: 0;
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: auto;
}

.pm-product__content .gallery .gallery-icon,
.pm-product__content .gallery .gallery-icon a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  margin: 0;
}

.pm-product__content .wp-block-gallery img,
.pm-product__content .wp-block-gallery.is-cropped .blocks-gallery-item img,
.pm-product__content .wp-block-gallery .blocks-gallery-item img,
.pm-product__content .gallery img,
.pm-product__content .gallery .gallery-icon img,
.pm-product__content img.alignleft,
.pm-product__content img.alignright,
.pm-product__content img.aligncenter,
.pm-product__content img.size-medium,
.pm-product__content img.size-large {
  float: none !important;
  margin: 0 auto !important;
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: 100% !important;
  flex: none !important;
  object-fit: contain !important;
  display: block !important;
  border: 0 !important;
  mix-blend-mode: normal !important;
}

.pm-product__content figure:not(.wp-block-gallery) {
  margin: 1rem 0 1.25rem;
}

.pm-product__content > img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1rem 0;
}

/* Aside */
.pm-product__aside {
  display: grid;
  gap: 1rem;
  position: sticky;
  top: 6.5rem;
}

.pm-product__card,
.pm-product__related {
  background: #fff;
  border: 1px solid var(--pm-line);
  padding: 1.25rem 1.3rem;
}

.pm-product__card h2,
.pm-product__related h2 {
  margin: 0 0 0.55rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.pm-product__card p {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--pm-muted);
}

.pm-product__card .pm-product__btn {
  width: 100%;
  margin-bottom: 0.75rem;
}

.pm-product__link {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--pm-ink) !important;
  text-decoration: none !important;
}

.pm-product__link:hover {
  color: var(--pm-green) !important;
}

.pm-product__related ul {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
}

.pm-product__related li + li {
  border-top: 1px solid var(--pm-line);
}

.pm-product__related a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0;
  color: var(--pm-ink) !important;
  text-decoration: none !important;
  font-size: 0.9rem;
  font-weight: 600;
}

.pm-product__related a i {
  color: var(--pm-green);
  font-style: normal;
}

.pm-product__related a:hover {
  color: var(--pm-green) !important;
}

@media (max-width: 991px) {
  .pm-product__hero-grid,
  .pm-product__layout {
    grid-template-columns: 1fr;
  }

  .pm-product__hero-media {
    order: -1;
    max-width: 420px;
  }

  .pm-product__aside {
    position: static;
  }

  .pm-product.has-wide-table .pm-product__aside {
    grid-template-columns: 1fr;
  }

  .pm-product__content .wp-block-gallery .blocks-gallery-grid,
  .pm-product__content .wp-block-gallery.has-nested-images,
  .pm-product__content .gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .pm-product__content figure.wp-block-table::after,
  .pm-product__content .pm-table-wrap::after {
    opacity: 1;
  }
}

@media (max-width: 575px) {
  .pm-product__content .wp-block-gallery .blocks-gallery-grid,
  .pm-product__content .wp-block-gallery.has-nested-images,
  .pm-product__content .gallery {
    grid-template-columns: 1fr;
  }
}
