.tp-machines-page { background: #fff; }
.tp-machines-main { min-height: 560px; }
.tp-machines-loading { min-height: 420px; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--tp-muted); }
.tp-machines-loading span { width: 34px; height: 34px; border: 3px solid var(--tp-border); border-top-color: var(--tp-red); border-radius: 50%; animation: tp-machines-spin .7s linear infinite; }
@keyframes tp-machines-spin { to { transform: rotate(360deg); } }

.tp-machines-hero { padding: 42px 0 38px; border-bottom: 1px solid var(--tp-border); background: linear-gradient(135deg,#fff 0%,#fff 60%,#fff5f7 100%); }
.tp-machines-inner { width: min(calc(100% - 48px),1180px); margin-inline: auto; }
.tp-machines-hero-grid { display: grid; grid-template-columns: minmax(0,1fr) 390px; align-items: center; gap: 64px; }
.tp-machines-hero .tp-breadcrumbs { margin-bottom: 30px; }
.tp-machines-hero h1 { max-width: 760px; margin: 10px 0 18px; font-size: clamp(2.35rem,4vw,4rem); line-height: 1.03; letter-spacing: -.045em; }
.tp-machines-lead { max-width: 700px; margin: 0; color: var(--tp-muted); font-size: 1.08rem; line-height: 1.65; }
.tp-machines-hero-note { min-height: 250px; display: grid; place-content: center; justify-items: center; gap: 16px; padding: 32px; border: 1px solid #f4c6cf; border-radius: 22px; background: #fff; text-align: center; box-shadow: 0 18px 50px rgb(37 41 48 / 7%); }
.tp-machines-hero-note svg { width: 92px; height: 92px; color: var(--tp-red); }
.tp-machines-hero-note strong { font-size: 1.1rem; }
.tp-machines-hero-note span { color: var(--tp-muted); line-height: 1.55; }

.tp-machines-categories { padding: 54px 0 70px; }
.tp-machines-section-head { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 28px; }
.tp-machines-section-head h2 { margin: 0 0 8px; font-size: clamp(1.8rem,3vw,2.45rem); }
.tp-machines-section-head p { max-width: 610px; margin: 0; color: var(--tp-muted); line-height: 1.6; }
.tp-machine-category-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.tp-machine-category-card { min-height: 330px; display: flex; flex-direction: column; padding: 28px; border: 1px solid var(--tp-border); border-radius: 18px; background: #fff; color: var(--tp-graphite); transition: border-color .18s,transform .18s,box-shadow .18s; }
.tp-machine-category-card:hover,.tp-machine-category-card:focus-visible { border-color: var(--tp-red); transform: translateY(-3px); box-shadow: 0 18px 44px rgb(37 41 48 / 9%); }
.tp-machine-category-visual { min-height: 150px; display: grid; place-content: center; margin: -8px -8px 24px; border-radius: 14px; background: var(--tp-surface); overflow: hidden; }
.tp-machine-category-visual svg { width: 104px; height: 104px; color: var(--tp-graphite); }
.tp-machine-category-visual img { width: min(270px,92%); height: 150px; object-fit: contain; }
.tp-machine-category-card small { color: var(--tp-red); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.tp-machine-category-card h2 { margin: 9px 0 10px; font-size: 1.4rem; }
.tp-machine-category-card p { margin: 0 0 24px; color: var(--tp-muted); line-height: 1.55; }
.tp-machine-category-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 18px; border-top: 1px solid var(--tp-border); color: var(--tp-red); font-weight: 700; }
.tp-machine-category-link svg { width: 22px; height: 22px; }

.tp-machine-listing { padding: 48px 0 74px; }
.tp-machine-list { display: grid; gap: 28px; }
.tp-machine-offer { display: grid; grid-template-columns: minmax(0,1.08fr) minmax(360px,.92fr); overflow: hidden; border: 1px solid var(--tp-border); border-radius: 20px; background: #fff; box-shadow: 0 12px 38px rgb(37 41 48 / 6%); }
.tp-machine-offer-body { display: flex; flex-direction: column; padding: 38px 42px; }
.tp-machine-offer-kicker { color: var(--tp-red); font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.tp-machine-offer h2 { margin: 10px 0 13px; font-size: clamp(1.65rem,2.6vw,2.25rem); line-height: 1.12; }
.tp-machine-offer-copy { margin: 0 0 25px; color: var(--tp-muted); line-height: 1.65; }
.tp-machine-details { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1px; margin: 0 0 26px; border: 1px solid var(--tp-border); border-radius: 12px; overflow: hidden; background: var(--tp-border); }
.tp-machine-details div { min-height: 70px; padding: 13px 16px; background: #fff; }
.tp-machine-details dt { margin-bottom: 5px; color: var(--tp-muted); font-size: .78rem; }
.tp-machine-details dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.tp-machine-offer-actions { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.tp-machine-offer-actions .tp-btn { min-height: 48px; }
.tp-machine-offer-price { margin-right: auto; font-size: 1.45rem; font-weight: 800; }
.tp-machine-offer-price small { display: block; color: var(--tp-muted); font-size: .75rem; font-weight: 500; }

.tp-machine-gallery { position: relative; min-width: 0; min-height: 440px; overflow: hidden; background: var(--tp-surface); outline-offset: -4px; }
.tp-machine-gallery-viewport { height: 100%; overflow: hidden; }
.tp-machine-gallery-track { height: 100%; display: flex; transform: translateX(calc(var(--tp-gallery-index,0) * -100%)); transition: transform .32s ease; }
.tp-machine-gallery-slide { flex: 0 0 100%; min-width: 0; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 50px; text-align: center; }
.tp-machine-gallery-slide img { width: 100%; height: 100%; max-height: 440px; object-fit: contain; }
.tp-machine-gallery-slide svg { width: 104px; height: 104px; color: #58616c; }
.tp-machine-gallery-slide strong { font-size: 1.08rem; }
.tp-machine-gallery-slide span { max-width: 280px; color: var(--tp-muted); line-height: 1.5; }
.tp-machine-gallery-slide:nth-child(2) { background: #f1f3f6; }
.tp-machine-gallery-slide:nth-child(3) { background: #fff5f7; }
.tp-machine-gallery-arrow { position: absolute; z-index: 2; top: 50%; width: 44px; height: 44px; display: grid; place-content: center; border: 1px solid var(--tp-border); border-radius: 50%; background: rgb(255 255 255 / 94%); color: var(--tp-graphite); transform: translateY(-50%); box-shadow: 0 5px 20px rgb(37 41 48 / 12%); }
.tp-machine-gallery-arrow:hover { border-color: var(--tp-red); color: var(--tp-red); }
.tp-machine-gallery-arrow svg { width: 21px; height: 21px; }
.tp-machine-gallery-prev { left: 18px; }
.tp-machine-gallery-next { right: 18px; }
.tp-machine-gallery-dots { position: absolute; z-index: 2; left: 50%; bottom: 18px; display: flex; gap: 8px; transform: translateX(-50%); }
.tp-machine-gallery-dots button { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%; background: #aeb5bd; }
.tp-machine-gallery-dots button[aria-current="true"] { width: 26px; border-radius: 8px; background: var(--tp-red); }

.tp-machine-empty-note { display: flex; align-items: center; gap: 14px; margin-top: 26px; padding: 18px 20px; border: 1px solid #f3c7cf; border-radius: 14px; background: var(--tp-red-soft); color: var(--tp-graphite); }
.tp-machine-empty-note svg { flex: 0 0 auto; width: 27px; height: 27px; color: var(--tp-red); }
.tp-machine-empty-note p { margin: 0; line-height: 1.55; }

@media (max-width: 900px) {
  .tp-machines-hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .tp-machines-hero-note { min-height: 190px; }
  .tp-machine-category-grid { grid-template-columns: 1fr; }
  .tp-machine-category-card { min-height: 260px; }
  .tp-machine-offer { grid-template-columns: 1fr; }
  .tp-machine-gallery { min-height: 360px; }
  .tp-machine-offer-body { padding: 32px; }
}

@media (max-width: 600px) {
  .tp-machines-inner { width: min(calc(100% - 32px),1180px); }
  .tp-machines-hero { padding: 26px 0 30px; }
  .tp-machines-hero .tp-breadcrumbs { margin-bottom: 22px; }
  .tp-machines-hero h1 { font-size: 2.25rem; }
  .tp-machines-hero-note { min-height: 165px; padding: 24px; }
  .tp-machines-hero-note svg { width: 72px; height: 72px; }
  .tp-machines-categories,.tp-machine-listing { padding: 36px 0 52px; }
  .tp-machines-section-head { display: block; }
  .tp-machine-category-card { padding: 22px; }
  .tp-machine-category-visual { min-height: 125px; }
  .tp-machine-offer { border-radius: 16px; }
  .tp-machine-gallery { min-height: 300px; }
  .tp-machine-gallery-slide { padding: 42px 36px; }
  .tp-machine-gallery-slide svg { width: 82px; height: 82px; }
  .tp-machine-gallery-arrow { width: 40px; height: 40px; }
  .tp-machine-gallery-prev { left: 10px; }
  .tp-machine-gallery-next { right: 10px; }
  .tp-machine-offer-body { padding: 27px 22px; }
  .tp-machine-details { grid-template-columns: 1fr; }
  .tp-machine-offer-actions { align-items: stretch; flex-direction: column; }
  .tp-machine-offer-price { margin: 0 0 6px; }
  .tp-machine-offer-actions .tp-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .tp-machine-gallery-track,.tp-machine-category-card { transition: none; }
  .tp-machines-loading span { animation: none; }
}
.tp-machine-offer-zapytanie { grid-template-columns: 1fr; }
