/* ============================================================
   Fiberglass World — Legal pages (Regulamin / Polityka prywatności)
   (extends css/style.css — shares header, footer, contact widget)
   ============================================================ */

html { scroll-behavior: smooth; }

/* Breadcrumb (same look as the other subpages) */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--muted); transition: color .2s; }
.breadcrumb a:hover { color: var(--navy); }
.crumb-home { display: inline-flex; }
.crumb-sep { color: var(--muted-2); }
.crumb-current { color: var(--ink); font-weight: 600; }

.legal-page { padding: 26px 0 14px; }

/* ---------- Header card ---------- */
.legal-head {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 32px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.legal-head h1 {
  font-size: 28px;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 10px;
}
.legal-updated {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 5px 12px;
}
.legal-updated svg { color: var(--navy); }
.legal-intro {
  margin: 16px 0 0;
  font-size: 14px;
  line-height: 1.65;
  color: #3a4150;
}

/* ---------- Two-column: TOC + content ---------- */
.legal-layout {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 26px;
  align-items: start;
}

/* Sticky table of contents */
.legal-toc {
  position: sticky;
  top: 130px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 16px;
  box-shadow: var(--shadow);
}
.legal-toc h2 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--muted);
  margin: 0 0 12px;
  padding: 0 6px;
}
.legal-toc ol {
  list-style: none;
  counter-reset: toc;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.legal-toc li { counter-increment: toc; }
.legal-toc a {
  display: flex;
  gap: 9px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  border-left: 2px solid transparent;
  font-size: 13px;
  line-height: 1.4;
  color: #51596a;
  transition: background .2s, color .2s, border-color .2s;
}
.legal-toc a::before {
  content: counter(toc) ".";
  color: var(--muted-2);
  font-weight: 700;
  flex: none;
}
.legal-toc a:hover { background: var(--bg); color: var(--navy); }
.legal-toc a.active {
  background: rgba(26, 34, 54, .06);
  color: var(--ink);
  font-weight: 700;
}
.legal-toc a.active::before { color: var(--muted-2); }

/* ---------- Content ---------- */
.legal-content {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 36px;
  box-shadow: var(--shadow);
}
.legal-section {
  scroll-margin-top: 130px;
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.legal-section:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: none;
}
.legal-section h2 {
  display: flex;
  gap: 12px;
  align-items: baseline;
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 14px;
}
.legal-section h2 .sec-num {
  flex: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 19px;
}
.legal-section h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin: 20px 0 8px;
}
.legal-section p {
  font-size: 14px;
  line-height: 1.7;
  color: #3a4150;
  margin: 0 0 12px;
}
.legal-section p:last-child { margin-bottom: 0; }
.legal-section ul,
.legal-section ol.legal-list {
  margin: 0 0 12px;
  padding-left: 22px;
}
.legal-section li {
  font-size: 14px;
  line-height: 1.7;
  color: #3a4150;
  margin-bottom: 7px;
}
.legal-section li:last-child { margin-bottom: 0; }
.legal-section strong { color: var(--ink); font-weight: 700; }
.legal-section a.inline { color: var(--navy); font-weight: 600; text-decoration: underline; }
.legal-section a.inline:hover { color: var(--red); }

/* Seller data card */
.seller-card {
  background: #f6f7f9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 4px 0 8px;
}
.seller-card .sc-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 14px;
}
.seller-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 28px;
}
.seller-row { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.seller-row .sr-key { font-size: 12px; color: var(--muted); }
.seller-row .sr-val { font-size: 14px; font-weight: 600; color: var(--ink); word-break: break-word; }
.seller-row .sr-val a { color: var(--ink); transition: color .2s; }
.seller-row .sr-val a:hover { color: var(--red); }
.seller-row.sr-wide { grid-column: 1 / -1; }

/* Definition list */
.def-list { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.def-list dt { font-weight: 700; color: var(--ink); font-size: 14px; }
.def-list dd { margin: 3px 0 0; font-size: 14px; line-height: 1.65; color: #3a4150; }

/* Simple spec/table for payment & shipping methods */
.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 4px 0 14px;
}
.legal-table th,
.legal-table td {
  text-align: left;
  padding: 11px 14px;
  font-size: 13.5px;
  border-bottom: 1px solid var(--line);
}
.legal-table th {
  background: var(--bg);
  font-weight: 700;
  color: var(--ink);
}
.legal-table td { color: #3a4150; }
.legal-table tr:last-child td { border-bottom: none; }
.legal-table td:first-child { font-weight: 600; color: var(--ink); white-space: nowrap; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .legal-layout { grid-template-columns: 1fr; }
  .legal-toc {
    position: static;
    order: -1;
  }
  .legal-toc ol {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px 10px;
  }
}

@media (max-width: 640px) {
  .legal-head { padding: 22px 20px; }
  .legal-head h1 { font-size: 23px; }
  .legal-content { padding: 22px 20px; }
  .seller-grid { grid-template-columns: 1fr; }
  .legal-toc ol { grid-template-columns: 1fr; }
  .legal-section h2 { font-size: 17px; }
  .legal-table th, .legal-table td { padding: 9px 10px; font-size: 12.5px; }
  /* Pozwól zawijać pierwszą kolumnę — długie etykiety (np. „Realizacja zamówienia
     i umowy") nie rozpychają wtedy tabeli poza ekran na wąskich widokach (~390px). */
  .legal-table td:first-child { white-space: normal; }
}
