/* Parenin – Caterpillar catalogue redesign (/dev-design pages only). All rules are scoped to .cd-* classes. */

.cd-page {
    --cd-yellow: #ffcd11;
    --cd-yellow-dark: #e0b400;
    --cd-ink: #1a1a1a;
    --cd-text: #33363a;
    --cd-muted: #5f6368;
    --cd-line: #e3e5e8;
    --cd-bg: #ffffff;
    --cd-bg-alt: #f5f6f7;
    --cd-radius: 8px;
    --cd-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 4px 14px rgba(0, 0, 0, .06);
    --cd-shadow-hover: 0 2px 4px rgba(0, 0, 0, .08), 0 10px 28px rgba(0, 0, 0, .12);
    --cd-gutter: 16px;
    background: var(--cd-bg);
}

.cd-main {
    font-family: "Open Sans", Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--cd-text);
    outline: none;
}
.cd-main *, .cd-main *::before, .cd-main *::after { box-sizing: border-box; }
.cd-main img { max-width: 100%; height: auto; }
.cd-main h1, .cd-main h2, .cd-main h3 { font-family: inherit; color: var(--cd-ink); letter-spacing: 0; text-transform: none; }

.cd-container { max-width: 1240px; margin: 0 auto; padding-left: var(--cd-gutter); padding-right: var(--cd-gutter); }
.cd-sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px; }

.cd-skip { position: absolute; left: 16px; top: -60px; z-index: 10000; background: var(--cd-ink); color: #fff; padding: 12px 16px; border-radius: var(--cd-radius); font-weight: 600; }
.cd-skip:focus { top: 16px; color: #fff; }

.cd-main a:focus-visible, .cd-main button:focus-visible, .cd-main input:focus-visible, .cd-main summary:focus-visible, .cd-sticky-cta a:focus-visible {
    outline: 3px solid var(--cd-yellow-dark);
    outline-offset: 2px;
}

/* ---------- Hero / breadcrumb ---------- */
.cd-hero { background: var(--cd-ink); color: #fff; padding: 24px 0 32px; border-bottom: 4px solid var(--cd-yellow); }
.cd-breadcrumb ol { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 0; font-size: 14px; }
.cd-breadcrumb li { color: #c9ccd1; }
.cd-breadcrumb li + li::before { content: "›"; margin: 0 8px; color: #8a8f96; }
.cd-breadcrumb a { color: #fff; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, .4); }
.cd-breadcrumb a:hover { text-decoration-color: var(--cd-yellow); color: #fff; }
.cd-breadcrumb [aria-current] { color: var(--cd-yellow); }
.cd-main .cd-title { color: #fff; font-size: 32px; line-height: 1.2; font-weight: 700; margin: 0; }
.cd-lead { margin: 8px 0 0; max-width: 760px; color: #d7d9dd; font-size: 17px; }

/* ---------- Sections ---------- */
.cd-section { padding: 48px 0; }
.cd-section--tight { padding: 32px 0; }
.cd-section--alt { background: var(--cd-bg-alt); }
.cd-main .cd-section-title { font-size: 24px; line-height: 1.25; font-weight: 700; margin: 0 0 24px; }
.cd-main .cd-section-title::after { content: ""; display: block; width: 48px; height: 4px; background: var(--cd-yellow); margin-top: 8px; border-radius: 2px; }
.cd-section-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px; }

/* ---------- Grid & cards ---------- */
.cd-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.cd-grid--2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.cd-grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.cd-grid--4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }

.cd-card { background: #fff; border: 1px solid var(--cd-line); border-radius: var(--cd-radius); box-shadow: var(--cd-shadow); overflow: hidden; transition: box-shadow .2s ease, transform .2s ease; }
.cd-card:hover { box-shadow: var(--cd-shadow-hover); transform: translateY(-2px); }
.cd-card[hidden] { display: none; }
.cd-card__link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.cd-card__link:hover, .cd-card__link:focus { color: inherit; text-decoration: none; }
.cd-card__media { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; background: #fff; padding: 12px; border-bottom: 1px solid var(--cd-line); }
.cd-card__media img { width: 100%; height: 100%; object-fit: contain; }
.cd-card__media--cover { padding: 0; }
.cd-card__media--cover img { object-fit: cover; }
.cd-card__placeholder { font-weight: 700; font-size: 28px; letter-spacing: 2px; color: #c4c7cc; }
.cd-card__body { display: flex; flex-direction: column; gap: 4px; padding: 16px; flex: 1; }
.cd-card__title { font-size: 18px; line-height: 1.3; font-weight: 700; color: var(--cd-ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cd-card__meta, .cd-card__text { font-size: 14px; color: var(--cd-muted); }
.cd-card__specs { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; font-size: 13px; color: var(--cd-text); }
.cd-card__specs b { font-weight: 600; color: var(--cd-muted); margin-right: 2px; }
.cd-card__cta { margin-top: auto; padding-top: 12px; font-size: 14px; font-weight: 700; color: var(--cd-ink); display: inline-flex; align-items: center; gap: 8px; }
.cd-card__cta::after { content: "→"; transition: transform .2s ease; }
.cd-card__link:hover .cd-card__cta { text-decoration: underline; text-decoration-color: var(--cd-yellow); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.cd-card__link:hover .cd-card__cta::after { transform: translateX(4px); }
.cd-card--category .cd-card__media { aspect-ratio: 1 / 1; }

/* ---------- Toolbar / filter ---------- */
.cd-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.cd-filter { position: relative; flex: 1 1 280px; max-width: 420px; margin: 0; font-weight: 400; }
.cd-filter svg { position: absolute; left: 12px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); fill: var(--cd-muted); }
.cd-filter input { width: 100%; height: 44px; padding: 0 12px 0 40px; border: 1px solid #c4c7cc; border-radius: var(--cd-radius); font-size: 16px; color: var(--cd-ink); background: #fff; }
.cd-filter input:focus { border-color: var(--cd-ink); }
.cd-count { margin: 0; font-size: 14px; color: var(--cd-muted); }
.cd-empty { padding: 24px; text-align: center; color: var(--cd-muted); background: var(--cd-bg-alt); border-radius: var(--cd-radius); grid-column: 1 / -1; }

/* ---------- Buttons ---------- */
.cd-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 20px; border-radius: var(--cd-radius); border: 2px solid transparent; font-size: 16px; font-weight: 700; line-height: 1.2; text-decoration: none; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.cd-btn:hover, .cd-btn:focus { text-decoration: none; }
.cd-btn--primary { background: var(--cd-yellow); color: var(--cd-ink); }
.cd-btn--primary:hover, .cd-btn--primary:focus { background: var(--cd-yellow-dark); color: var(--cd-ink); }
.cd-btn--ghost { background: #fff; color: var(--cd-ink); border-color: var(--cd-ink); }
.cd-btn--ghost:hover, .cd-btn--ghost:focus { background: var(--cd-ink); color: #fff; }
.cd-btn--block { display: flex; width: 100%; }
.cd-link { background: none; border: 0; padding: 0; font: inherit; color: var(--cd-ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ---------- Model page ---------- */
.cd-model { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 32px; align-items: start; }
.cd-gallery__main { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; background: #fff; border: 1px solid var(--cd-line); border-radius: var(--cd-radius); overflow: hidden; }
.cd-gallery__main img { width: 100%; height: 100%; object-fit: contain; }
.cd-gallery__thumbs { list-style: none; margin: 12px 0 0; padding: 0; display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; }
.cd-gallery__thumbs li { flex: 0 0 auto; scroll-snap-align: start; }
.cd-gallery__thumbs button { display: block; width: 88px; height: 66px; padding: 2px; background: #fff; border: 2px solid var(--cd-line); border-radius: 6px; cursor: pointer; }
.cd-gallery__thumbs button[aria-current="true"] { border-color: var(--cd-yellow-dark); }
.cd-gallery__thumbs img { width: 100%; height: 100%; object-fit: contain; }

.cd-summary { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 12px; padding: 24px; background: #fff; border: 1px solid var(--cd-line); border-radius: var(--cd-radius); box-shadow: var(--cd-shadow); }
.cd-summary__brand { margin: 0; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--cd-muted); }
.cd-summary__text { margin: 0; color: var(--cd-text); }
.cd-keyspecs { margin: 4px 0 8px; display: grid; gap: 0; border-top: 1px solid var(--cd-line); }
.cd-keyspecs div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--cd-line); }
.cd-keyspecs dt { font-weight: 400; color: var(--cd-muted); }
.cd-keyspecs dd { margin: 0; font-weight: 700; color: var(--cd-ink); text-align: right; }
.cd-summary__links { display: flex; flex-wrap: wrap; gap: 8px 16px; padding-top: 4px; font-size: 14px; }
.cd-summary__links a { color: var(--cd-ink); text-decoration: underline; text-underline-offset: 3px; }

.cd-subnav { position: sticky; top: 0; z-index: 50; background: #fff; border-top: 1px solid var(--cd-line); border-bottom: 1px solid var(--cd-line); }
.cd-subnav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.cd-subnav ul::-webkit-scrollbar { display: none; }
.cd-subnav a { display: block; padding: 14px 16px; white-space: nowrap; font-size: 15px; font-weight: 600; color: var(--cd-text); text-decoration: none; border-bottom: 3px solid transparent; }
.cd-subnav a:hover, .cd-subnav a[aria-current="true"] { color: var(--cd-ink); border-bottom-color: var(--cd-yellow); }
.cd-main [id] { scroll-margin-top: 64px; }

.cd-prose { max-width: 860px; }
.cd-prose p { font-size: 17px; line-height: 1.7; margin: 0; }

.cd-usp { background: #fff; border-radius: var(--cd-radius); padding: 24px; border-left: 4px solid var(--cd-yellow); box-shadow: var(--cd-shadow); }
.cd-usp__figure { margin: 0 0 8px; font-size: 36px; line-height: 1; font-weight: 700; color: var(--cd-ink); }
.cd-usp__figure small { display: block; font-size: 13px; font-weight: 700; letter-spacing: .06em; color: var(--cd-muted); margin-bottom: 4px; }
.cd-main .cd-usp__title { font-size: 16px; font-weight: 700; margin: 0 0 8px; text-transform: none; }
.cd-usp__text { font-size: 15px; color: var(--cd-text); }

.cd-feature { background: #fff; border: 1px solid var(--cd-line); border-radius: var(--cd-radius); overflow: hidden; display: flex; flex-direction: column; }
.cd-feature[hidden] { display: none; }
.cd-feature__media { aspect-ratio: 4 / 3; background: var(--cd-bg-alt); }
.cd-feature__media img { width: 100%; height: 100%; object-fit: cover; }
.cd-main .cd-feature__title { font-size: 17px; font-weight: 700; margin: 16px 16px 8px; }
.cd-feature__details { margin: 0 16px 16px; font-size: 15px; }
.cd-feature__details summary { cursor: pointer; font-weight: 600; color: var(--cd-ink); text-decoration: underline; text-underline-offset: 3px; }
.cd-feature__details[open] summary { margin-bottom: 8px; }
.cd-feature__details ul { padding-left: 20px; }
.cd-more { margin: 24px auto 0; display: flex; }

.cd-units { display: inline-flex; border: 2px solid var(--cd-ink); border-radius: var(--cd-radius); overflow: hidden; margin: 0; padding: 0; min-width: 0; }
.cd-units label { margin: 0; cursor: pointer; font-weight: 600; font-size: 14px; }
.cd-units input { position: absolute; opacity: 0; }
.cd-units label { padding: 10px 16px; }
.cd-units label:has(input:checked) { background: var(--cd-ink); color: #fff; }
.cd-units label:has(input:focus-visible) { outline: 3px solid var(--cd-yellow-dark); outline-offset: -3px; }
.cd-specs[data-units="metric"] .cd-u-imperial, .cd-specs[data-units="imperial"] .cd-u-metric { display: none; }

.cd-accordion { background: #fff; border: 1px solid var(--cd-line); border-radius: var(--cd-radius); margin-bottom: 8px; }
.cd-accordion summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 16px; font-weight: 700; color: var(--cd-ink); min-height: 48px; }
.cd-accordion summary::-webkit-details-marker { display: none; }
.cd-accordion summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--cd-muted); }
.cd-accordion[open] summary::after { content: "−"; }
.cd-accordion summary span { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--cd-muted); background: var(--cd-bg-alt); border-radius: 999px; padding: 2px 10px; }
.cd-table-wrap { overflow-x: auto; border-top: 1px solid var(--cd-line); }
.cd-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.cd-table th, .cd-table td { padding: 12px 16px; border-bottom: 1px solid var(--cd-line); vertical-align: top; text-align: left; }
.cd-table tr:last-child th, .cd-table tr:last-child td { border-bottom: 0; }
.cd-table th { font-weight: 400; color: var(--cd-muted); width: 55%; }
.cd-table td { font-weight: 600; color: var(--cd-ink); }
.cd-table tr:nth-child(even) { background: #fafafb; }

.cd-equipment { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 24px; }
.cd-main .cd-equipment__title { font-size: 18px; font-weight: 700; margin: 0 0 12px; }
.cd-list { margin: 0; padding: 0 16px 16px 36px; font-size: 15px; }
.cd-list li { margin-bottom: 6px; }

.cd-video { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: var(--cd-radius); overflow: hidden; background: #000; cursor: pointer; aspect-ratio: 16 / 9; }
.cd-video img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.cd-video__play { position: absolute; left: 50%; top: 50%; width: 68px; height: 48px; transform: translate(-50%, -50%); background: var(--cd-yellow); border-radius: 12px; }
.cd-video__play::after { content: ""; position: absolute; left: 28px; top: 14px; border-style: solid; border-width: 10px 0 10px 16px; border-color: transparent transparent transparent var(--cd-ink); }
.cd-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.cd-video__title { margin: 8px 0 0; font-weight: 600; }

.cd-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cd-chips a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border: 1px solid #c4c7cc; border-radius: 999px; color: var(--cd-ink); font-weight: 600; text-decoration: none; }
.cd-chips a:hover { border-color: var(--cd-ink); background: var(--cd-bg-alt); }

.cd-sticky-cta { display: none; }

.cd-modal .modal-title { font-size: 20px; font-weight: 700; }
.cd-modal__intro { margin-top: 0; }
.cd-modal__done { font-weight: 700; color: #1e7b34; }

/* ---------- Help strip & see also ---------- */
.cd-help { background: var(--cd-bg-alt); padding: 48px 0; border-top: 1px solid var(--cd-line); }
.cd-search { display: flex; gap: 8px; max-width: 640px; margin-bottom: 32px; }
.cd-search input { flex: 1; min-width: 0; height: 48px; padding: 0 16px; border: 1px solid #c4c7cc; border-radius: var(--cd-radius); font-size: 16px; }
.cd-help-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.cd-help-links a { display: flex; align-items: center; gap: 12px; height: 100%; padding: 16px; background: #fff; border: 1px solid var(--cd-line); border-radius: var(--cd-radius); color: var(--cd-ink); text-decoration: none; }
.cd-help-links a:hover { border-color: var(--cd-ink); text-decoration: none; color: var(--cd-ink); }
.cd-help-links svg { flex: 0 0 40px; width: 40px; height: 40px; padding: 8px; border-radius: 50%; background: var(--cd-yellow); fill: var(--cd-ink); }
.cd-help-links span { display: flex; flex-direction: column; font-size: 14px; color: var(--cd-muted); }
.cd-help-links strong { font-size: 16px; color: var(--cd-ink); }
.cd-see-also { padding: 48px 0; }
.cd-card--wide .cd-card__media { aspect-ratio: 16 / 9; }

.cd-popup-form { display: flex; justify-content: space-between; }
.cd-popup-form input { font-size: 20px; }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    .cd-model { grid-template-columns: 1fr; }
    .cd-summary { position: static; }
}

@media (max-width: 767px) {
    .cd-hero { padding: 16px 0 24px; }
    .cd-main .cd-title { font-size: 28px; }
    .cd-lead { font-size: 16px; }
    .cd-section, .cd-help, .cd-see-also { padding: 32px 0; }
    .cd-section--tight { padding: 16px 0; }
    .cd-main .cd-section-title { font-size: 22px; margin-bottom: 16px; }
    .cd-grid { gap: 16px; }
    .cd-search { flex-direction: column; }
    .cd-table th, .cd-table td { padding: 10px 12px; font-size: 14px; }
    .cd-table th { width: 50%; }

    .cd-sticky-cta {
        display: flex; align-items: center; justify-content: space-between; gap: 12px;
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 900;
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
        background: #fff; border-top: 1px solid var(--cd-line); box-shadow: 0 -4px 16px rgba(0, 0, 0, .08);
        font-family: "Open Sans", Arial, sans-serif;
    }
    .cd-sticky-cta span { font-weight: 700; color: var(--cd-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .cd-sticky-cta .cd-btn { flex: 0 0 auto; min-height: 44px; padding: 10px 16px; font-size: 15px; }
    .cd-page:has(.cd-sticky-cta) { padding-bottom: 72px; }
}

@media (max-width: 480px) {
    .cd-grid--4 { grid-template-columns: 1fr 1fr; gap: 12px; }
    .cd-grid--4 .cd-card__body { padding: 12px; }
    .cd-grid--4 .cd-card__title { font-size: 15px; }
    .cd-grid--4 .cd-card__meta, .cd-grid--4 .cd-card__cta { font-size: 13px; }
    .cd-card--category .cd-card__text { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .cd-card, .cd-card__cta::after { transition: none; }
    .cd-card:hover { transform: none; }
    .cd-main [id] { scroll-behavior: auto; }
}

@media print {
    .cd-subnav, .cd-sticky-cta, .cd-help, .cd-see-also, .cd-summary .cd-btn, .cd-summary__links, .cd-gallery__thumbs { display: none !important; }
    .cd-hero { background: none; color: #000; border: 0; }
    .cd-main .cd-title, .cd-lead, .cd-breadcrumb li, .cd-breadcrumb a { color: #000; }
    .cd-model { grid-template-columns: 1fr 1fr; }
    .cd-accordion { break-inside: avoid; }
    .cd-accordion:not([open]) > *:not(summary) { display: block; }
}
