/* =========================================
   CATEGORY – layout + grid + toolbar
   (A termékkártya CSS kizárólag: /assets/css/product_card.css)
   ========================================= */

:root {
    --cat-gap: 12px;
    --cat-radius: 14px;
    --cat-border: rgba(15, 23, 42, .10);
    --cat-border-2: rgba(148, 163, 184, .38);
    --cat-accent: #f59e0b;
    --cat-bg: rgba(255, 255, 255, .92);
    --cat-muted: rgba(100, 116, 139, 1);
    --cat-font-xs: 11px;
    --cat-font-sm: 12px;
    --cat-ctl-h: 34px;
}

/* base */
.category-page {
    padding: 12px;
    width: min(1760px, 100%);
    margin-left: auto;
    margin-right: auto;
}

.category-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 2px 0 10px;
    font-size: 12px;
    color: rgba(71, 85, 105, 1);
}

.category-breadcrumbs a {
    color: rgba(15, 23, 42, .88);
    text-decoration: none;
}

.category-breadcrumbs a:hover {
    text-decoration: underline;
}

.category-breadcrumbs .bc-sep {
    opacity: .55;
}

.category-breadcrumbs .bc-current {
    color: rgba(15, 23, 42, 1);
    font-weight: 700;
}

.category-page .section-header {
    margin-bottom: 12px;
}

.category-page .section-header h1,
.category-page .section-header h2 {
    margin: 0 0 4px 0;
    font-size: clamp(20px, 2.1vw, 28px);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.category-page .section-header p {
    margin: 0;
    color: var(--cat-muted);
    font-size: var(--cat-font-sm);
    line-height: 1.35;
}

.cat-active {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 12px;
}

.cat-campaign-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(240px, 0.8fr);
    gap: 16px;
    margin: 0 0 14px;
    padding: 18px;
    border: 1px solid rgba(245, 158, 11, .24);
    border-radius: 18px;
    background:
        radial-gradient(140% 140% at 0% 0%, rgba(245, 158, 11, .12) 0%, rgba(245, 158, 11, 0) 55%),
        linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(255, 251, 235, .96));
    box-shadow: 0 16px 34px rgba(15, 23, 42, .06);
}

.cat-campaign-panel__eyebrow {
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(180, 83, 9, 1);
}

.cat-campaign-panel h2 {
    margin: 0 0 8px;
    font-size: clamp(18px, 1.9vw, 24px);
    line-height: 1.2;
    color: rgba(15, 23, 42, .96);
}

.cat-campaign-panel p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: rgba(71, 85, 105, 1);
}

.cat-campaign-panel__list {
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

.cat-campaign-panel__list li {
    position: relative;
    padding-left: 18px;
    font-size: 12.5px;
    line-height: 1.55;
    color: rgba(30, 41, 59, .95);
}

.cat-campaign-panel__list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 1);
}

.cat-campaign-panel__actions {
    display: grid;
    align-content: start;
    gap: 10px;
}

.cat-campaign-panel__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, .12);
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
    transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease, background .12s ease;
}

.cat-campaign-panel__btn--primary {
    color: #fff;
    border-color: #d97706;
    background: linear-gradient(180deg, #f59e0b 0%, #ea580c 100%);
    box-shadow: 0 10px 22px rgba(234, 88, 12, .18);
}

.cat-campaign-panel__btn--secondary {
    color: rgba(15, 23, 42, .92);
    background: rgba(255, 255, 255, .94);
}

@media (hover:hover) {
    .cat-campaign-panel__btn:hover {
        transform: translateY(-1px);
    }
}

.cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 11px;
    border-radius: 999px;
    border: 1px solid rgba(245, 158, 11, .32);
    background: rgba(255, 255, 255, .95);
    color: rgba(15, 23, 42, .86);
    text-decoration: none;
    font-size: 12px;
    font-weight: 750;
    transition: border-color .12s ease, transform .08s ease, background .12s ease;
}

.cat-chip span {
    font-size: 14px;
    line-height: 1;
    opacity: .75;
}

@media (hover:hover) {
    .cat-chip:hover {
        transform: translateY(-1px);
        border-color: rgba(245, 158, 11, .52);
        background: rgba(255, 250, 240, .96);
    }
}

/* pills */
.category-pill-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 9px 12px;
    border-radius: 999px;

    border: 1px solid var(--cat-border-2);
    background: rgba(255, 255, 255, .96);

    color: rgba(15, 23, 42, .86);
    text-decoration: none;

    font-weight: 900;
    font-size: var(--cat-font-sm);
    letter-spacing: -0.01em;

    transition: border-color .15s ease, transform .08s ease, background .15s ease;
}

@media (hover:hover) {
    .category-pill:hover {
        transform: translateY(-1px);
        border-color: rgba(148, 163, 184, .60);
        background: rgba(248, 250, 252, .98);
    }
}

.category-pill-grid--sub {
    padding: 10px 12px 12px 12px;
}

.category-pill--sub {
    padding: 8px 11px;
    font-size: 11.5px;
    opacity: .95;
}

/* subcats details */
.category-subcats {
    margin: 10px 0 12px 0;
    border-radius: 14px;
    border: 1px solid var(--cat-border);
    background: var(--cat-bg);
    overflow: hidden;
}

.category-subcats__sum {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;

    font-weight: 950;
    font-size: var(--cat-font-sm);
    color: rgba(15, 23, 42, .86);
}

.category-subcats__sum::-webkit-details-marker {
    display: none;
}

.category-subcats__chev {
    opacity: .7;
    font-size: 11px;
    transition: transform .15s ease;
}

.category-subcats[open] .category-subcats__chev {
    transform: rotate(180deg);
}

/* layout */
.cat-layout {
    display: block;
    margin-top: 10px;
}

@media (min-width:1024px) {
    .cat-layout {
        display: grid;
        grid-template-columns: 280px minmax(0, 1fr);
        gap: var(--cat-gap);
        align-items: start;
    }

    .cat-sidebar {
        position: sticky;
        top: calc(var(--header-h, 72px) + 12px);
        align-self: start;
    }
}

@media (max-width: 900px) {
    .cat-campaign-panel {
        grid-template-columns: minmax(0, 1fr);
    }
}

.cat-main {
    min-width: 0;
}

@media (min-width:1024px) {
    .cat-main {
        max-width: none;
        width: 100%;
    }
}

.category-page--root .section-header {
    margin-bottom: 14px;
}

.cat-root-featured {
    margin-top: 18px;
}

.cat-root-featured__head {
    margin: 0 0 10px;
}

.cat-root-featured__head h2 {
    margin: 0 0 4px;
    font-size: clamp(18px, 1.8vw, 24px);
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: rgba(15, 23, 42, .94);
}

.cat-root-featured__head p {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: rgba(100, 116, 139, 1);
}

/* filter kiemelés */
.cat-sidebar .cf-inline {
    border-color: rgba(245, 158, 11, .35);
    background: linear-gradient(180deg, rgba(255, 251, 235, .82), rgba(255, 255, 255, .95));
    box-shadow: 0 8px 20px rgba(15, 23, 42, .08);
}

.cat-sidebar .cf-open {
    border-color: rgba(245, 158, 11, .42);
    background: rgba(255, 245, 220, .92);
}

.cat-sidebar .cf-panel {
    border-color: rgba(245, 158, 11, .34);
    box-shadow: 0 16px 36px rgba(15, 23, 42, .12), 0 0 0 2px rgba(245, 158, 11, .08);
}

.cat-sidebar .cf-head {
    background: linear-gradient(180deg, rgba(255, 251, 235, .88), rgba(255, 255, 255, .97));
}

/* toolbar */
.cat-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;

    padding: 8px 10px;
    border-radius: var(--cat-radius);
    border: 1px solid var(--cat-border);
    background: var(--cat-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    margin-bottom: 10px;
}

.cat-count {
    font-weight: 950;
    color: rgba(15, 23, 42, .78);
    font-size: var(--cat-font-sm);
    white-space: nowrap;
}

.cat-pageState {
    margin-left: 8px;
    color: rgba(100, 116, 139, 1);
    font-weight: 700;
    font-size: 11px;
}

.cat-sort {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 180px;
}

.cat-sort label {
    font-size: var(--cat-font-xs);
    font-weight: 900;
    color: var(--cat-muted);
    white-space: nowrap;
}

.cat-sort select {
    height: var(--cat-ctl-h);
    width: 100%;

    border-radius: 11px;
    border: 1px solid var(--cat-border-2);
    background: rgba(255, 255, 255, .96);

    font-weight: 900;
    font-size: var(--cat-font-sm);
    color: rgba(15, 23, 42, .92);

    padding: 0 9px;
    outline: none;

    transition: border-color .15s ease, box-shadow .15s ease;
}

.cat-sort select:focus-visible {
    box-shadow: 0 0 0 3px rgba(245, 158, 11, .16);
    border-color: rgba(245, 158, 11, .55);
}

@media (max-width:560px) {
    .cat-toolbar {
        align-items: stretch;
    }

    .cat-sort {
        width: 100%;
        min-width: 0;
    }

    .cat-sort label {
        display: none;
    }

    .cat-sort select {
        width: 100%;
    }
}

/* product grid */
.category-products-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(0, auto);
    align-items: start;
}

.category-products-grid > * {
    min-width: 0;
}

@media (min-width:1024px) {
    .category-products-grid {
        grid-template-columns: repeat(4, minmax(0, var(--pc-card-max, 220px)));
        justify-content: center;
        gap: 12px;
    }

    .category-products-grid .category-product {
        width: 100%;
        max-width: var(--pc-card-max, 220px); /* CRM: product_card_size */
    }
}

@media (min-width:1280px) {
    .category-products-grid {
        grid-template-columns: repeat(4, minmax(0, var(--pc-card-max, 220px)));
        justify-content: center;
        gap: 12px;
    }
}

/* Kártya sűrítés kategória oldalon – ne legyenek “óriásiak” */
.category-page .category-products-grid .category-product-image-wrapper {
    aspect-ratio: 5 / 4;
    padding: calc(var(--pc-media-pad, 12px) - 2px);
}

.category-page .category-products-grid .category-product-body {
    padding: calc(var(--pc-body-pad, 12px) - 1px);
    gap: calc(var(--pc-body-gap, 8px) - 1px);
}

.category-page .category-products-grid .category-product-title {
    font-size: calc(var(--pc-title-font, 12.5px) - 0.5px);
}

.category-page .category-products-grid .category-product-actions {
    gap: 9px;
}

.category-page .category-products-grid .category-product-prices {
    min-height: 24px;
    margin-bottom: 1px;
}

.category-page .category-products-grid .category-product-price {
    min-height: calc(var(--pc-price-minh, 26px) - 2px);
    padding: calc(var(--pc-price-pad-y, 4px) - 1px) calc(var(--pc-price-pad-x, 10px) - 2px);
    font-size: calc(var(--pc-price-font, 12.5px) - 0.5px);
}

.category-page .category-products-grid .category-product-qty,
.category-page .category-products-grid .category-product-add {
    height: calc(var(--pc-ctl-h2, 36px) - 2px);
}

.category-page .category-products-grid .qty-btn {
    width: calc(var(--pc-qty-btn-w, 34px) - 2px);
}

.category-page .category-products-grid .category-product {
    min-height: 0;
    height: auto;
}

@media (max-width:420px) {
    .category-page {
        padding: 10px;
    }

    .category-products-grid {
        gap: 8px;
    }
}

@media (max-width:430px) {
    .category-page .category-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px 8px;
        align-items: start;
    }

    .category-page .category-products-grid > .category-product {
        min-width: 0;
        width: 100%;
    }
}

.cat-empty {
    border: 1px dashed rgba(148, 163, 184, .45);
    border-radius: 14px;
    padding: 16px;
    background: rgba(255, 255, 255, .9);
}

.cat-empty h3 {
    margin: 0 0 6px;
    font-size: 16px;
}

.cat-empty p {
    margin: 0 0 12px;
    color: var(--cat-muted);
    font-size: 12px;
}

.cat-pagination {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.cat-pageBtn {
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: 11px;
    border: 1px solid var(--cat-border-2);
    background: rgba(255, 255, 255, .95);
    color: rgba(15, 23, 42, .9);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 12px;
    font-weight: 800;
    transition: border-color .12s ease, transform .1s ease, background .12s ease;
}

.cat-pageBtn.is-active {
    background: rgba(245, 158, 11, .18);
    border-color: rgba(245, 158, 11, .5);
}

@media (hover:hover) {
    .cat-pageBtn:hover {
        transform: translateY(-1px);
        border-color: rgba(15, 23, 42, .3);
        background: rgba(248, 250, 252, .98);
    }
}
