/* ══════════════════════════════════════════════
   policy.css — My Pizza Oven policy pages
   BuyFactory Direct Pty Ltd
   ══════════════════════════════════════════════ */

:root {
  --white:   #ffffff;
  --off:     #f8f8f6;
  --border:  #e2e2e0;
  --text:    #111110;
  --mid:     #6a6860;
  --light:   #a09e98;
  --fire:    #111110;
  --max:     820px;
  --r:       6px;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  font-size: 18px;
  background: var(--white);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

/* Global links — underlined, inherit colour */
a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: #ccc;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s;
}
a:hover { text-decoration-color: var(--text); }

/* ── NAV ── */
nav {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 58px;
  display: flex; align-items: center; justify-content: space-between;
}

/* Only the top site nav gets sticky positioning */
nav:first-of-type {
  position: sticky; top: 0; z-index: 100;
}

/* The TOC nav element must NOT be sticky or flex */
.policy-toc {
  position: static !important;
  display: block !important;
  height: auto !important;
  z-index: auto !important;
  border-bottom: none !important;
  padding: 22px 26px !important;
}

.nav-wordmark {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  line-height: 1.2;
}
.nav-wordmark:hover { text-decoration: none; opacity: 0.8; }

.nav-wordmark small {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.6rem;
  font-weight: 400;
  color: var(--mid);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--mid);
  padding: 8px 16px;
  border-radius: var(--r);
  border: 1.5px solid var(--border);
  text-decoration: none;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.nav-back:hover {
  color: var(--text);
  background: var(--off);
  border-color: #ccc;
  text-decoration: none;
}

/* ── PAGE LAYOUT ── */
.policy-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 56px 24px 96px;
}

/* ── PAGE HEADER ── */
.policy-eyebrow {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 14px;
}

.policy-wrap > h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  color: var(--text);
}

.policy-meta {
  font-size: 0.82rem;
  color: var(--light);
  margin-bottom: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--border);
}

/* ── TABLE OF CONTENTS ── */
.policy-toc {
  background: var(--off);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px 26px;
  margin-bottom: 52px;
}

.policy-toc-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 14px;
}

.policy-toc ol {
  list-style: decimal;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.policy-toc li {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--mid);
}

.policy-toc a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 2px;
  font-weight: 400;
}
.policy-toc a:hover { text-decoration-color: var(--text); }

/* ── CALLOUT BOX ── */
.callout {
  background: var(--off);
  border-left: 3px solid var(--text);
  border-radius: 0 var(--r) var(--r) 0;
  padding: 16px 20px;
  margin-bottom: 48px;
  font-size: 0.92rem;
  color: var(--mid);
  line-height: 1.7;
}
.callout strong { color: var(--text); font-weight: 600; }

/* ── POLICY BODY ── */
.policy-body { }

/* Section headings */
.policy-body h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  margin-top: 52px;
  margin-bottom: 16px;
  padding-top: 52px;
  border-top: 1px solid var(--border);
}

/* Override: first h3 after callout or directly after open — no top border/padding */
.policy-body h3.first {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

/* Subheadings */
.policy-body h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 28px;
  margin-bottom: 10px;
}

/* Paragraphs */
.policy-body p {
  font-size: 0.97rem;
  color: #3a3a38;
  line-height: 1.82;
  margin-bottom: 18px;
}
.policy-body p:last-child { margin-bottom: 0; }

/* Bullet lists */
.policy-body ul {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.policy-body ul li {
  font-size: 0.95rem;
  color: #3a3a38;
  line-height: 1.7;
  padding-left: 20px;
  position: relative;
}
.policy-body ul li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--mid);
  font-weight: 400;
}

/* Ordered lists */
.policy-body ol {
  list-style: decimal;
  padding-left: 22px;
  margin: 0 0 20px 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.policy-body ol li {
  font-size: 0.95rem;
  color: #3a3a38;
  line-height: 1.7;
  padding-left: 4px;
}

/* Links inside body */
.policy-body a {
  color: var(--text);
  font-weight: 500;
}
.policy-body strong {
  font-weight: 600;
  color: var(--text);
}

/* ── DELIVERY TABLE (shipping page) ── */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 20px 0 24px;
  border: 1px solid var(--border);
  border-radius: var(--r);
}

.delivery-table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.delivery-table th {
  background: var(--off);
  text-align: left;
  padding: 12px 16px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mid);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.delivery-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: #3a3a38;
  font-size: 0.92rem;
  line-height: 1.5;
}

.delivery-table tbody tr:last-child td { border-bottom: none; }
.delivery-table tbody tr:hover td { background: var(--off); }

.free-badge {
  display: inline-block;
  background: #edf7f2;
  color: #2a7a4f;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ── FOOTER ── */
footer {
  background: var(--text);
  padding: 32px 24px;
  text-align: center;
}

footer p {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.3);
  line-height: 1.8;
  margin-bottom: 8px;
  text-decoration: none;
}

footer p:last-child { margin-bottom: 0; }

footer a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: color 0.15s;
}
footer a:hover { color: #fff; text-decoration: none; }

footer .footer-divider {
  display: inline-block;
  color: rgba(255,255,255,0.15);
  margin: 0 8px;
}

/* ── RESPONSIVE ── */
@media (min-width: 640px) {
  .policy-wrap { padding: 72px 40px 112px; }
  nav { padding: 0 40px; }
}

@media (min-width: 900px) {
  .policy-wrap { padding: 80px 48px 120px; }
}
