/* =====================================================
   Sensor / product detail pages  (generated by tools/build.py)
   Builds on the tokens in style.css - no new colours are
   introduced here, so a brand change in style.css carries.
   ===================================================== */

.sensor-page {
    padding-top: 110px;
    padding-bottom: 80px;
    background: var(--bg-light);
}

.sensor-page .container {
    max-width: 1200px;
}

.sensor-page .breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 28px;
}

.sensor-page .breadcrumb a {
    color: var(--text-body);
    text-decoration: none;
}

.sensor-page .breadcrumb a:hover { color: var(--primary); }
.sensor-page .breadcrumb i { font-size: 0.65rem; color: var(--text-light); }
.sensor-page .breadcrumb span { color: var(--text-dark); font-weight: 600; }

/* ---------- hero ---------------------------------------------------- */

.sensor-hero {
    display: grid;
    grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
    gap: 48px;
    align-items: start;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 40px;
}

.sensor-hero-media {
    position: sticky;
    top: 100px;
}

/* Product shots are wildly different aspect ratios - a pH probe is 237x1243,
   the soil sensor is 1400x789. `contain` on a fixed-height box keeps every
   card the same size on the page without cropping a probe tip off. */
/* White, not grey: the cut-out product shots are transparent PNGs, and a
   white-bodied device (DODO COMMAND, DODO LOGGER) on a grey panel reads as a
   mistake. White suits the dark probes equally well and matches how these
   products are photographed. */
.sensor-hero-img {
    width: 100%;
    height: 420px;
    object-fit: contain;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
}

.gallery-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.gallery-thumb {
    width: 76px;
    height: 76px;
    padding: 6px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-white);
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.gallery-thumb:hover { border-color: var(--primary); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: contain; }

.sensor-category {
    display: inline-block;
    background: var(--bg-teal-subtle);
    color: var(--primary-dark);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 100px;
    margin-bottom: 16px;
}

.sensor-hero-body h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.9rem, 3.4vw, 2.6rem);
    line-height: 1.15;
    color: var(--text-dark);
    margin: 0 0 10px;
}

.sensor-descriptor {
    font-size: 1.15rem;
    color: var(--text-body);
    font-weight: 600;
    margin: 0 0 6px;
}

.sensor-parameters {
    font-size: 0.95rem;
    color: var(--text-light);
    margin: 0 0 22px;
}

.id-pills { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }

.id-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-gray);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 14px;
    font-family: 'Space Grotesk', monospace;
    font-weight: 700;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.id-pill .k {
    font-family: 'Inter', sans-serif;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-light);
}

.glance-list {
    list-style: none;
    padding: 0;
    margin: 0 0 28px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px 20px;
}

.glance-list li {
    position: relative;
    padding-left: 22px;
    font-size: 0.93rem;
    color: var(--text-body);
    line-height: 1.5;
}

.glance-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary);
}

.sensor-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }

.sensor-hero-note {
    font-size: 0.9rem;
    color: var(--text-body);
    background: var(--bg-teal-subtle);
    border-radius: 8px;
    padding: 12px 16px;
    margin: 0;
}

.sensor-hero-note i { color: var(--primary); margin-right: 8px; }
.sensor-hero-note a { color: var(--primary-dark); font-weight: 600; }

/* ---------- sections ------------------------------------------------ */

.sensor-section {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 36px 40px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.sensor-section h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.55rem;
    color: var(--text-dark);
    margin: 0 0 18px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--bg-gray);
}

.sensor-section h3 {
    font-size: 1.05rem;
    color: var(--text-dark);
    margin: 28px 0 12px;
    font-weight: 700;
}

.sensor-section h3:first-of-type { margin-top: 6px; }

.sensor-section p { color: var(--text-body); line-height: 1.75; margin: 0 0 14px; }
.sensor-section p:last-child { margin-bottom: 0; }

.section-lead {
    background: var(--bg-gray);
    border-left: 3px solid var(--primary);
    padding: 14px 18px;
    border-radius: 0 8px 8px 0;
    font-size: 0.93rem;
}

.sensor-section code {
    font-family: 'Space Grotesk', monospace;
    background: var(--bg-gray);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

/* ---------- tables --------------------------------------------------- */

/* Register maps run to four columns of fixed-width hex and will not reflow
   below about 600px. Scrolling the table inside its own box keeps the page
   body from scrolling sideways on a phone. */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 8px;
}

.spec-table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.spec-table thead th {
    background: var(--secondary);
    color: var(--text-white);
    text-align: left;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.spec-table thead th:first-child { border-radius: 8px 0 0 0; }
.spec-table thead th:last-child { border-radius: 0 8px 0 0; }

.spec-table td {
    padding: 11px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-body);
    vertical-align: top;
    line-height: 1.55;
}

.spec-table tbody tr:nth-child(even) { background: var(--bg-light); }
.spec-table tbody tr:hover { background: var(--bg-teal-subtle); }
.spec-table td:first-child { color: var(--text-dark); }
.spec-table strong { color: var(--text-dark); font-weight: 700; }

/* ---------- lists ---------------------------------------------------- */

.feature-list, .plain-list, .caution-list { list-style: none; padding: 0; margin: 0; }

.feature-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 12px 28px;
}

.feature-list li {
    position: relative;
    padding-left: 30px;
    color: var(--text-body);
    line-height: 1.6;
}

.feature-list li i {
    position: absolute;
    left: 0;
    top: 0.3em;
    color: var(--primary);
    font-size: 0.85rem;
}

.plain-list li, .caution-list li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 10px;
    color: var(--text-body);
    line-height: 1.65;
}

.plain-list li::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 0.6em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
}

.caution-list li::before {
    content: '\f06a';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 0.1em;
    color: #C77700;
    font-size: 0.85rem;
}

/* ---------- applications --------------------------------------------- */

.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.app-card {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 18px 20px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.app-card i { color: var(--primary); font-size: 1.05rem; margin-top: 3px; }
.app-card p { margin: 0; font-size: 0.92rem; line-height: 1.55; }

/* ---------- ecosystem band ------------------------------------------- */

.ecosystem-band {
    background: var(--gradient-hero-dark);
    border-radius: 16px;
    padding: 46px 40px;
    margin-bottom: 24px;
    color: var(--text-white);
}

.ecosystem-head { max-width: 760px; margin-bottom: 34px; }

.ecosystem-band .eyebrow {
    display: inline-block;
    color: var(--primary-light);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.ecosystem-band h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.4rem, 2.6vw, 1.9rem);
    line-height: 1.25;
    margin: 0 0 14px;
    color: var(--text-white);
}

.ecosystem-head p { color: var(--text-offwhite); line-height: 1.7; margin: 0; }

.ecosystem-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.eco-step {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 22px 20px;
}

.eco-step i { color: var(--primary-light); font-size: 1.4rem; margin-bottom: 12px; display: block; }

.eco-step h3 {
    font-size: 0.95rem;
    color: var(--text-white);
    margin: 0 0 8px;
    font-weight: 700;
}

.eco-step p {
    font-size: 0.86rem;
    color: var(--text-offwhite);
    line-height: 1.6;
    margin: 0;
}

.eco-step strong { color: var(--text-white); }

.ecosystem-note {
    background: rgba(255, 255, 255, 0.07);
    border-left: 3px solid var(--primary-light);
    border-radius: 0 10px 10px 0;
    padding: 16px 20px;
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-offwhite);
    margin: 0;
}

.ecosystem-note i { color: var(--primary-light); margin-right: 8px; }
.ecosystem-note strong { color: var(--text-white); }

/* ---------- FAQ ------------------------------------------------------ */

.faq-list { display: flex; flex-direction: column; gap: 10px; }

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-light);
    overflow: hidden;
}

.faq-item summary {
    cursor: pointer;
    padding: 16px 20px;
    font-weight: 600;
    color: var(--text-dark);
    list-style: none;
    position: relative;
    padding-right: 48px;
    line-height: 1.5;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

.faq-item[open] summary::after { transform: translateY(-50%) rotate(180deg); }
.faq-item[open] summary { background: var(--bg-teal-subtle); }

.faq-answer { padding: 4px 20px 18px; }
.faq-answer p { font-size: 0.93rem; margin: 0; }

/* ---------- family siblings / hub cards ------------------------------ */

.sibling-grid, .hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.sibling-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-decoration: none;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 18px;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.sibling-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.sibling-card img {
    width: 100%;
    height: 130px;
    object-fit: contain;
    margin-bottom: 8px;
}

.sibling-name { font-weight: 700; color: var(--text-dark); font-size: 0.98rem; }
.sibling-desc { font-size: 0.84rem; color: var(--text-light); line-height: 1.45; }

.sibling-code {
    font-family: 'Space Grotesk', monospace;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-top: 4px;
}

/* ---------- hub page ------------------------------------------------- */

.hub-hero {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 46px 40px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.hub-hero .eyebrow {
    display: inline-block;
    color: var(--primary-dark);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.hub-hero h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 4vw, 2.9rem);
    color: var(--text-dark);
    margin: 0 0 14px;
    line-height: 1.15;
}

.hub-lead {
    font-size: 1.05rem;
    color: var(--text-body);
    line-height: 1.7;
    margin: 0;
    max-width: 820px;
}

.hub-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.hub-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.hub-card-media { background: var(--bg-white); padding: 20px; }

.hub-card-media img {
    width: 100%;
    height: 170px;
    object-fit: contain;
}

.hub-card-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 6px; }

.hub-card-code {
    font-family: 'Space Grotesk', monospace;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--primary-dark);
}

.hub-card-body h3 { font-size: 1.05rem; color: var(--text-dark); margin: 0; }
.hub-card-body p { font-size: 0.88rem; color: var(--text-body); margin: 0; line-height: 1.5; }
.hub-card-params { font-size: 0.8rem; color: var(--text-light); }

.hub-card-link {
    margin-top: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.hub-card-link i { font-size: 0.75rem; margin-left: 4px; }

/* ---------- CTA ------------------------------------------------------ */

.sensor-cta {
    background: var(--gradient-teal-dark);
    border-radius: 16px;
    padding: 42px 40px;
    display: flex;
    gap: 32px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    color: var(--text-white);
}

.sensor-cta-text { flex: 1 1 380px; }

.sensor-cta h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.6rem;
    margin: 0 0 10px;
    color: var(--text-white);
}

.sensor-cta p { color: rgba(255, 255, 255, 0.92); line-height: 1.65; margin: 0; }
.sensor-cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn-lg { padding: 14px 26px; font-size: 0.98rem; }
.btn-whatsapp { background: #25D366; color: #fff; border: none; }
.btn-whatsapp:hover { background: #1DA851; color: #fff; }

.sensor-cta .btn-primary { background: var(--bg-white); color: var(--primary-dark); border: none; }
.sensor-cta .btn-primary:hover { background: var(--neutral-light); color: var(--primary-darker); }
.sensor-cta .btn-outline { border: 2px solid rgba(255, 255, 255, 0.6); color: #fff; }
.sensor-cta .btn-outline:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }

.sensor-hero-actions .btn-outline {
    border: 2px solid var(--border-color);
    color: var(--text-body);
}

.sensor-hero-actions .btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary-dark);
}

/* ---------- responsive ----------------------------------------------- */

@media (max-width: 900px) {
    .sensor-hero { grid-template-columns: 1fr; gap: 28px; padding: 28px; }
    .sensor-hero-media { position: static; }
    .sensor-hero-img { height: 320px; }
    .sensor-section, .ecosystem-band, .hub-hero, .sensor-cta { padding: 28px 22px; }
}

@media (max-width: 600px) {
    .sensor-page { padding-top: 90px; }
    .sensor-section h2 { font-size: 1.3rem; }
    .sensor-hero-actions .btn, .sensor-cta-actions .btn { width: 100%; justify-content: center; }
}

@media print {
    .ecosystem-band, .sensor-cta, .sibling-grid, header, .footer { display: none; }
    .sensor-section { border: none; box-shadow: none; page-break-inside: avoid; }
}

/* ---------- documentation cards -------------------------------------- */

.doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.doc-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 22px 24px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.doc-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.doc-card > i { color: #D33; font-size: 1.6rem; margin-bottom: 6px; }
.doc-label { font-weight: 700; color: var(--text-dark); font-size: 1.02rem; }
.doc-desc { font-size: 0.88rem; color: var(--text-body); line-height: 1.55; }

.doc-link {
    margin-top: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.doc-link i { font-size: 0.75rem; margin-left: 4px; }
