/* ---------- Machines listing (machines.php) + detail (machine.php) ---------- */

/* ---- Listing ---- */
.pm-mlist { max-width: 1200px; margin: 0 auto; padding: 0 40px 120px; }
.pm-mlist__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.pm-mcard {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(10, 10, 10, 0.07);
  border-radius: 24px;
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.pm-mcard:hover {
  transform: translateY(-4px);
  border-color: rgba(252, 72, 5, 0.35);
  box-shadow: 0 30px 50px -30px rgba(10, 10, 10, 0.35);
}
.pm-mcard__media {
  display: block;
  aspect-ratio: 4 / 3;
  background: #fff;
  border-bottom: 1px solid rgba(10, 10, 10, 0.06);
  overflow: hidden;
}
.pm-mcard__media img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 18px;
  transition: transform .6s cubic-bezier(.2, .8, .2, 1);
}
.pm-mcard:hover .pm-mcard__media img { transform: scale(1.05); }
.pm-mcard__body { display: flex; flex-direction: column; flex: 1; padding: 24px; }
.pm-mcard__code {
  margin: 0 0 6px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .1em;
  color: var(--primary, #FC4805);
}
.pm-mcard__title {
  margin: 0 0 10px;
  font-family: "Antonio", sans-serif;
  font-weight: 700;
  font-size: 26px;
  line-height: 1.1;
}
.pm-mcard__title a { color: #0a0a0a; text-decoration: none; }
.pm-mcard__title a:hover { color: var(--primary, #FC4805); }
.pm-mcard__summary {
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.6;
  color: #5b5b61;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pm-mcard__specs { margin: 0 0 20px; display: grid; gap: 8px; }
.pm-mcard__specs div {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 9px 12px;
  font-size: 13.5px;
  background: #f7f4ee;
  border-radius: 10px;
}
.pm-mcard__specs dt { color: #6c6963; }
.pm-mcard__specs dd { margin: 0; font-weight: 600; text-align: right; }
.pm-mcard__link {
  margin-top: auto;
  display: inline-flex; align-items: center; gap: 10px;
  align-self: flex-start;
  font-size: 15px; font-weight: 600;
  color: #0a0a0a;
  text-decoration: none;
}
.pm-mcard__link span {
  display: grid; place-items: center;
  width: 32px; height: 32px;
  color: #fff;
  background: #0a0a0a;
  border-radius: 10px;
  transition: background .25s ease, transform .3s ease;
}
.pm-mcard:hover .pm-mcard__link span { background: var(--primary, #FC4805); transform: rotate(45deg); }
.pm-mcard--compact .pm-mcard__body { padding: 18px 20px 22px; }
.pm-mcard--compact .pm-mcard__title { font-size: 22px; margin: 0; }

/* ---- Listing: portfolio rows (image left, content right) ---- */
.pm-mlist { display: grid; gap: 28px; }
.pm-mrow {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  background: #fff;
  border: 1px solid rgba(10, 10, 10, 0.07);
  border-radius: 32px;
  overflow: hidden;
  transition: box-shadow .35s ease, border-color .35s ease;
}
.pm-mrow:hover { border-color: rgba(252, 72, 5, 0.3); box-shadow: 0 40px 70px -45px rgba(10, 10, 10, 0.4); }
.pm-mrow__media {
  position: relative;
  display: block;
  min-height: 440px;
  background: radial-gradient(circle at 50% 45%, #ffffff 0%, #f3efe7 75%);
  border-right: 1px solid rgba(10, 10, 10, 0.06);
  overflow: hidden;
}
.pm-mrow__media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 36px;
  transition: transform .8s cubic-bezier(.2, .8, .2, 1);
}
.pm-mrow:hover .pm-mrow__media img { transform: scale(1.04); }
.pm-mrow__body { display: flex; flex-direction: column; justify-content: center; padding: 48px 52px; }
.pm-mrow__meta { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.pm-mrow__no {
  font-family: "Antonio", sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: #b9b4aa;
  font-variant-numeric: tabular-nums;
}
.pm-mrow__no::after { content: ""; display: inline-block; width: 28px; height: 1px; margin-left: 14px; vertical-align: middle; background: #d6d1c8; }
.pm-mrow__code {
  padding: 5px 12px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .1em;
  color: var(--primary, #FC4805);
  background: rgba(252, 72, 5, 0.09);
  border-radius: 999px;
}
.pm-mrow__title {
  margin: 0 0 16px;
  font-family: "Antonio", sans-serif;
  font-weight: 700;
  font-size: clamp(32px, 3.4vw, 46px);
  line-height: 1.02;
  text-transform: uppercase;
}
.pm-mrow__title a { color: #0a0a0a; text-decoration: none; transition: color .2s ease; }
.pm-mrow__title a:hover { color: var(--primary, #FC4805); }
.pm-mrow__summary { margin: 0 0 26px; font-size: 16.5px; line-height: 1.65; color: #5b5b61; }
.pm-mrow__specs {
  margin: 0 0 30px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  border-top: 1px solid rgba(10, 10, 10, 0.09);
  border-bottom: 1px solid rgba(10, 10, 10, 0.09);
}
.pm-mrow__specs div { padding: 14px 16px 14px 0; }
.pm-mrow__specs div + div { padding-left: 16px; border-left: 1px solid rgba(10, 10, 10, 0.09); }
.pm-mrow__specs dt { font-size: 12px; color: #8a8780; line-height: 1.35; }
.pm-mrow__specs dd { margin: 4px 0 0; font-size: 15px; font-weight: 600; line-height: 1.35; color: #0a0a0a; }
.pm-mrow__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.pm-mrow__btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 52px;
  font-size: 15px; font-weight: 600;
  border-radius: 15px;
  text-decoration: none;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.pm-mrow__btn--dark { padding: 0 7px 0 22px; color: #fff; background: #0a0a0a; }
.pm-mrow__btn--dark span { display: grid; place-items: center; width: 38px; height: 38px; background: rgba(255, 255, 255, 0.14); border-radius: 11px; transition: transform .3s ease; }
.pm-mrow__btn--dark:hover { background: var(--primary, #FC4805); }
.pm-mrow__btn--dark:hover span { transform: rotate(45deg); }
.pm-mrow__btn--ghost { padding: 0 22px; color: #0a0a0a; border: 1px solid rgba(10, 10, 10, 0.15); }
.pm-mrow__btn--ghost:hover { border-color: var(--primary, #FC4805); color: var(--primary, #FC4805); }

@media (max-width: 1023.98px) {
  .pm-mrow__body { padding: 36px 32px; }
  .pm-mrow__media { min-height: 360px; }
}
@media (max-width: 760px) {
  .pm-mrow { grid-template-columns: 1fr; border-radius: 24px; }
  .pm-mrow__media { min-height: 0; aspect-ratio: 4 / 3; border-right: 0; border-bottom: 1px solid rgba(10, 10, 10, 0.06); }
  .pm-mrow__media img { padding: 22px; }
  .pm-mrow__body { padding: 26px 22px 28px; }
  .pm-mrow__specs { grid-auto-flow: row; }
  .pm-mrow__specs div, .pm-mrow__specs div + div { padding: 12px 0; border-left: 0; }
  .pm-mrow__specs div + div { border-top: 1px solid rgba(10, 10, 10, 0.09); }
  .pm-mrow__btn { flex: 1; justify-content: center; }
}

/* ---- Detail ---- */
.pm-md { max-width: 1200px; margin: 0 auto; padding: 150px 40px 120px; }
.pm-md__crumbs { display: flex; gap: 10px; margin-bottom: 24px; font-size: 14px; color: #8a8780; }
.pm-md__crumbs a { color: #5b5b61; text-decoration: none; }
.pm-md__crumbs a:hover { color: var(--primary, #FC4805); }

.pm-md__top {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: start;
  margin-bottom: 96px;
}
.pm-md__main {
  aspect-ratio: 1 / 1;
  background: #fff;
  border: 1px solid rgba(10, 10, 10, 0.07);
  border-radius: 28px;
  overflow: hidden;
}
.pm-md__main img { width: 100%; height: 100%; object-fit: contain; padding: 28px; }
.pm-md__thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.pm-md__thumb {
  width: 84px; height: 84px;
  padding: 0;
  background: #fff;
  border: 2px solid transparent;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(10, 10, 10, 0.08);
  transition: border-color .2s ease;
}
.pm-md__thumb img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.pm-md__thumb.is-active, .pm-md__thumb:hover { border-color: var(--primary, #FC4805); }

.pm-md__info { position: sticky; top: 120px; }
.pm-md__code {
  display: inline-block;
  margin: 0 0 14px;
  padding: 6px 12px;
  font-size: 13px; font-weight: 600; letter-spacing: .1em;
  color: var(--primary, #FC4805);
  background: rgba(252, 72, 5, 0.1);
  border-radius: 999px;
}
.pm-md__title {
  margin: 0 0 18px;
  font-family: "Antonio", sans-serif;
  font-weight: 700;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1;
  text-transform: uppercase;
}
.pm-md__summary { margin: 0 0 24px; font-size: 18px; color: #3a3a3e; }
.pm-md__key {
  margin: 0 0 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.pm-md__key div {
  padding: 14px 16px;
  background: #fff;
  border: 1px solid rgba(10, 10, 10, 0.07);
  border-radius: 16px;
}
.pm-md__key dt { font-size: 12.5px; color: #8a8780; line-height: 1.4; }
.pm-md__key dd { margin: 4px 0 0; font-weight: 600; font-size: 15px; line-height: 1.4; }
.pm-md__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.pm-md__btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 56px;
  font-size: 16px; font-weight: 600;
  border-radius: 16px;
  text-decoration: none;
  transition: transform .25s ease, box-shadow .25s ease;
}
.pm-md__btn:hover { transform: translateY(-2px); }
.pm-md__btn--primary {
  padding: 0 8px 0 24px;
  color: #fff;
  background: var(--primary, #FC4805);
  box-shadow: 0 14px 30px -12px rgba(252, 72, 5, 0.7);
}
.pm-md__btn--primary span {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
}
.pm-md__btn--wa { padding: 0 22px; color: #fff; background: #128c56; }
.pm-md__brand { margin: 18px 0 0; font-size: 14px; color: #8a8780; }

.pm-md__details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-bottom: 96px;
}
.pm-md__h2 {
  margin: 0 0 20px;
  font-family: "Antonio", sans-serif;
  font-weight: 700;
  font-size: 40px;
  line-height: 1;
}
.pm-md__h3 { margin: 28px 0 12px; font-size: 18px; font-weight: 600; }
.pm-md__desc p { margin: 0 0 16px; color: #3a3a3e; }
.pm-md__features { margin: 0; padding: 0; list-style: none; }
.pm-md__features li {
  position: relative;
  padding: 10px 0 10px 28px;
  color: #3a3a3e;
  border-bottom: 1px solid rgba(10, 10, 10, 0.07);
}
.pm-md__features li::before {
  content: "";
  position: absolute; left: 0; top: 17px;
  width: 14px; height: 8px;
  border-left: 2.5px solid var(--primary, #FC4805);
  border-bottom: 2.5px solid var(--primary, #FC4805);
  transform: rotate(-45deg);
}
.pm-md__specs table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border: 1px solid rgba(10, 10, 10, 0.07);
  border-radius: 20px;
  overflow: hidden;
  font-size: 15px;
}
.pm-md__specs th, .pm-md__specs td {
  padding: 14px 18px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(10, 10, 10, 0.07);
}
.pm-md__specs tr:last-child th, .pm-md__specs tr:last-child td { border-bottom: 0; }
.pm-md__specs th { width: 44%; font-weight: 500; color: #6c6963; background: #fcfbf8; }
.pm-md__specs td { font-weight: 600; color: #0a0a0a; }

.pm-md__videos { margin-bottom: 96px; }
.pm-md__vgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }

.pm-md__more-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 4px; }
.pm-md__more-head a { color: #0a0a0a; font-weight: 600; text-decoration: none; margin-bottom: 24px; }
.pm-md__more-head a:hover { color: var(--primary, #FC4805); }

/* video player cards (shared with videos page) */
.pm-video__player {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9;
  padding: 0; overflow: hidden; border: 0; border-radius: 18px; background: #0a0a0a; cursor: pointer;
}
.pm-video__player img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.pm-video__player:hover img { transform: scale(1.04); }
.pm-video__play {
  position: absolute; left: 50%; top: 50%; z-index: 1;
  display: grid; place-items: center; width: 64px; height: 64px; padding-left: 3px;
  color: #fff; background: var(--primary, #FC4805); border-radius: 50%;
  transform: translate(-50%, -50%); box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.6);
}
.pm-video__frame { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 18px; background: #000; }

/* ---- Responsive ---- */
@media (max-width: 1023.98px) {
  .pm-mlist__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pm-md__top, .pm-md__details { grid-template-columns: 1fr; gap: 36px; }
  .pm-md__info { position: static; }
}
@media (max-width: 640px) {
  .pm-mlist { padding: 0 16px 80px; }
  .pm-mlist__grid { grid-template-columns: 1fr; }
  .pm-md { padding: 130px 16px 80px; }
  .pm-md__key { grid-template-columns: 1fr; }
  .pm-md__vgrid { grid-template-columns: 1fr; }
  .pm-md__btn { flex: 1; justify-content: center; }
  .pm-md__specs th { width: 46%; }
}
