:root {
  --py-navy: #0A2A5E;
  --py-teal: #126e8a;
  --py-green: #2BB673;
  --py-red: #D94948;
  --py-ink: #10203a;
  --py-muted: #5d6b82;
  --py-line: #dde4ee;
  --py-bg: #f5f7fb;
  --py-radius: 14px;
  --py-shadow: 0 14px 38px rgba(10, 42, 94, .12);
}

.py-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Buttons ---------- */
.py-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.py-btn:active { transform: translateY(1px); }
.py-btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--py-navy) 0%, var(--py-teal) 100%);
  box-shadow: 0 8px 20px rgba(18, 110, 138, .28);
}
.py-btn-primary:hover { color: #fff; box-shadow: 0 10px 26px rgba(18, 110, 138, .4); }
.py-btn-ghost {
  color: var(--py-navy);
  background: #fff;
  border-color: var(--py-line);
}
.py-btn-ghost:hover { border-color: var(--py-navy); color: var(--py-navy); }
.py-block { width: 100%; }

/* ---------- Page head & breadcrumb ---------- */
.py-page-head {
  background: linear-gradient(135deg, var(--py-navy) 0%, var(--py-teal) 100%);
  color: #fff;
  padding: 46px 0 40px;
  margin-bottom: 36px;
}
.py-page-head h1 { color: #fff; margin: 8px 0 10px; font-size: 34px; }
.py-page-head p { color: rgba(255,255,255,.82); margin: 0; max-width: 720px; }
.py-crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--py-muted);
  margin-bottom: 18px;
}
.py-page-head .py-crumb { color: rgba(255,255,255,.75); margin-bottom: 0; }
.py-crumb a { color: inherit; text-decoration: none; }
.py-crumb a:hover { color: var(--py-teal); }
.py-page-head .py-crumb a:hover { color: #fff; text-decoration: underline; }
.py-crumb em { font-style: normal; color: inherit; }

/* ---------- Catalog layout ---------- */
.py-catalog {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  padding-bottom: 60px;
}
.py-sidebar {
  width: 264px;
  flex: 0 0 264px;
  position: sticky;
  top: 24px;
}
.py-search {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
}
.py-search input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--py-line);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 14px;
}
.py-search button {
  border: 0;
  background: var(--py-navy);
  color: #fff;
  border-radius: 10px;
  padding: 0 16px;
  font-weight: 600;
  cursor: pointer;
}
.py-filter-block {
  background: #fff;
  border: 1px solid var(--py-line);
  border-radius: var(--py-radius);
  padding: 18px 20px;
  margin-bottom: 18px;
}
.py-filter-block h3 {
  margin: 0 0 12px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--py-navy);
}
.py-filter-block ul { list-style: none; margin: 0; padding: 0; }
.py-filter-block li + li { border-top: 1px solid var(--py-line); }
.py-filter-block a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  color: var(--py-ink);
  text-decoration: none;
  font-size: 14px;
}
.py-filter-block a:hover { color: var(--py-teal); }
.py-filter-block span {
  background: var(--py-bg);
  color: var(--py-muted);
  border-radius: 999px;
  font-size: 12px;
  padding: 2px 10px;
}

.py-main { flex: 1; min-width: 0; }
.py-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}
.py-count { color: var(--py-muted); font-size: 14px; }
.py-sort { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--py-muted); }
.py-sort select {
  border: 1px solid var(--py-line);
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 14px;
  background: #fff;
}

/* ---------- Grid & cards ---------- */
.py-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: 24px;
}
.py-card {
  background: #fff;
  border: 1px solid var(--py-line);
  border-radius: var(--py-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.py-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--py-shadow);
  border-color: #cdd8e8;
}
.py-card-img {
  display: block;
  aspect-ratio: 1 / 1;
  background: var(--py-bg);
  overflow: hidden;
}
.py-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.py-card:hover .py-card-img img { transform: scale(1.05); }
.py-ph { display: block; width: 100%; height: 100%; background: var(--py-bg); }
.py-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 7px; }
.py-card-cat {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--py-teal);
}
.py-card-body h3 { margin: 0; font-size: 17px; line-height: 1.35; }
.py-card-body h3 a { color: var(--py-ink); text-decoration: none; }
.py-card-body h3 a:hover { color: var(--py-teal); }
.py-card-cas { font-size: 13px; color: var(--py-muted); }
.py-card-link { margin-top: auto; padding-top: 6px; font-size: 14px; font-weight: 600; color: var(--py-navy); text-decoration: none; }
.py-card-link:hover { color: var(--py-teal); }

.py-empty {
  background: #fff;
  border: 1px dashed var(--py-line);
  border-radius: var(--py-radius);
  padding: 48px;
  text-align: center;
  color: var(--py-muted);
}

/* ---------- Pagination ---------- */
.py-pagination { margin-top: 34px; display: flex; justify-content: center; }
.py-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  margin: 0 4px;
  border: 1px solid var(--py-line);
  border-radius: 10px;
  color: var(--py-ink);
  text-decoration: none;
  font-size: 14px;
  background: #fff;
}
.py-pagination .current {
  background: var(--py-navy);
  border-color: var(--py-navy);
  color: #fff;
}
.py-pagination a:hover { border-color: var(--py-navy); color: var(--py-navy); }

/* ---------- Single product ---------- */
.py-single { padding-bottom: 60px; }
.py-single-grid {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 40px;
  align-items: start;
}
.py-toc-wrap { position: sticky; top: 24px; }
.py-toc ul { list-style: none; margin: 0; padding: 16px 18px; background: #fff; border: 1px solid var(--py-line); border-radius: var(--py-radius); }
.py-toc li + li { border-top: 1px solid var(--py-line); }
.py-toc a {
  display: block;
  padding: 10px 4px;
  font-size: 14px;
  color: var(--py-muted);
  text-decoration: none;
  border-left: 3px solid transparent;
  padding-left: 10px;
}
.py-toc a:hover { color: var(--py-teal); }
.py-toc a.py-active { color: var(--py-navy); font-weight: 700; border-left-color: var(--py-teal); }

.py-hero {
  max-width: 480px;
  border: 1px solid var(--py-line);
  border-radius: var(--py-radius);
  overflow: hidden;
  background: #fff;
  margin-bottom: 26px;
}
.py-lightbox-btn {
  position: relative;
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  background: none;
  cursor: zoom-in;
}
.py-lightbox-btn img { width: 100%; display: block; }
.py-zoom {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--py-navy);
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
}
.py-single-title { font-size: 32px; margin: 0 0 14px; color: var(--py-ink); }
.py-chips { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.py-chips span {
  background: var(--py-bg);
  border: 1px solid var(--py-line);
  color: var(--py-navy);
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  padding: 6px 14px;
}
.py-excerpt { color: var(--py-muted); font-size: 16px; margin-bottom: 22px; }
.py-cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 30px; }

.py-spec {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--py-line);
  border-radius: var(--py-radius);
  overflow: hidden;
  margin-bottom: 34px;
}
.py-spec th, .py-spec td {
  text-align: left;
  padding: 13px 18px;
  font-size: 14px;
  border-bottom: 1px solid var(--py-line);
}
.py-spec tr:last-child th, .py-spec tr:last-child td { border-bottom: 0; }
.py-spec th { width: 190px; color: var(--py-muted); font-weight: 600; background: #fafbfd; }
.py-spec td { color: var(--py-ink); }

.py-content { color: var(--py-ink); font-size: 16px; line-height: 1.75; }
.py-content h2 {
  font-size: 23px;
  color: var(--py-navy);
  margin: 34px 0 12px;
  padding-top: 10px;
  scroll-margin-top: 20px;
}
.py-content p { margin: 0 0 14px; }

.py-related { margin-top: 46px; }
.py-related h2 { font-size: 24px; color: var(--py-navy); margin-bottom: 18px; }

/* ---------- Drawer ---------- */
.py-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 20, 29, .52);
  opacity: 0;
  transition: opacity .3s ease;
  z-index: 9990;
}
.py-overlay.py-show { opacity: 1; }
.py-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 430px;
  max-width: 92vw;
  background: #fff;
  z-index: 9991;
  transform: translateX(100%);
  transition: transform .32s cubic-bezier(.22, .8, .3, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -18px 0 50px rgba(0,0,0,.22);
}
.py-drawer.py-open { transform: translateX(0); }
.py-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--py-line);
  background: linear-gradient(135deg, var(--py-navy) 0%, var(--py-teal) 100%);
}
.py-drawer-head h2 { color: #fff; margin: 0; font-size: 20px; }
.py-drawer-close {
  border: 0;
  background: rgba(255,255,255,.16);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
}
.py-drawer-close:hover { background: rgba(255,255,255,.3); }
.py-quote-form {
  padding: 22px 24px 28px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.py-quote-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--py-navy);
}
.py-quote-form input,
.py-quote-form select,
.py-quote-form textarea {
  border: 1px solid var(--py-line);
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 14px;
  font-weight: 400;
  color: var(--py-ink);
  background: #fff;
  width: 100%;
}
.py-quote-form input:focus,
.py-quote-form select:focus,
.py-quote-form textarea:focus {
  outline: none;
  border-color: var(--py-teal);
  box-shadow: 0 0 0 3px rgba(18,110,138,.14);
}
.py-quote-form input[readonly] { background: var(--py-bg); color: var(--py-muted); }
.py-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.py-consent { flex-direction: row !important; align-items: flex-start; gap: 10px !important; font-weight: 400 !important; color: var(--py-muted) !important; line-height: 1.5; }
.py-consent input { width: auto; margin-top: 3px; }
.py-form-status { margin: 0; font-size: 14px; min-height: 20px; }
.py-form-status.py-ok { color: var(--py-green); font-weight: 600; }
.py-form-status.py-err { color: var(--py-red); font-weight: 600; }

/* ---------- Lightbox ---------- */
.py-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9995;
  background: rgba(4, 12, 22, .88);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .25s ease;
}
.py-lightbox.py-show { opacity: 1; }
/* display:flex above overrides the UA [hidden] rule; force hidden overlays out of layout
   so an invisible full-screen lightbox cannot swallow clicks */
.py-lightbox[hidden],
.py-overlay[hidden],
.py-drawer[hidden] { display: none !important; }
.py-lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
}
.py-lightbox-close {
  position: absolute;
  top: 22px;
  right: 26px;
  border: 0;
  background: rgba(255,255,255,.14);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
}
.py-lightbox-close:hover { background: rgba(255,255,255,.28); }

/* ---------- Cookie banner ---------- */
.py-cookie {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 9980;
  max-width: 380px;
  background: #fff;
  border: 1px solid var(--py-line);
  border-radius: var(--py-radius);
  box-shadow: var(--py-shadow);
  padding: 20px 22px;
  transform: translateY(130%);
  transition: transform .35s cubic-bezier(.22,.8,.3,1);
}
.py-cookie.py-show { transform: translateY(0); }
.py-cookie p { margin: 0 0 14px; font-size: 14px; color: var(--py-muted); line-height: 1.6; }
.py-cookie-btns { display: flex; gap: 10px; }
.py-cookie-btns .py-btn { padding: 9px 18px; font-size: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .py-catalog { flex-direction: column; }
  .py-sidebar { width: 100%; flex-basis: auto; position: static; }
  .py-single-grid { grid-template-columns: 1fr; gap: 0; }
  .py-toc-wrap { position: static; margin-bottom: 26px; }
  .py-toc ul { display: flex; flex-wrap: wrap; gap: 4px; }
  .py-toc li { border: 0 !important; }
  .py-toc a { border: 1px solid var(--py-line); border-radius: 999px; padding: 7px 14px !important; font-size: 13px; }
  .py-toc a.py-active { border-color: var(--py-teal); }
}
@media (max-width: 560px) {
  .py-page-head { padding: 34px 0 30px; }
  .py-page-head h1 { font-size: 26px; }
  .py-single-title { font-size: 26px; }
  .py-grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 14px; }
  .py-card-body { padding: 12px 14px 14px; }
  .py-card-body h3 { font-size: 15px; }
  .py-row2 { grid-template-columns: 1fr; }
  .py-cookie { left: 12px; right: 12px; bottom: 12px; max-width: none; }
}
