:root {
    --brand-red: #d82818;
    --brand-red-dark: #b51f14;
    --brand-navy: #2b0f73;
    --brand-navy-dark: #21105b;
    --ink: #262632;
    --muted: #747481;
    --surface: #ffffff;
    --surface-soft: #f7f7f9;
    --border: #e5e5e9;
    --border-strong: #d7d7dd;
    --radius: 12px;
    --content: 1400px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    padding-bottom: 112px;
    background: var(--surface-soft);
    color: var(--ink);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.catalog-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.catalog-header-inner {
    width: min(calc(100% - 48px), var(--content));
    min-height: 128px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 260px 1fr auto;
    gap: 36px;
    align-items: center;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    text-decoration: none;
}

.brand-logo {
    display: block;
    width: 245px;
    max-width: 100%;
    height: auto;
}

.catalog-heading h1 {
    margin: 0 0 7px;
    color: var(--brand-navy);
    font-size: clamp(26px, 2vw, 36px);
    line-height: 1.08;
    font-weight: 750;
    letter-spacing: -0.02em;
}

.catalog-heading p {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.print-meta { display: none; }

.site-link {
    color: var(--brand-navy);
    font-size: 13px;
    font-weight: 750;
    text-decoration: none;
    white-space: nowrap;
}

.site-link:hover { color: var(--brand-red); }

.catalog-main {
    width: min(calc(100% - 48px), var(--content));
    margin: 0 auto;
    padding: 30px 0 56px;
}

.catalog-controls {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.filter-block { min-width: 0; width: 100%; }
.control-label {
    display: block;
    margin-bottom: 11px;
    color: var(--muted);
    font-size: 13.5px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.category-filters {
    display: flex;
    flex-wrap: nowrap;
    gap: 7px;
    width: 100%;
}

.filter-chip {
    appearance: none;
    flex: 1 1 0;
    min-width: 0;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    background: var(--surface);
    color: #555561;
    padding: 9px 10px;
    font: inherit;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: border-color .18s ease, color .18s ease, background .18s ease;
}

.filter-chip:hover {
    border-color: #bebec6;
    color: var(--ink);
}

.filter-chip.is-active {
    border-color: var(--brand-red);
    background: var(--brand-red);
    color: #fff;
}

.catalog-actions {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

.action-button {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid var(--brand-navy);
    border-radius: 8px;
    background: var(--brand-navy);
    color: #fff;
    padding: 10px 15px;
    font: inherit;
    font-size: 13px;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.action-button:hover {
    border-color: var(--brand-navy-dark);
    background: var(--brand-navy-dark);
}

.action-button-whatsapp {
    border-color: #188a46;
    background: #25d366;
}

.action-button-whatsapp:hover {
    border-color: #147a3d;
    background: #1fa855;
}

.action-button-pdf {
    border-color: var(--brand-red);
    background: var(--brand-red);
}

.action-button-pdf:hover {
    border-color: var(--brand-red-dark);
    background: var(--brand-red-dark);
}

.action-button:disabled,
.action-button.is-loading {
    cursor: wait;
    opacity: .72;
}

.action-button-icon {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
}

.catalog-summary {
    display: flex;
    align-items: baseline;
    gap: 5px;
    padding: 18px 2px 2px;
    color: var(--muted);
    font-size: 13px;
}

.catalog-summary strong {
    color: var(--ink);
    font-size: 15px;
}

.category-section { padding-top: 34px; scroll-margin-top: 18px; }
.category-section.is-hidden { display: none; }

.category-heading-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 14px;
    padding-bottom: 11px;
    border-bottom: 2px solid var(--brand-red);
}

.category-heading-row h2 {
    margin: 0;
    color: var(--brand-navy);
    font-size: 22px;
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: -0.018em;
}

.category-heading-row span {
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

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

.product-card {
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.product-card:hover {
    transform: translateY(-2px);
    border-color: #d0d0d6;
    box-shadow: 0 8px 26px rgba(36, 30, 55, .08);
}

.product-image-link {
    display: block;
    aspect-ratio: 1 / 1;
    background: #fff;
    border-bottom: 1px solid #ededf1;
    overflow: hidden;
}

.product-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 18px;
    transition: transform .24s ease;
}

.product-card:hover .product-image { transform: scale(1.025); }

.product-info {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 220px;
    padding: 18px 18px 18px;
}

.product-title {
    margin: 0;
    font-size: 16px;
    line-height: 1.42;
    font-weight: 780;
    letter-spacing: -0.01em;
}

.product-title a { text-decoration: none; }
.product-title a:hover { color: var(--brand-red); }

.product-meta {
    margin: 16px 0 0;
    padding: 14px 0 0;
    border-top: 1px solid #eeeeF2;
}

.product-meta > div {
    display: grid;
    grid-template-columns: minmax(92px, 0.95fr) minmax(0, 1.15fr);
    align-items: start;
    gap: 10px;
    padding: 6px 0;
}

.product-meta dt,
.product-meta dd { margin: 0; }

.product-meta dt {
    color: #696976;
    font-size: 12.5px;
    line-height: 1.35;
    font-weight: 600;
}

.product-meta dd {
    color: var(--ink);
    font-size: 14px;
    line-height: 1.35;
    font-weight: 800;
    text-align: right;
    overflow-wrap: anywhere;
}

.product-link {
    margin-top: auto;
    padding-top: 13px;
    color: var(--brand-navy);
    font-size: 13.5px;
    font-weight: 800;
    text-decoration: none;
}

.product-link::after { content: "  →"; }
.product-link:hover { color: var(--brand-red); }

.catalog-error,
.catalog-empty {
    padding: 24px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: #555561;
}

.catalog-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 25px 24px 35px;
    text-align: center;
    color: var(--muted);
    font-size: 12px;
}

.catalog-footer a { text-decoration: none; }
.catalog-footer a:hover { color: var(--brand-red); }

.mobile-filter-toggle,
.jumpbar-mobile-toggle { display: none; }

.catalog-jumpbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    width: 100%;
    background: rgba(246, 246, 247, .985);
    border-top: 1px solid #ddddE2;
    box-shadow: 0 -4px 18px rgba(30, 23, 58, .08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.jumpbar-inner {
    width: min(calc(100% - 34px), var(--content));
    margin: 0 auto;
    padding: 8px 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 3px 0;
}

.jumpbar-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 9px 14px;
    border-radius: 6px;
    color: #3a3942;
    font-size: 14px;
    line-height: 1.15;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: color .18s ease, background .18s ease;
}

.jumpbar-link::after {
    content: "";
    position: absolute;
    right: 0;
    top: 10px;
    bottom: 10px;
    width: 1px;
    background: #d8d8dd;
}

.jumpbar-link:last-child::after { display: none; }
.jumpbar-link:hover,
.jumpbar-link:focus-visible {
    color: var(--brand-navy);
    background: #ececf0;
    outline: none;
}

.jumpbar-link.is-current {
    color: var(--brand-navy);
    background: #fff;
    font-weight: 800;
    box-shadow: inset 0 -3px 0 var(--brand-red);
}

.jumpbar-home { font-weight: 800; }

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

@media (max-width: 980px) {
    .catalog-header-inner { grid-template-columns: 210px 1fr; }
    .site-link { display: none; }
    .brand-logo { width: 205px; }
}

@media (max-width: 820px) {
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
    .jumpbar-inner {
        width: 100%;
        padding: 8px 10px;
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: thin;
    }
    .jumpbar-link { flex: 0 0 auto; }
}

@media (max-width: 760px) {
    body { padding-bottom: 68px; }

    .catalog-header-inner,
    .catalog-main { width: min(calc(100% - 28px), var(--content)); }

    .catalog-header-inner {
        min-height: 0;
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 24px 0;
    }

    .brand-logo { width: 205px; }
    .catalog-heading h1 { font-size: 27px; }
    .catalog-main { padding-top: 18px; }
    .catalog-controls { padding: 18px; }

    .mobile-filter-toggle {
        appearance: none;
        width: 100%;
        min-height: 48px;
        display: grid;
        grid-template-columns: 1fr auto 18px;
        align-items: center;
        gap: 9px;
        padding: 11px 13px;
        border: 1px solid var(--border-strong);
        border-radius: 9px;
        background: #fff;
        color: var(--ink);
        font: inherit;
        font-size: 14px;
        font-weight: 700;
        text-align: left;
        cursor: pointer;
    }

    .mobile-filter-status {
        max-width: 135px;
        overflow: hidden;
        color: var(--brand-red-dark);
        font-size: 12px;
        font-weight: 800;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-filter-toggle svg { transition: transform .18s ease; }
    .filter-block.is-mobile-open .mobile-filter-toggle svg { transform: rotate(180deg); }

    .category-filters {
        display: none;
        width: 100%;
        margin-top: 10px;
        padding: 10px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        border: 1px solid var(--border);
        border-radius: 10px;
        background: #fafafa;
    }

    .filter-block.is-mobile-open .category-filters { display: grid; }
    .filter-chip {
        width: 100%;
        min-height: 42px;
        border-radius: 7px;
        font-size: 11.5px;
        white-space: normal;
    }

    .catalog-actions {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
    }
    .catalog-actions .action-button { width: 100%; }

    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .product-image { padding: 14px; }
    .product-info { min-height: 205px; padding: 14px; }
    .product-title { font-size: 15px; }
    .product-meta dt { font-size: 12px; }
    .product-meta dd { font-size: 13px; }
    .category-heading-row h2 { font-size: 20px; }

    .catalog-jumpbar { background: #f3f3f5; }
    .jumpbar-mobile-toggle {
        appearance: none;
        width: 100%;
        min-height: 56px;
        display: grid;
        grid-template-columns: auto 1fr 18px;
        align-items: center;
        gap: 10px;
        padding: 10px 16px;
        border: 0;
        background: transparent;
        color: var(--ink);
        font: inherit;
        cursor: pointer;
    }

    .jumpbar-mobile-label { font-size: 12px; color: var(--muted); }
    .jumpbar-mobile-current {
        overflow: hidden;
        color: var(--brand-navy);
        font-size: 14px;
        font-weight: 800;
        text-align: right;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .jumpbar-mobile-toggle svg { transition: transform .18s ease; }
    .catalog-jumpbar.is-mobile-open .jumpbar-mobile-toggle svg { transform: rotate(180deg); }

    .jumpbar-inner {
        display: none;
        width: 100%;
        max-height: 52vh;
        padding: 8px 12px 14px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
        overflow-y: auto;
        border-top: 1px solid #dedee3;
    }

    .catalog-jumpbar.is-mobile-open .jumpbar-inner { display: grid; }
    .jumpbar-link {
        min-height: 42px;
        justify-content: center;
        padding: 9px;
        border-radius: 7px;
        background: #fff;
        font-size: 12px;
        text-align: center;
        white-space: normal;
    }
    .jumpbar-link::after { display: none; }
}

@media (max-width: 430px) {
    .product-grid { grid-template-columns: 1fr; }
    .product-image-link { aspect-ratio: 4 / 3; }
    .product-info { min-height: 0; }
}

@page { size: A4 portrait; margin: 11mm; }

@media print {
    :root { --ink: #111; --brand-navy: #2b0f73; }

    body {
        padding-bottom: 0 !important;
        background: #fff;
        color: #111;
        font-size: 9pt;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .screen-only,
    .catalog-jumpbar { display: none !important; }

    .print-meta {
        display: block;
        margin-top: 1.5mm !important;
        color: #555 !important;
        font-size: 7.5pt !important;
    }

    .catalog-header {
        border-bottom: 1px solid #bbb;
        padding-bottom: 5mm;
    }

    .catalog-header-inner {
        width: 100%;
        min-height: auto;
        display: grid;
        grid-template-columns: 48mm 1fr;
        gap: 7mm;
        padding: 0;
    }

    .brand-logo { width: 48mm; }
    .catalog-heading h1 { margin-bottom: 1mm; font-size: 18pt; }
    .catalog-heading p { font-size: 8.5pt; line-height: 1.35; }

    .catalog-main { width: 100%; padding: 0; }
    .category-section { padding-top: 7mm; break-before: auto; page-break-before: auto; }
    .category-section.is-hidden { display: none !important; }

    .category-heading-row {
        margin-bottom: 4mm;
        padding-bottom: 2mm;
        border-bottom: 1.5pt solid var(--brand-red);
        break-after: avoid;
        page-break-after: avoid;
    }
    .category-heading-row h2 { font-size: 15pt; }
    .category-heading-row span { font-size: 8pt; }

    .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4mm; }
    .product-card {
        border: .6pt solid #ccc;
        border-radius: 0;
        box-shadow: none !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }
    .product-card:hover { transform: none; }
    .product-image-link { aspect-ratio: 1 / 1; border-bottom: .5pt solid #ddd; }
    .product-image { padding: 3mm; }
    .product-info { min-height: 43mm; padding: 3mm; }
    .product-title { font-size: 9pt; line-height: 1.3; }
    .product-meta { margin-top: 3mm; padding-top: 2mm; }
    .product-meta dt { font-size: 7.2pt; }
    .product-meta dd { font-size: 7.5pt; }
    .product-link { display: none; }
    a { text-decoration: none !important; }
    .catalog-footer { padding: 7mm 0 0; color: #555; font-size: 8pt; }
}
