:root {
    --ink: #111827;
    --muted: #667085;
    --subtle: #8a94a6;
    --line: #e5e7eb;
    --soft-line: #eef2f6;
    --soft: #f7f9fc;
    --paper: #ffffff;
    --brand: #ee4d2d;
    --brand-dark: #d63f21;
    --teal: #0f766e;
    --blue: #2563eb;
    --slate: #334155;
    --shadow: 0 12px 32px rgba(17, 24, 39, .08);
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--ink);
    background: #f7f9fc;
}

a {
    color: inherit;
}

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

button,
input {
    font: inherit;
}

.public-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 64px;
    padding: 10px clamp(16px, 4%, 48px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid rgba(229, 231, 235, .92);
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(14px);
}

.public-brand {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 900;
}

.public-brand span {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: inline-grid;
    place-items: center;
    color: #fff;
    background: var(--brand);
    letter-spacing: 0;
}

.public-brand strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.public-nav {
    display: flex;
    gap: 6px;
    align-items: center;
}

.public-nav a {
    min-height: 38px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.public-nav a:hover,
.public-nav a.active {
    color: var(--ink);
    background: #f1f5f9;
}

.public-hero,
.landing-hero,
.category-band,
.product-section,
.landing-detail,
.gallery-section,
.final-cta,
.not-found {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.public-hero {
    padding: 50px 0 26px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
    gap: 28px;
    align-items: stretch;
}

.hero-copy {
    min-width: 0;
    padding: 28px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-copy h1,
.landing-copy h1 {
    margin: 10px 0 14px;
    max-width: 720px;
    font-size: 48px;
    line-height: 1.05;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.hero-copy p,
.landing-subtitle {
    margin: 0;
    max-width: 660px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.65;
}

.eyebrow,
.landing-badge,
.card-kicker {
    color: var(--teal);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0;
}

.hero-stats {
    width: min(560px, 100%);
    margin-top: 22px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: var(--paper);
}

.hero-stats div {
    min-width: 0;
    padding: 14px;
    border-right: 1px solid var(--line);
}

.hero-stats div:last-child {
    border-right: 0;
}

.hero-stats strong,
.hero-stats span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hero-stats strong {
    font-size: 20px;
    line-height: 1.15;
}

.hero-stats span {
    margin-top: 3px;
    color: var(--subtle);
    font-size: 12px;
    font-weight: 800;
}

.search-panel {
    align-self: center;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    box-shadow: var(--shadow);
}

.search-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.search-panel-head > span:last-child {
    min-height: 30px;
    padding: 7px 10px;
    border-radius: 8px;
    color: var(--blue);
    background: #eff6ff;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.search-panel label {
    display: block;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
}

.search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.search-row input {
    min-width: 0;
    height: 48px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 14px;
    color: var(--ink);
    background: #fbfcfe;
    outline: none;
}

.search-row input:focus {
    border-color: var(--brand);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(238, 77, 45, .12);
}

.search-row button,
.cta-primary,
.cta-secondary {
    min-height: 48px;
    border: 0;
    border-radius: 8px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

.search-row button,
.cta-primary {
    color: #fff;
    background: var(--brand);
}

.search-row button:hover,
.cta-primary:hover {
    background: var(--brand-dark);
}

.cta-secondary {
    color: var(--ink);
    background: #eef2f7;
}

.cta-secondary:hover {
    background: #e2e8f0;
}

.clear-filter {
    display: inline-flex;
    margin-top: 14px;
    color: var(--brand);
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
}

.category-band,
.product-section,
.gallery-section,
.final-cta {
    padding: 26px 0;
}

.section-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: end;
    margin-bottom: 16px;
}

.section-head h2 {
    margin: 5px 0 0;
    font-size: 30px;
    line-height: 1.12;
    letter-spacing: 0;
}

.section-head p {
    margin: 0;
    color: var(--muted);
    font-weight: 900;
    white-space: nowrap;
}

.category-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.category-list a {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--slate);
    background: var(--paper);
    text-decoration: none;
    font-size: 13px;
    font-weight: 900;
}

.category-list a.active,
.category-list a:hover {
    border-color: rgba(15, 118, 110, .28);
    background: #ecfdf5;
    color: var(--teal);
}

.category-list span {
    color: var(--subtle);
}

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

.public-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.public-card:hover {
    transform: translateY(-2px);
    border-color: #d7dde6;
    box-shadow: var(--shadow);
}

.card-image {
    position: relative;
    display: block;
    aspect-ratio: 1;
    background: #edf1f6;
    overflow: hidden;
}

.card-image img,
.card-image video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-video {
    display: block;
}

.media-badge {
    position: absolute;
    left: 10px;
    bottom: 10px;
    min-height: 28px;
    padding: 7px 9px;
    border-radius: 8px;
    color: #fff;
    background: rgba(17, 24, 39, .82);
    font-size: 12px;
    font-weight: 900;
}

.public-card-body {
    padding: 14px;
}

.public-card h3 {
    min-height: 68px;
    margin: 7px 0 9px;
    font-size: 16px;
    line-height: 1.35;
    letter-spacing: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.public-card h3 a,
.text-link {
    text-decoration: none;
}

.public-card p {
    min-height: 64px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.52;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-link {
    min-height: 36px;
    padding: 8px 10px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    color: var(--brand);
    background: #fff4f1;
    font-size: 13px;
    font-weight: 900;
}

.text-link:hover {
    color: #fff;
    background: var(--brand);
}

.public-empty {
    padding: 28px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    color: var(--muted);
    background: var(--paper);
    text-align: center;
    font-weight: 800;
}

.public-pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 24px;
}

.public-pagination a {
    min-width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    text-decoration: none;
    font-weight: 900;
}

.public-pagination a.active {
    color: #fff;
    border-color: var(--brand);
    background: var(--brand);
}

.landing-hero {
    min-height: calc(100vh - 64px);
    padding: 34px 0 42px;
    display: grid;
    grid-template-columns: minmax(320px, .9fr) minmax(0, 1.1fr);
    gap: 34px;
    align-items: center;
}

.landing-media {
    min-height: 500px;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: #edf1f6;
    box-shadow: var(--shadow);
}

.landing-media img,
.landing-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.landing-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 22px;
}

.landing-detail {
    padding: 42px 0;
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(300px, .72fr);
    gap: 28px;
    align-items: start;
}

.detail-copy h2,
.final-cta h2 {
    margin: 8px 0 14px;
    font-size: 38px;
    line-height: 1.08;
    letter-spacing: 0;
}

.detail-copy p,
.final-cta p {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.75;
}

.benefit-list {
    display: grid;
    gap: 12px;
}

.benefit-item {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
}

.benefit-item span {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #ecfdf5;
    position: relative;
}

.benefit-item span::after {
    content: "";
    position: absolute;
    inset: 8px 7px;
    border-right: 3px solid var(--teal);
    border-bottom: 3px solid var(--teal);
    transform: rotate(45deg);
}

.benefit-item p {
    margin: 0;
    color: var(--ink);
    font-weight: 800;
    line-height: 1.45;
}

.landing-gallery {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.landing-gallery img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #edf1f6;
}

.final-cta {
    margin-bottom: 64px;
    padding: 34px;
    border-radius: 8px;
    background: #111827;
    color: #fff;
}

.final-cta p {
    margin-top: 14px;
    color: rgba(255, 255, 255, .74);
}

.final-cta-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.final-cta-actions .cta-secondary {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .20);
    background: rgba(255, 255, 255, .12);
}

.sticky-cta {
    position: fixed;
    z-index: 30;
    left: 50%;
    bottom: 14px;
    width: min(620px, calc(100% - 28px));
    transform: translateX(-50%);
    min-height: 58px;
    padding: 8px 8px 8px 14px;
    border: 1px solid rgba(229, 231, 235, .95);
    border-radius: 8px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    background: rgba(255, 255, 255, .96);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.sticky-cta span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 900;
}

.sticky-cta a {
    min-height: 42px;
    padding: 0 14px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    color: #fff;
    background: var(--brand);
    font-weight: 900;
    text-decoration: none;
}

.template-story .landing-hero {
    grid-template-columns: minmax(0, 1fr) minmax(340px, .84fr);
}

.template-story .landing-media {
    order: 2;
}

.template-story .landing-copy {
    order: 1;
}

.template-compact .landing-hero {
    min-height: 620px;
    grid-template-columns: minmax(280px, .64fr) minmax(0, 1fr);
}

.template-compact .landing-media {
    min-height: 430px;
}

.public-footer {
    width: min(1180px, calc(100% - 32px));
    margin: 16px auto 34px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
}

.landing-page .public-footer {
    margin-bottom: 104px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.footer-inner > div {
    display: grid;
    gap: 5px;
}

.footer-inner strong {
    color: var(--ink);
    font-size: 14px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px 14px;
}

.footer-links a {
    color: var(--muted);
    font-weight: 800;
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--brand);
}

.static-page {
    width: min(860px, calc(100% - 32px));
    min-height: calc(100vh - 210px);
    margin: 0 auto;
    padding: 50px 0 42px;
}

.static-content {
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    box-shadow: var(--shadow);
}

.static-content h1 {
    margin: 8px 0 18px;
    font-size: 42px;
    line-height: 1.08;
    letter-spacing: 0;
}

.static-content p {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.75;
}

.static-content p:last-child {
    margin-bottom: 0;
}

.static-content a {
    color: var(--brand);
    font-weight: 900;
}

.not-found {
    min-height: calc(100vh - 64px);
    display: grid;
    place-items: center;
    align-content: center;
    text-align: center;
}

.not-found h1 {
    margin: 0 0 10px;
    font-size: 44px;
    line-height: 1.08;
    letter-spacing: 0;
}

.not-found p {
    margin: 0 0 20px;
    color: var(--muted);
}

@media (max-width: 900px) {
    .public-hero,
    .landing-hero,
    .landing-detail,
    .template-story .landing-hero,
    .template-compact .landing-hero {
        grid-template-columns: 1fr;
    }

    .public-hero {
        padding-top: 34px;
    }

    .hero-copy {
        padding: 10px 0 0;
    }

    .landing-media,
    .template-compact .landing-media {
        min-height: auto;
        aspect-ratio: 4 / 3;
    }

    .template-story .landing-media,
    .template-story .landing-copy {
        order: initial;
    }

    .landing-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .public-topbar {
        padding: 10px 12px;
        gap: 8px;
    }

    .public-brand span {
        width: 36px;
        height: 36px;
    }

    .public-nav {
        min-width: 0;
        overflow-x: auto;
        justify-content: flex-end;
        gap: 4px;
        scrollbar-width: none;
    }

    .public-nav::-webkit-scrollbar {
        display: none;
    }

    .public-nav a {
        min-height: 34px;
        padding: 8px 9px;
        font-size: 13px;
    }

    .public-hero,
    .landing-hero,
    .category-band,
    .product-section,
    .landing-detail,
    .gallery-section,
    .final-cta,
    .not-found,
    .public-footer,
    .static-page {
        width: min(1180px, calc(100% - 24px));
    }

    .public-hero {
        padding-top: 24px;
        gap: 18px;
    }

    .hero-copy h1,
    .landing-copy h1 {
        font-size: 34px;
        line-height: 1.08;
    }

    .hero-copy p,
    .landing-subtitle {
        font-size: 15px;
    }

    .hero-stats div {
        padding: 12px 10px;
    }

    .hero-stats strong {
        font-size: 17px;
    }

    .search-panel {
        padding: 16px;
    }

    .search-row {
        grid-template-columns: 1fr;
    }

    .search-row button,
    .cta-primary,
    .cta-secondary {
        width: 100%;
    }

    .section-head,
    .product-head {
        display: block;
    }

    .section-head h2 {
        font-size: 24px;
    }

    .section-head p {
        margin-top: 6px;
    }

    .category-list {
        margin: 0 -12px;
        padding: 0 12px 4px;
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
    }

    .category-list::-webkit-scrollbar {
        display: none;
    }

    .category-list a {
        flex: 0 0 auto;
    }

    .public-grid {
        grid-template-columns: 1fr;
    }

    .public-card {
        display: grid;
        grid-template-columns: 112px minmax(0, 1fr);
    }

    .card-image {
        height: 100%;
        min-height: 164px;
        aspect-ratio: auto;
    }

    .public-card h3,
    .public-card p {
        min-height: 0;
    }

    .public-card h3 {
        font-size: 15px;
        -webkit-line-clamp: 3;
    }

    .public-card p {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }

    .landing-hero {
        min-height: 0;
        padding-top: 22px;
        gap: 20px;
    }

    .landing-actions,
    .final-cta-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .landing-detail,
    .gallery-section,
    .final-cta {
        padding-top: 26px;
        padding-bottom: 26px;
    }

    .detail-copy h2,
    .final-cta h2,
    .static-content h1,
    .not-found h1 {
        font-size: 30px;
    }

    .final-cta,
    .static-content {
        padding-left: 18px;
        padding-right: 18px;
    }

    .sticky-cta {
        bottom: 10px;
    }

    .footer-inner {
        display: grid;
    }

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 420px) {
    .public-brand strong {
        display: none;
    }

    .public-card {
        grid-template-columns: 100px minmax(0, 1fr);
    }

    .card-image {
        min-height: 156px;
    }
}
