
/* ==========================================================================
   Devine Tiles — single tile page (/tiles/<slug>/)
   From the approved product page template. Everything is scoped to .dt-pdp;
   the tokens are mapped to the theme's colours and fonts.
   ========================================================================== */
.dt-pdp {
  --ink: var(--dt-black, #1a1a1a);
  --ink-soft: #555;
  --paper: #ffffff;
  --mist: var(--dt-cream, #faf8f5);
  --line: var(--dt-border, #e8e5e0);
  --accent: #b35a00;
  --accent-ink: #ffffff;
  --accent-hover: #8f4800;
  --focus: #1a1a1a;
  --ok: #1f6b45;
  --warn-bg: #fff6e0;
  --warn-line: #e3c36a;
  --font-body: var(--dt-font-body, 'DM Sans', sans-serif);
  --font-head: var(--dt-font-heading, 'Playfair Display', Georgia, serif);
  --radius: var(--dt-radius-sm, 8px);
  --maxw: var(--dt-max-w, 1200px);
  --gutter: clamp(16px, 4vw, 32px);

  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}
.dt-pdp *, .dt-pdp *::before, .dt-pdp *::after { box-sizing: border-box; }
.dt-pdp img { max-width: 100%; height: auto; display: block; }
.dt-pdp a { color: var(--accent); text-underline-offset: 3px; }
.dt-pdp a:hover { color: var(--accent-hover); }
.dt-pdp :focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.dt-pdp h1, .dt-pdp h2, .dt-pdp h3 { font-family: var(--font-head); line-height: 1.2; margin: 0; letter-spacing: -0.01em; }
.dt-pdp p { margin: 0 0 1em; }
.dt-pdp .wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.dt-pdp section { padding-block: clamp(32px, 5vw, 56px); }
.dt-pdp section + section { border-top: 1px solid var(--line); }
.dt-pdp .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- breadcrumbs ---------- */
.dt-pdp .crumbs { padding-block: 14px; font-size: 15px; color: var(--ink-soft); }
.dt-pdp .crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 0; }
.dt-pdp .crumbs li + li::before { content: "/"; margin-inline: 10px; color: var(--line); }
.dt-pdp .crumbs [aria-current="page"] { color: var(--ink); overflow-wrap: anywhere; }

/* ---------- hero ---------- */
.dt-pdp .hero { padding-block: 8px clamp(32px, 5vw, 56px); }
.dt-pdp .hero-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
  grid-template-areas: "head" "gallery" "buy";
}
.dt-pdp .hero-head { grid-area: head; }
.dt-pdp .gallery { grid-area: gallery; min-width: 0; }
.dt-pdp .hero-buy { grid-area: buy; min-width: 0; }
@media (min-width: 900px) {
  .dt-pdp .hero-grid {
    grid-template-columns: minmax(0, 55fr) minmax(0, 45fr);
    grid-template-areas: "gallery head" "gallery buy";
    grid-template-rows: auto 1fr;
    column-gap: clamp(32px, 4vw, 56px);
    row-gap: 20px;
    align-items: start;
  }
  .dt-pdp .gallery { position: sticky; top: 16px; grid-row: 1 / span 2; }
}
.dt-pdp h1 { font-size: clamp(1.5rem, 1.1rem + 1.3vw, 2rem); overflow-wrap: anywhere; }
.dt-pdp .ref { margin: 10px 0 0; font-size: 16px; color: var(--ink-soft); }
.dt-pdp .ref strong { color: var(--ink); font-weight: 600; }
.dt-pdp .summary { margin: 12px 0 0; max-width: 62ch; }

/* gallery */
.dt-pdp .stage { position: relative; display: block; width: 100%; border: 1px solid var(--line); border-radius: var(--radius); background: var(--mist); padding: 0; cursor: zoom-in; overflow: hidden; aspect-ratio: 1 / 1; }
.dt-pdp .ph {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px;
  background:
    repeating-linear-gradient(135deg, rgba(29,36,40,.07) 0 2px, transparent 2px 18px),
    var(--mist);
  color: var(--ink-soft); font-size: 15px; line-height: 1.45;
}
.dt-pdp .ph b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }
.dt-pdp .zoom-hint { margin: 8px 0 0; font-size: 14px; color: var(--ink-soft); }

/* lightbox */
.dt-pdp dialog.lightbox { width: min(92vw, 880px); max-height: 92vh; border: 0; border-radius: var(--radius); padding: 0; background: var(--paper); color: var(--ink); }
.dt-pdp dialog.lightbox::backdrop { background: rgba(10, 16, 19, .78); }
.dt-pdp .lb-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.dt-pdp .lb-body { padding: 16px; }
.dt-pdp .lb-body .ph { aspect-ratio: 1 / 1; max-height: 70vh; }

/* key facts */
.dt-pdp .facts { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 0; border-top: 1px solid var(--line); }
.dt-pdp .facts dt, .dt-pdp .facts dd { margin: 0; padding: 7px 0; border-bottom: 1px solid var(--line); }
.dt-pdp .facts dt { color: var(--ink-soft); padding-right: 24px; }
.dt-pdp .facts dd { font-weight: 600; }
.dt-pdp .facts dd small { display: block; font-weight: 400; color: var(--ink-soft); font-size: 14px; }

.dt-pdp .avail { margin: 12px 0 0; padding: 12px 14px; background: var(--mist); border-radius: var(--radius); font-size: 15px; }

/* buttons */
.dt-pdp .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: var(--radius); border: 2px solid var(--accent); background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; text-align: center; }
.dt-pdp .btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
.dt-pdp .btn.alt { background: transparent; color: var(--accent); }
.dt-pdp .btn.alt:hover { background: var(--mist); color: var(--accent-hover); }
.dt-pdp .cta-row { display: grid; gap: 10px; margin-top: 14px; }
.dt-pdp .cta-sub { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 480px) { .dt-pdp .cta-row { grid-template-columns: 1fr 1fr; } .dt-pdp .cta-row .btn.primary { grid-column: 1 / -1; } }
.dt-pdp .contact-line { margin: 14px 0 0; font-size: 15px; color: var(--ink-soft); }

/* headings inside sections */
.dt-pdp section h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); margin-bottom: 18px; }
.dt-pdp section h3 { font-size: 1.1rem; margin-bottom: 8px; }
.dt-pdp .prose { max-width: 70ch; }

/* spec table */
.dt-pdp .table-scroll { overflow-x: auto; max-width: 100%; }
.dt-pdp table { border-collapse: collapse; width: 100%; font-size: 16px; }
.dt-pdp caption { text-align: left; padding: 0 0 10px; font-weight: 600; }
.dt-pdp th, .dt-pdp td { text-align: left; vertical-align: top; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.dt-pdp tbody th { width: 34%; font-weight: 600; background: var(--mist); }
.dt-pdp thead th { background: var(--mist); border-bottom: 2px solid var(--line); }
.dt-pdp .spec td small, .dt-pdp td small { display: block; color: var(--ink-soft); font-size: 14px; }
.dt-pdp .note { margin-top: 14px; padding: 12px 14px; background: var(--warn-bg); border-left: 4px solid var(--warn-line); border-radius: 0 var(--radius) var(--radius) 0; font-size: 15px; max-width: 70ch; }

/* design guidance */
.dt-pdp .guide { display: grid; gap: 28px; }
@media (min-width: 800px) { .dt-pdp .guide { grid-template-columns: repeat(2, 1fr); gap: 40px; max-width: 920px; } }
.dt-pdp .guide > div { border-top: 3px solid var(--accent); padding-top: 14px; }

/* compare */
.dt-pdp .compare-wrap { display: grid; gap: 28px; }
@media (min-width: 900px) { .dt-pdp .compare-wrap { grid-template-columns: 1.25fr 1fr; gap: 40px; align-items: start; } }
.dt-pdp .compare-wrap > div { min-width: 0; }
.dt-pdp .compare-table th[scope="col"] { min-width: 150px; }
.dt-pdp .this-col { background: #fdf1e5; }

/* estimator */
.dt-pdp .estimator { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: var(--mist); }
.dt-pdp .estimator h3 { margin-bottom: 4px; }
.dt-pdp .estimator p { font-size: 15px; color: var(--ink-soft); }
.dt-pdp .field-row { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.dt-pdp .field-row.three { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 420px) { .dt-pdp .field-row.three { grid-template-columns: 1fr 1fr; } }
.dt-pdp label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.dt-pdp .hint { font-weight: 400; color: var(--ink-soft); }
.dt-pdp input[type="number"] {
  width: 100%; min-height: 46px; padding: 9px 12px; font: inherit; color: var(--ink); background: var(--paper); border: 1.5px solid #8b979d; border-radius: var(--radius);
}
.dt-pdp .result { margin-top: 14px; padding: 12px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); font-weight: 600; min-height: 3.2em; }
.dt-pdp .result small { display: block; font-weight: 400; color: var(--ink-soft); }

/* FAQ */
.dt-pdp .faq { max-width: 78ch; }
.dt-pdp details { border-bottom: 1px solid var(--line); }
.dt-pdp details:first-of-type { border-top: 1px solid var(--line); }
.dt-pdp summary { list-style: none; cursor: pointer; padding: 16px 40px 16px 0; font-weight: 600; position: relative; }
.dt-pdp summary::-webkit-details-marker { display: none; }
.dt-pdp summary::after { content: "+"; position: absolute; right: 8px; top: 12px; font-size: 1.5rem; line-height: 1; color: var(--accent); }
.dt-pdp details[open] summary::after { content: "\2212"; }
.dt-pdp details .ans { padding: 0 0 16px; }
.dt-pdp details .ans p:last-child { margin-bottom: 0; }

/* related */
.dt-pdp .related { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .dt-pdp .related { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .dt-pdp .related { grid-template-columns: repeat(4, 1fr); } }
.dt-pdp .rel-card { height: 100%; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.dt-pdp .rel-card .rel-img { aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.dt-pdp .rel-card .rel-img .ph { padding: 8px; font-size: 13px; }
.dt-pdp .rel-card h3 { font-size: 1rem; margin: 0; }
.dt-pdp .rel-card p { font-size: 15px; margin: 0; color: var(--ink-soft); flex: 1; }
.dt-pdp .rel-card .ref-small { font-size: 14px; color: var(--ink-soft); }

.dt-pdp .showroom { margin-top: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 15px; }
.dt-pdp .showroom h3 { font-size: 1rem; margin-bottom: 6px; }
.dt-pdp .showroom address { font-style: normal; margin-bottom: 6px; }
.dt-pdp .showroom p { margin: 0; }

/* mobile sticky action bar: below 900px only */
.dt-pdp .sticky-bar { display: none; }
@media (max-width: 899px) {
  .dt-pdp .sticky-bar { display: grid; grid-template-columns: 1fr auto; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--paper); border-top: 1px solid var(--line); }
  .dt-pdp .sticky-bar[data-hidden="true"] { display: none; }
  .dt-pdp .sticky-bar .btn { min-height: 46px; padding: 0 16px; }
  .dt-pdp { padding-bottom: 72px; }
}

@media (prefers-reduced-motion: reduce) { .dt-pdp * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }

/* ---------- product photos (replace the template's placeholders) ---------- */
.dt-pdp .stage img { width: 100%; height: 100%; object-fit: contain; background: var(--mist); }
.dt-pdp .lb-body img { width: 100%; height: auto; max-height: 75vh; object-fit: contain; margin: 0 auto; }
.dt-pdp .rel-card .rel-img img { width: 100%; height: 100%; object-fit: cover; }
.dt-pdp .rel-card h3 a { color: var(--ink); text-decoration: none; }
.dt-pdp .rel-card h3 a:hover { color: var(--accent); text-decoration: underline; }
.dt-pdp .crumbs a { color: var(--ink-soft); text-decoration: none; }
.dt-pdp .crumbs a:hover { color: var(--accent); text-decoration: underline; }
.dt-pdp .btn.primary, .dt-pdp .sticky-bar .btn:not(.alt) { background: var(--dt-primary, #f4861f); border-color: var(--dt-primary, #f4861f); color: #1a1a1a; }
.dt-pdp .btn.primary:hover, .dt-pdp .sticky-bar .btn:not(.alt):hover { background: var(--dt-primary-dark, #d97510); border-color: var(--dt-primary-dark, #d97510); color: #1a1a1a; }
.dt-pdp section h2, .dt-pdp h1 { font-weight: 600; }

