/* A.S Instruments & Control Systems - site styles
   Palette and fonts follow the existing brand: navy header/footer, royal blue actions, cyan accents. */

:root {
    --navy-900: #050c18;
    --navy-800: #071527;
    --navy-700: #0f2744;
    --royal: #1d4ed8;
    --royal-hover: #1e40af;
    --cyan: #0284c7;
    --cyan-light: #38bdf8;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
    --surface: #ffffff;
    --surface-alt: #f8fafc;
    --danger: #b91c1c;
    --danger-bg: #fef2f2;
    --success: #047857;
    --success-bg: #ecfdf5;
    --radius: 12px;
    --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 4px 16px rgba(15, 23, 42, 0.06);
    --font-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-display: 'Outfit', var(--font-body);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--surface-alt);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

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

a {
    color: var(--royal);
}

a:hover {
    color: var(--royal-hover);
}

h1, h2, h3 {
    font-family: var(--font-display);
    line-height: 1.2;
    margin: 0 0 0.5em;
    color: var(--navy-800);
}

h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); }
h3 { font-size: 1.15rem; }

p {
    margin: 0 0 1em;
}

:focus-visible {
    outline: 3px solid var(--cyan-light);
    outline-offset: 2px;
}

.container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 8px;
    background: var(--royal);
    color: #fff;
    padding: 8px 14px;
    border-radius: 8px;
    z-index: 100;
}

.skip-link:focus {
    left: 12px;
}

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.mono { font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; font-size: 0.92em; }
.req { color: var(--danger); }

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 20px;
    border-radius: 9px;
    border: 1px solid transparent;
    font: inherit;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
    white-space: nowrap;
}

.btn-primary {
    background: var(--royal);
    color: #fff;
    box-shadow: 0 4px 14px rgba(29, 78, 216, 0.25);
}

.btn-primary:hover {
    background: var(--royal-hover);
    color: #fff;
}

.btn-light {
    background: #fff;
    color: var(--navy-800);
}

.btn-light:hover {
    background: var(--surface-alt);
    color: var(--navy-800);
}

.btn-outline {
    background: #fff;
    color: var(--navy-800);
    border-color: var(--border);
}

.btn-outline:hover {
    border-color: var(--royal);
    color: var(--royal);
}

.btn-outline-light {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.35);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    background: #991b1b;
    color: #fff;
}

.btn-sm {
    padding: 7px 12px;
    font-size: 0.85rem;
}

.btn-block {
    width: 100%;
}

.text-link {
    font-weight: 700;
    text-decoration: none;
}

.text-link:hover {
    text-decoration: underline;
}

/* ---------- Public header / footer ---------- */

.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--navy-800);
}

.brand-logo {
    height: 46px;
    width: auto;
    object-fit: contain;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-text strong {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.brand-text small {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--royal);
}

.site-nav {
    display: flex;
    gap: 6px;
}

.site-nav a {
    padding: 9px 14px;
    border-radius: 8px;
    font-weight: 700;
    color: var(--navy-800);
    text-decoration: none;
}

.site-nav a:hover {
    background: var(--surface-alt);
    color: var(--royal);
}

.site-nav a[aria-current="page"] {
    color: var(--royal);
    background: #eff6ff;
}

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    width: 44px;
    height: 44px;
    padding: 0;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--navy-800);
    border-radius: 2px;
}

.site-footer {
    background: var(--navy-800);
    color: #cbd5e1;
    margin-top: 64px;
    padding-top: 48px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 0.8fr;
    gap: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand {
    font-family: var(--font-display);
    font-weight: 800;
    color: #fff;
    font-size: 1.1rem;
}

.footer-heading {
    font-family: var(--font-display);
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.footer-muted {
    color: #94a3b8;
    font-size: 0.92rem;
    margin-bottom: 8px;
}

.site-footer a {
    color: #e2e8f0;
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--cyan-light);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 20px;
    padding-bottom: 24px;
    font-size: 0.85rem;
    color: #94a3b8;
}

/* ---------- Flash messages ---------- */

.flash-container:empty {
    display: none;
}

.flash-container {
    padding-top: 16px;
}

.flash {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.flash-success {
    background: var(--success-bg);
    border-color: #a7f3d0;
    color: var(--success);
}

.flash-error {
    background: var(--danger-bg);
    border-color: #fecaca;
    color: var(--danger);
}

.flash-close {
    background: none;
    border: none;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    color: inherit;
    padding: 0 4px;
}

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

.section {
    padding: 56px 0;
}

.section-alt {
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

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

.section-head p {
    color: var(--muted);
    margin: 0;
}

.page-banner {
    background: linear-gradient(120deg, var(--navy-900), var(--navy-800) 55%, var(--navy-700));
    color: #fff;
    padding: 56px 0 48px;
}

.page-banner h1 {
    color: #fff;
    margin-bottom: 8px;
}

.page-banner p {
    color: #cbd5e1;
    margin: 0;
    max-width: 640px;
}

.hero {
    background: linear-gradient(120deg, var(--navy-900) 0%, var(--navy-800) 55%, var(--navy-700) 100%);
    color: #fff;
    padding: 80px 0 72px;
}

.hero-inner {
    max-width: 780px;
}

.hero h1 {
    color: #fff;
}

.hero-lead {
    font-size: 1.1rem;
    color: #cbd5e1;
    max-width: 640px;
    margin-bottom: 28px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.eyebrow {
    color: var(--cyan-light);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.intro {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 48px;
    align-items: start;
}

.highlights {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 14px;
}

.highlights li {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--royal);
    border-radius: var(--radius);
    padding: 16px 18px;
}

.highlights strong {
    display: block;
    color: var(--navy-800);
}

.highlights span {
    color: var(--muted);
    font-size: 0.95rem;
}

.cta-band {
    background: var(--navy-800);
    color: #fff;
    padding: 48px 0;
}

.cta-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.cta-band h2 {
    color: #fff;
    margin-bottom: 4px;
}

.cta-band p {
    color: #cbd5e1;
    margin: 0;
}

.two-col {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 32px;
    align-items: start;
}

.contact-layout {
    grid-template-columns: 1fr 1.4fr;
}

.prose p {
    color: #334155;
}

.chip-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip-list li {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 6px 14px;
    font-weight: 600;
    font-size: 0.9rem;
}

.empty-state {
    text-align: center;
    color: var(--muted);
    padding: 40px 0;
}

/* ---------- Cards ---------- */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

.facts dl,
.contact-info {
    margin: 0;
}

.facts dl > div {
    display: grid;
    grid-template-columns: 9.5rem 1fr;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.facts dl > div:last-child {
    border-bottom: none;
}

.facts dt {
    color: var(--muted);
    font-size: 0.9rem;
}

.facts dd {
    margin: 0;
    font-weight: 600;
}

.facts .btn {
    margin-top: 16px;
}

.contact-info h3 {
    margin-bottom: 14px;
}

.info-row {
    padding: 14px 0;
    border-top: 1px solid var(--border);
}

.info-row p {
    margin: 0;
}

.info-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 2px;
}

/* ---------- Products ---------- */

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.filter-bar .field {
    min-width: 180px;
}

.filter-bar .grow {
    flex: 1 1 260px;
}

.filter-actions {
    display: flex;
    gap: 8px;
}

.results-count {
    color: var(--muted);
    font-size: 0.92rem;
    margin-bottom: 16px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.product-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
    transition: transform 0.15s, box-shadow 0.15s;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
}

.product-image {
    background: #fff;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.product-image img {
    max-height: 100%;
    width: auto;
    object-fit: contain;
}

.product-body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-meta {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--royal);
    margin-bottom: 4px;
}

.product-name {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.product-sku {
    font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace;
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 8px;
}

.product-desc {
    font-size: 0.9rem;
    color: #475569;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 10px;
}

.product-specs {
    font-size: 0.88rem;
    margin-bottom: 10px;
}

.product-specs summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--navy-800);
}

.product-specs dl {
    margin: 8px 0 0;
}

.product-specs dl > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 0;
    border-bottom: 1px dashed var(--border);
}

.product-specs dt {
    color: var(--muted);
}

.product-specs dd {
    margin: 0;
    font-weight: 600;
    text-align: right;
}


.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
    flex-wrap: wrap;
    color: var(--muted);
}

/* ---------- Forms ---------- */

.stack > * + * {
    margin-top: 16px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 20px;
}

.span-2 {
    grid-column: span 2;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field label {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--navy-800);
}

.field input,
.field select,
.field textarea {
    font: inherit;
    font-size: 0.97rem;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #fff;
    color: var(--text);
    width: 100%;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--royal);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15);
}

.field textarea {
    resize: vertical;
}

.hint {
    color: var(--muted);
    font-size: 0.82rem;
}

.checkbox-row {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin: 18px 0;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    cursor: pointer;
}

.checkbox input {
    width: 18px;
    height: 18px;
    accent-color: var(--royal);
}

.form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.image-picker {
    display: flex;
    gap: 18px;
    align-items: center;
    flex-wrap: wrap;
}

.image-preview {
    width: 140px;
    height: 140px;
    object-fit: contain;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px;
}

.image-picker input[type="file"] {
    font: inherit;
}

/* ---------- Error page ---------- */

.error-box {
    text-align: center;
    padding: 64px 0;
}

.error-box p {
    color: var(--muted);
    margin-bottom: 24px;
}

/* ---------- Footer / public responsive ---------- */

@media (max-width: 900px) {
    .intro,
    .two-col,
    .contact-layout {
        grid-template-columns: 1fr;
        gap: 28px;
    }

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

@media (max-width: 760px) {
    .nav-toggle {
        display: inline-flex;
    }

    .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
        flex-direction: column;
        padding: 8px 20px 16px;
        gap: 2px;
    }

    .site-header {
        position: sticky;
    }

    .site-nav.is-open {
        display: flex;
    }

    .site-nav a {
        padding: 12px 10px;
    }

    .header-inner {
        position: relative;
    }

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

    .section {
        padding: 40px 0;
    }

    .hero {
        padding: 56px 0 48px;
    }

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

    .span-2 {
        grid-column: auto;
    }

    .filter-bar .field {
        min-width: 100%;
    }

    .filter-actions {
        width: 100%;
    }

    .filter-actions .btn {
        flex: 1;
    }
}

/* ---------- Admin ---------- */

.admin-body {
    background: #eef2f7;
}

.admin-header {
    background: var(--navy-800);
    color: #fff;
    padding: 12px 0;
}

.admin-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.admin-header .brand {
    color: #fff;
}

.admin-header .brand small {
    color: var(--cyan-light);
}

.admin-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.admin-header-actions form {
    margin: 0;
}

.admin-main {
    padding: 28px 0 56px;
}

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

.page-head h1 {
    margin-bottom: 4px;
}

.page-head p {
    margin: 0;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 18px 20px;
}

.stat span {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.stat strong {
    font-family: var(--font-display);
    font-size: 1.9rem;
    color: var(--navy-800);
}

.table-card {
    padding: 0;
    overflow: hidden;
}

.table-wrap {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.93rem;
}

.table th,
.table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.table th {
    background: var(--surface-alt);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    white-space: nowrap;
}

.table tbody tr:hover {
    background: #f8fbff;
}

.thumb {
    width: 56px;
    height: 56px;
    object-fit: contain;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 4px;
}

.actions {
    white-space: nowrap;
}

.actions form,
.actions a {
    display: inline-block;
    margin: 2px 4px 2px 0;
    vertical-align: middle;
}

.actions form {
    margin-right: 4px;
}

.actions-col {
    text-align: right;
}

.badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
    margin-left: 6px;
    vertical-align: middle;
}

.badge-published {
    background: var(--success-bg);
    color: var(--success);
}

.badge-hidden {
    background: #f1f5f9;
    color: #475569;
}

.badge-featured {
    background: #eff6ff;
    color: var(--royal);
}

.empty-card {
    text-align: center;
    padding: 48px 24px;
}

.empty-card p {
    color: var(--muted);
}

.form-card {
    padding: 28px;
    max-width: 920px;
}

.form-card .stack {
    margin: 0;
}

/* Login */

.login-wrap {
    display: flex;
    justify-content: center;
    padding: 48px 0;
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 36px 32px;
}

.login-brand {
    text-align: center;
    margin-bottom: 24px;
}

.login-logo {
    height: 64px;
    width: auto;
    margin: 0 auto 14px;
    object-fit: contain;
}

.login-brand h1 {
    font-size: 1.6rem;
    margin-bottom: 4px;
}

.login-brand p {
    color: var(--muted);
    margin: 0;
}

.login-back {
    text-align: center;
    margin: 20px 0 0;
    font-size: 0.92rem;
}

.password-field {
    display: flex;
    gap: 8px;
}

.password-field input {
    flex: 1;
    min-width: 0;
}

.password-toggle {
    font: inherit;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0 14px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #fff;
    color: var(--navy-800);
    cursor: pointer;
}

.password-toggle:hover {
    border-color: var(--royal);
    color: var(--royal);
}

@media (max-width: 900px) {
    .stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .actions {
        white-space: normal;
    }

    .admin-header-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* ---------- Catalogue: public download band and product details ---------- */

.catalogue-band {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 18px 0;
}

.catalogue-band-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.catalogue-band-inner div {
    display: flex;
    flex-direction: column;
}

.catalogue-band-inner span {
    color: var(--muted);
    font-size: 0.9rem;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.breadcrumbs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.92rem;
    color: var(--muted);
    margin-bottom: 24px;
}

.breadcrumbs a {
    color: var(--royal);
    text-decoration: none;
}

.detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 40px;
    align-items: start;
}

.detail-image {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    box-shadow: var(--shadow);
}

.detail-image img {
    max-height: 420px;
    width: auto;
    object-fit: contain;
}

.detail-info h1 {
    margin-bottom: 8px;
}


.detail-heading {
    font-size: 1.05rem;
    margin: 24px 0 8px;
}

.detail-text {
    color: #334155;
    white-space: pre-line;
}

.detail-source {
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 20px;
}

.detail-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.spec-table th,
.spec-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.spec-table th {
    width: 42%;
    color: var(--muted);
    font-weight: 600;
    background: var(--surface-alt);
}

.spec-table tr:last-child th,
.spec-table tr:last-child td {
    border-bottom: none;
}

.catalogue-panel {
    margin-bottom: 20px;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px 20px;
    margin: 0 0 16px;
}

.status-grid dt {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.status-grid dd {
    margin: 2px 0 0;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.status-message {
    color: #334155;
    font-size: 0.95rem;
}

.actions-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 14px;
}

.inline-form {
    margin: 0;
    display: inline-block;
}

.optional {
    font-weight: 500;
    color: var(--muted);
    font-size: 0.85rem;
}

.badge-warn {
    background: #fffbeb;
    color: #92400e;
}

.note {
    font-size: 0.82rem;
    color: #92400e;
    margin-top: 4px;
}

.note-box {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.92rem;
}

.note-box p {
    margin: 4px 0;
}

.flags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.flags .badge {
    margin-left: 0;
}

.no-picture {
    font-size: 0.8rem;
    color: var(--muted);
}

.row-disabled td {
    opacity: 0.6;
}

.import-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-alt);
}

.import-bar p {
    margin: 0;
    max-width: 520px;
}

.import-controls {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.field-inline {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--navy-800);
}

.field-inline select {
    font: inherit;
    padding: 9px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    min-width: 200px;
}

.review-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--royal);
}

.small-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.preview-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 32px;
    align-items: start;
}

.preview-card {
    max-width: 340px;
    margin-bottom: 28px;
}

.preview-name {
    font-family: var(--font-display);
    font-size: 1.4rem;
    margin-bottom: 4px;
}

.source-page {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    box-shadow: var(--shadow);
}

.admin-nav {
    display: flex;
    gap: 4px;
}

.admin-nav a {
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 700;
    padding: 8px 12px;
    border-radius: 8px;
}

.admin-nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.admin-nav a[aria-current="page"] {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
}

.h3 {
    font-size: 1.15rem;
    margin: 0 0 12px;
}

@media (max-width: 900px) {
    .detail,
    .preview-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .detail-image {
        min-height: 240px;
    }

    .admin-nav {
        width: 100%;
    }
}

@media (max-width: 560px) {
    .catalogue-band-inner .btn,
    .detail-actions .btn {
        width: 100%;
    }

    .spec-table th {
        width: 40%;
    }
}

/* ---------- Bulk import card on the Add product page ---------- */

.bulk-card {
    margin-bottom: 24px;
}

.bulk-steps {
    margin: 12px 0 18px;
    padding-left: 20px;
    line-height: 1.7;
}

.bulk-card input[type="file"] {
    font: inherit;
    max-width: 100%;
}
