:root {
    --sv-primary: #0b5ed7;
    --sv-secondary: #38bdf8;
    --sv-accent: #14b8a6;
    --sv-ink: #102033;
    --sv-muted: #64748b;
    --sv-line: #dbe4ef;
    --sv-bg: #f4f8fc;
}

* { box-sizing: border-box; }
body { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--sv-ink); }
.btn { border-radius: 8px; font-weight: 650; }
.form-control, .form-select { border-radius: 8px; border-color: var(--sv-line); }
.form-control:focus, .form-select:focus { border-color: var(--sv-secondary); box-shadow: 0 0 0 .2rem rgba(56, 189, 248, .18); }
.brand-lockup { display: inline-flex; align-items: center; gap: .75rem; text-decoration: none; color: inherit; }
.brand-lockup small { display: block; color: var(--sv-muted); font-size: .75rem; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; color: #fff; background: var(--sv-primary); border-radius: 8px; font-weight: 800; letter-spacing: 0; }
.kicker { color: var(--sv-secondary); font-size: .78rem; text-transform: uppercase; font-weight: 800; letter-spacing: .08em; }

.login-body { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, #e8f6ff, #f7fbff 50%, #eef4f9); }
.login-panel { width: min(460px, calc(100% - 32px)); }
.login-card { background: #fff; border: 1px solid var(--sv-line); border-radius: 8px; padding: 32px; box-shadow: 0 22px 60px rgba(15, 47, 86, .12); }
.login-card h1 { font-size: 1.8rem; margin-bottom: .5rem; }

.admin-body { background: var(--sv-bg); }
.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 280px 1fr; }
.admin-sidebar { position: sticky; top: 0; height: 100vh; background: #071a2d; color: #dceafe; padding: 22px; }
.admin-sidebar .brand-lockup { color: #fff; margin-bottom: 28px; }
.admin-sidebar .brand-mark { background: var(--sv-secondary); color: #06203a; }
.admin-nav { display: grid; gap: 4px; }
.admin-nav a { color: #dceafe; text-decoration: none; padding: 11px 12px; border-radius: 8px; display: flex; align-items: center; gap: .7rem; }
.admin-nav a:hover { background: rgba(255,255,255,.09); }
.admin-main { min-width: 0; }
.admin-topbar { padding: 26px 32px; display: flex; justify-content: space-between; gap: 16px; align-items: center; background: rgba(255,255,255,.82); border-bottom: 1px solid var(--sv-line); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 10; }
.admin-topbar h1 { font-size: 1.65rem; margin: 0; }
.admin-content { padding: 28px 32px 48px; }
.panel { background: #fff; border: 1px solid var(--sv-line); border-radius: 8px; padding: 22px; box-shadow: 0 14px 32px rgba(15, 47, 86, .06); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.panel-heading h2 { font-size: 1.08rem; margin: 0; }
.advanced-box { background: #f8fbfe; border: 1px dashed var(--sv-line); border-radius: 8px; padding: 16px; }
.stat-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.stat-card { background: #fff; border: 1px solid var(--sv-line); border-radius: 8px; padding: 18px; display: grid; gap: 4px; }
.stat-card i { color: var(--sv-primary); font-size: 1.35rem; }
.stat-card span { color: var(--sv-muted); font-size: .88rem; }
.stat-card strong { font-size: 1.8rem; }
.quick-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.suggest-box { position: relative; }
.suggest-menu { position: absolute; z-index: 20; right: 0; top: 0; width: min(420px, 100%); background: #fff; border: 1px solid var(--sv-line); border-radius: 8px; box-shadow: 0 18px 38px rgba(15,47,86,.14); overflow: hidden; }
.suggest-menu button { width: 100%; border: 0; background: #fff; text-align: left; padding: 10px 12px; }
.suggest-menu button:hover { background: #eef7ff; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-row .btn { border-radius: 999px; }
.dynamic-table input { min-width: 110px; border: 0; width: 100%; background: transparent; }
.dynamic-table th { background: #eef7ff; min-width: 150px; }
.table-tools { display: flex; gap: 4px; align-items: center; }
.table-tools button { width: 28px; height: 28px; padding: 0; }
.media-preview-empty { min-height: 260px; display: grid; place-items: center; color: var(--sv-muted); border: 1px dashed var(--sv-line); border-radius: 8px; }
.media-preview-empty img { max-width: 100%; max-height: 360px; border-radius: 8px; }

.catalog-body { background: #fff; }
.catalog-nav { border-bottom: 1px solid var(--sv-line); background: rgba(255,255,255,.9); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 50; }
.catalog-hero { min-height: 560px; display: flex; align-items: center; background: linear-gradient(135deg, #071a2d, #0b5ed7); color: #fff; background-size: cover; background-position: center; }
.hero-content { width: min(760px, 100%); padding: 88px 0 64px; }
.hero-content h1 { font-size: clamp(2.4rem, 5vw, 5rem); line-height: 1.02; margin: .6rem 0 1rem; letter-spacing: 0; }
.hero-content p { font-size: 1.15rem; color: #d8ecff; max-width: 680px; }
.search-panel { position: relative; margin-top: 28px; display: flex; align-items: center; gap: 12px; background: #fff; color: var(--sv-ink); border-radius: 8px; padding: 8px 16px; box-shadow: 0 24px 50px rgba(0,0,0,.18); }
.search-panel input { flex: 1; border: 0; outline: 0; padding: 12px 0; min-width: 0; }
.catalog-suggestions { position: absolute; left: 0; right: 0; top: calc(100% + 8px); background: #fff; color: var(--sv-ink); border-radius: 8px; box-shadow: 0 16px 34px rgba(0,0,0,.16); overflow: hidden; z-index: 20; }
.catalog-suggestions a { display: block; padding: 12px 16px; color: inherit; text-decoration: none; }
.catalog-suggestions a:hover { background: #eef7ff; }
.catalog-section { padding: 54px 12px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 24px; }
.section-heading h2 { margin: 0; font-size: 1.8rem; }
.category-grid, .product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.category-card, .product-card { border: 1px solid var(--sv-line); border-radius: 8px; background: #fff; overflow: hidden; min-width: 0; transition: transform .18s ease, box-shadow .18s ease; }
.category-card:hover, .product-card:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(15,47,86,.1); }
.category-card a, .product-card a { color: inherit; text-decoration: none; }
.category-media, .product-media { aspect-ratio: 16 / 10; background: #eaf5ff; display: grid; place-items: center; color: var(--sv-primary); font-weight: 800; }
.category-media img, .product-media img { width: 100%; height: 100%; object-fit: cover; }
.category-card .body, .product-card .body { padding: 16px; }
.product-card h3, .category-card h3 { font-size: 1.05rem; margin: 0 0 8px; }
.product-card p, .category-card p { color: var(--sv-muted); font-size: .92rem; min-height: 44px; }
.product-actions { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.product-label { display: inline-flex; width: fit-content; align-items: center; padding: 5px 9px; border-radius: 999px; background: #e8f6ff; color: var(--sv-primary); font-weight: 750; font-size: .78rem; }
.catalog-band { background: #f5f9fd; padding: 54px 0; }
.filter-panel { background: #fff; border: 1px solid var(--sv-line); border-radius: 8px; padding: 16px; position: sticky; top: 92px; }
.filter-panel h3 { font-size: 1rem; }
.sub-hero { background: #08223c; color: #fff; padding: 54px 0 46px; }
.sub-hero h1 { font-size: clamp(2rem, 4vw, 3.6rem); margin: 10px 0; }
.sub-hero p { color: #cae6ff; max-width: 720px; }
.breadcrumb { display: flex; gap: 10px; align-items: center; color: #b9dcfb; margin-bottom: 10px; }
.breadcrumb a { color: #fff; text-decoration: none; }
.breadcrumb span::before { content: "/"; margin-right: 10px; color: #73bdf3; }
.product-detail { padding: 44px 12px 70px; }
.gallery-main { border: 1px solid var(--sv-line); border-radius: 8px; overflow: hidden; background: #eef7ff; aspect-ratio: 4 / 3; display: grid; place-items: center; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.placeholder-visual { font-size: 3rem; font-weight: 900; color: var(--sv-primary); }
.gallery-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.gallery-strip button { width: 86px; height: 68px; border: 1px solid var(--sv-line); border-radius: 8px; overflow: hidden; padding: 0; background: #fff; }
.gallery-strip.large button { width: 144px; height: 104px; }
.gallery-strip img { width: 100%; height: 100%; object-fit: cover; }
.detail-tabs { gap: 8px; margin-bottom: 18px; }
.detail-tabs .nav-link { border-radius: 999px; color: var(--sv-ink); background: #f1f6fb; }
.detail-tabs .nav-link.active { background: var(--sv-primary); }
.detail-content { border: 1px solid var(--sv-line); border-radius: 8px; padding: 22px; }
.detail-content h3 { font-size: 1.05rem; margin-top: 18px; }
.price-line { display: inline-flex; margin-top: 12px; padding: 10px 14px; border-radius: 8px; background: #e8f6ff; color: var(--sv-primary); font-weight: 800; }
.technical-table th { cursor: pointer; white-space: nowrap; background: #eef7ff; }
.technical-table td { white-space: nowrap; }
.doc-link { display: flex; gap: 8px; align-items: center; padding: 12px; border: 1px solid var(--sv-line); border-radius: 8px; text-decoration: none; margin-bottom: 8px; }
.catalog-footer { background: #071a2d; color: #dceafe; padding: 24px 0; }

@media (max-width: 1100px) {
    .admin-shell { grid-template-columns: 1fr; }
    .admin-sidebar { position: static; height: auto; }
    .admin-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .category-grid, .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
    .admin-topbar, .panel-heading, .section-heading { align-items: stretch; flex-direction: column; }
    .admin-content, .admin-topbar { padding-left: 16px; padding-right: 16px; }
    .admin-nav { grid-template-columns: 1fr; }
    .category-grid, .product-grid, .stat-grid { grid-template-columns: 1fr; }
    .catalog-hero { min-height: 520px; }
    .hero-content { padding-top: 56px; }
    .search-panel { align-items: flex-start; }
}

/* Printed catalog inspired customer interface */
.catalog-body {
    background:
        linear-gradient(90deg, rgba(10, 34, 59, .05) 1px, transparent 1px),
        linear-gradient(#e8eef5, #f6f8fb);
    background-size: 28px 28px, auto;
}

.catalog-nav {
    background: rgba(245, 248, 252, .96);
    border-bottom: 1px solid #cdd9e6;
    box-shadow: 0 10px 28px rgba(16, 32, 51, .08);
}

.catalog-nav .container {
    max-width: 1340px;
}

.catalog-nav .brand-mark {
    border-radius: 2px;
    background: #08223c;
}

.catalog-issue {
    width: min(1340px, calc(100% - 32px));
    margin: 28px auto 64px;
}

.catalog-cover-spread,
.catalog-chapter-spread,
.catalog-product-spread {
    display: grid;
    grid-template-columns: minmax(360px, .92fr) minmax(420px, 1.08fr);
    gap: 24px;
    align-items: stretch;
    margin-bottom: 28px;
}

.catalog-cover-page,
.catalog-intro-page,
.catalog-page,
.chapter-image-page,
.chapter-title-page,
.product-sheet-cover,
.product-sheet-summary {
    position: relative;
    background: #fff;
    border: 1px solid #cfd9e5;
    box-shadow: 0 18px 44px rgba(20, 43, 70, .14);
    overflow: hidden;
}

.catalog-cover-page,
.chapter-image-page,
.product-sheet-cover {
    min-height: 700px;
}

.catalog-cover-page::before,
.chapter-image-page::before,
.product-sheet-cover::before,
.catalog-page::before {
    content: "";
    position: absolute;
    inset: 18px;
    border: 1px solid rgba(11, 94, 215, .18);
    pointer-events: none;
}

.catalog-cover-page img,
.chapter-image-page img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.catalog-cover-fallback {
    min-height: 700px;
    display: grid;
    place-items: center;
    background: #eaf4ff;
    color: var(--sv-primary);
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 900;
}

.catalog-intro-page,
.chapter-title-page,
.product-sheet-summary {
    min-height: 700px;
    padding: clamp(28px, 5vw, 64px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.catalog-intro-page {
    background:
        linear-gradient(90deg, #08223c 0 18px, transparent 18px),
        linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.catalog-page-number {
    align-self: flex-end;
    color: var(--sv-muted);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .12em;
}

.catalog-logo-print {
    max-width: 220px;
    max-height: 86px;
    object-fit: contain;
}

.catalog-title-block h1,
.chapter-title-page h1,
.product-sheet-summary h1 {
    margin: 10px 0 16px;
    color: #08223c;
    font-size: clamp(2.2rem, 4vw, 4.8rem);
    line-height: .98;
    font-weight: 900;
}

.catalog-title-block p,
.chapter-title-page p,
.lead-copy {
    color: #40566f;
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 680px;
}

.catalog-contact-strip {
    display: grid;
    gap: 8px;
    padding-top: 18px;
    border-top: 3px solid var(--sv-primary);
    color: #08223c;
    font-weight: 700;
}

.catalog-contact-strip span {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.catalog-search-card {
    background: #eef6ff;
    border-left: 6px solid var(--sv-primary);
    padding: 14px;
}

.search-panel {
    margin-top: 0;
    border: 1px solid #cdd9e6;
    box-shadow: none;
}

.catalog-page {
    margin-bottom: 28px;
    padding: clamp(24px, 4vw, 44px);
    min-height: 680px;
}

.catalog-section-label {
    width: fit-content;
    margin-bottom: 22px;
    padding: 7px 12px;
    background: #08223c;
    color: #fff;
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.catalog-heading {
    border-bottom: 4px solid #08223c;
    padding-bottom: 16px;
}

.catalog-heading h2 {
    color: #08223c;
    font-weight: 900;
    font-size: clamp(1.6rem, 3vw, 2.9rem);
}

.category-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.category-card {
    border-radius: 0;
    border: 1px solid #bdcddd;
    box-shadow: none;
}

.category-card:hover,
.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 30px rgba(15, 47, 86, .12);
}

.category-media {
    aspect-ratio: 3 / 4;
    background: #edf5fc;
}

.category-media img {
    object-fit: cover;
}

.category-card .body {
    min-height: 150px;
    border-top: 5px solid var(--sv-primary);
}

.category-card h3 {
    color: #08223c;
    font-weight: 900;
}

.catalog-products-layout {
    display: grid;
    grid-template-columns: 245px 1fr;
    gap: 22px;
}

.catalog-index-rail {
    position: relative;
}

.filter-panel {
    top: 88px;
    border-radius: 0;
    border: 1px solid #bdcddd;
    box-shadow: inset 8px 0 0 #08223c;
    background: #fbfdff;
}

.filter-panel h3 {
    color: #08223c;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.product-card {
    border-radius: 0;
    border: 1px solid #bdcddd;
    box-shadow: none;
    position: relative;
}

.product-card::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 12px;
    height: 1px;
    background: #cfd9e5;
}

.product-media {
    aspect-ratio: 1 / 1;
    background: #edf5fc;
}

.product-media img {
    object-fit: cover;
}

.product-card .body {
    padding: 18px 16px 22px;
}

.product-card h3 {
    color: #08223c;
    font-weight: 900;
    min-height: 48px;
}

.product-card p {
    min-height: 72px;
    line-height: 1.45;
}

.product-label {
    border-radius: 0;
    background: #08223c;
    color: #fff;
    letter-spacing: .04em;
}

.product-actions {
    align-items: stretch;
}

.product-actions .btn {
    border-radius: 0;
}

.chapter-title-page {
    background:
        linear-gradient(90deg, transparent 0 calc(100% - 18px), var(--sv-primary) calc(100% - 18px)),
        #fff;
}

.chapter-rule {
    height: 10px;
    width: 52%;
    background: var(--sv-secondary);
    margin-top: 28px;
}

.breadcrumb {
    color: #4d6680;
}

.breadcrumb a {
    color: #08223c;
    font-weight: 800;
}

.breadcrumb span::before {
    color: var(--sv-primary);
}

.catalog-product-spread {
    grid-template-columns: minmax(420px, .95fr) minmax(460px, 1.05fr);
}

.product-sheet-cover {
    padding: 28px;
    background: #f8fbff;
}

.sheet-corner-code {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    padding: 12px 18px;
    background: #08223c;
    color: #fff;
    font-weight: 900;
    letter-spacing: .08em;
}

.product-sheet-cover .gallery-main {
    margin-top: 32px;
    border-radius: 0;
    border: 1px solid #bdcddd;
    aspect-ratio: 4 / 4.5;
    background: #edf5fc;
}

.product-sheet-cover .gallery-main img {
    object-fit: cover;
}

.product-sheet-summary {
    background:
        linear-gradient(180deg, #fff 0%, #f5f9fd 100%);
}

.product-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid #bdcddd;
    border-bottom: 1px solid #bdcddd;
    margin: 28px 0;
}

.product-facts div {
    padding: 14px;
    border-right: 1px solid #bdcddd;
}

.product-facts div:last-child {
    border-right: 0;
}

.product-facts span {
    display: block;
    color: var(--sv-muted);
    font-size: .76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.product-facts strong {
    display: block;
    color: #08223c;
    margin-top: 6px;
}

.sheet-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sheet-actions .btn {
    border-radius: 0;
}

.technical-folio-page {
    background: #fff;
}

.detail-tabs {
    border-bottom: 1px solid #bdcddd;
    padding-bottom: 12px;
}

.detail-tabs .nav-link {
    border-radius: 0;
    background: #eef5fb;
    color: #08223c;
    font-weight: 800;
}

.detail-tabs .nav-link.active {
    background: #08223c;
}

.detail-content {
    border: 0;
    border-radius: 0;
    padding: 24px 0 0;
}

.folio-columns {
    columns: 2 320px;
    column-gap: 44px;
}

.folio-columns article {
    break-inside: avoid;
    margin-bottom: 18px;
}

.detail-content h3,
.technical-table-title h3 {
    color: #08223c;
    font-size: 1rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.technical-table-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.technical-table {
    border: 1px solid #aebfd0;
    font-size: .9rem;
}

.technical-table th {
    background: #08223c;
    color: #fff;
    border-color: #27425f;
    font-weight: 800;
}

.technical-table td {
    border-color: #c9d5e2;
}

.technical-table tbody tr:nth-child(even) {
    background: #f2f7fb;
}

.gallery-strip button {
    border-radius: 0;
}

.doc-link {
    border-radius: 0;
    background: #f8fbff;
    border-color: #bdcddd;
}

@media (max-width: 1180px) {
    .catalog-cover-spread,
    .catalog-chapter-spread,
    .catalog-product-spread,
    .catalog-products-layout {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 720px) {
    .catalog-issue {
        width: min(100% - 18px, 640px);
        margin-top: 12px;
    }

    .catalog-cover-page,
    .chapter-image-page,
    .product-sheet-cover,
    .catalog-intro-page,
    .chapter-title-page,
    .product-sheet-summary,
    .catalog-page {
        min-height: auto;
    }

    .catalog-intro-page,
    .chapter-title-page,
    .product-sheet-summary,
    .catalog-page,
    .product-sheet-cover {
        padding: 20px;
    }

    .category-grid,
    .product-grid,
    .product-facts {
        grid-template-columns: 1fr;
    }

    .product-facts div {
        border-right: 0;
        border-bottom: 1px solid #bdcddd;
    }

    .product-facts div:last-child {
        border-bottom: 0;
    }

    .catalog-cover-page img,
    .chapter-image-page img {
        aspect-ratio: 3 / 4;
    }
}
