/*
 * Velgala - pagina de rezultate ale cautarii (/cauta/fraza)
 * Marcajul: application/modules/web/views/produse/partials/cautare_rezultate.php
 * Comportamentul: assets/web/js/cautare_rezultate.js
 *
 * Aceleasi culori si acelasi font ca bara de cautare (cautare_live.css). Dimensiunile sunt in px:
 * tema seteaza html { font-size: 62.5% }.
 */

.cr {
    --cr-albastru: #273676;
    --cr-albastru-inchis: #1b2757;
    --cr-portocaliu: #f3794f;
    --cr-portocaliu-inchis: #e0602f;
    --cr-text: #1a2142;
    --cr-text-2: #5d6687;
    --cr-text-3: #8a91ab;
    --cr-linie: #e4e7f1;
    --cr-fundal: #f4f6fb;
    --cr-fundal-2: #eceff8;
    --cr-verde: #17915a;
    --cr-galben: #b97500;
    --cr-font: "Poppins", "Open Sans", -apple-system, "Segoe UI", sans-serif;

    position: relative;
    padding: 26px 0 40px;
    color: var(--cr-text);
    font-family: var(--cr-font);
    font-size: 14px;
    line-height: 1.4;
    transition: opacity 0.15s ease;
}

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

.cr a {
    text-decoration: none;
}

.cr-ico {
    flex: 0 0 auto;
}

/* cat timp se incarca alte rezultate */
.cr.cr-se-incarca .cr-rezultate,
.cr.cr-se-incarca .cr-antet__numar {
    opacity: 0.45;
    pointer-events: none;
    transition: opacity 0.12s ease;
}

.cr.cr-se-incarca::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2000;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--cr-portocaliu), transparent);
    background-size: 40% 100%;
    background-repeat: no-repeat;
    animation: cr-progres 0.9s linear infinite;
}

@keyframes cr-progres {
    from { background-position: -60% 0; }
    to { background-position: 160% 0; }
}

/* ------------------------------------------------------------------ */
/* Antet                                                               */
/* ------------------------------------------------------------------ */

.cr-antet {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px 24px;
    flex-wrap: wrap;
    margin: 0 0 20px;
    padding: 0 0 18px;
    border-bottom: 1px solid var(--cr-linie);
}

.cr-antet__text {
    min-width: 0;
}

.cr .cr-antet__eticheta {
    margin: 0 0 4px;
    color: var(--cr-text-2);
    font-family: var(--cr-font);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.09em;
    line-height: 1.3;
    text-transform: uppercase;
}

.cr .cr-antet__titlu {
    margin: 0;
    color: var(--cr-albastru);
    font-family: var(--cr-font);
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
    text-transform: none;
    overflow-wrap: anywhere;
}

.cr .cr-antet__numar {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin: 0 0 4px;
    color: var(--cr-text-2);
    font-family: var(--cr-font);
    font-size: 14px;
    line-height: 1.3;
    white-space: nowrap;
}

.cr-antet__numar strong {
    color: var(--cr-text);
    font-size: 15px;
    font-weight: 600;
}

.cr .cr-anunt {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: -4px 0 20px;
    padding: 12px 16px;
    background: #fff6f1;
    border: 1px solid #fbdccd;
    border-radius: 12px;
    color: var(--cr-text);
    font-family: var(--cr-font);
    font-size: 14px;
    line-height: 1.4;
}

.cr-anunt .cr-ico {
    width: 18px;
    height: 18px;
    margin-top: 1px;
    color: var(--cr-portocaliu-inchis);
}

.cr-anunt strong {
    font-weight: 600;
}

/* ------------------------------------------------------------------ */
/* Structura: filtre in stanga, rezultate in dreapta                   */
/* ------------------------------------------------------------------ */

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

.cr-rezultate {
    min-width: 0;
}

/* ------------------------------------------------------------------ */
/* Filtre                                                              */
/* ------------------------------------------------------------------ */

.cr-filtre {
    position: sticky;
    top: 84px;
    max-height: calc(100vh - 104px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #cfd4e6 transparent;
    background: #fff;
    border: 1px solid var(--cr-linie);
    border-radius: 16px;
}

.cr-filtre__sus,
.cr-filtre__jos {
    display: none;
}

.cr-grup {
    padding: 18px 18px 16px;
}

.cr-grup + .cr-grup {
    border-top: 1px solid var(--cr-linie);
}

.cr .cr-grup__titlu {
    margin: 0 0 12px;
    color: var(--cr-text-2);
    font-family: var(--cr-font);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.09em;
    line-height: 1.3;
    text-transform: uppercase;
}

/* --- categorii --- */

.cr .cr-categorii {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0 -8px;
    padding: 0;
    list-style: none;
}

.cr .cr-categorii li {
    margin: 0;
    padding: 0;
}

.cr-categorii__in-plus {
    display: none;
}

.cr-toate-categoriile .cr-categorii__in-plus {
    display: list-item;
}

.cr .cr-categorie {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 38px;
    padding: 7px 10px;
    border-radius: 10px;
    color: var(--cr-text);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.3;
    transition: background-color 0.1s ease, color 0.1s ease;
}

.cr .cr-categorie:hover {
    background: var(--cr-fundal);
    color: var(--cr-albastru);
}

.cr .cr-categorie.este-activ {
    background: var(--cr-albastru);
    color: #fff;
    font-weight: 500;
}

.cr-categorie__nume {
    min-width: 0;
    overflow-wrap: anywhere;
}

.cr-categorie__numar {
    flex: 0 0 auto;
    min-width: 28px;
    padding: 2px 8px;
    background: var(--cr-fundal);
    border-radius: 10px;
    color: var(--cr-text-2);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    text-align: center;
}

.cr-categorie:hover .cr-categorie__numar {
    background: #fff;
}

.cr-categorie.este-activ .cr-categorie__numar {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.cr-mai-multe {
    margin: 8px 0 0;
    padding: 4px 2px;
    background: none;
    border: 0;
    color: var(--cr-albastru);
    font-family: var(--cr-font);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.cr-mai-multe:hover {
    color: var(--cr-portocaliu-inchis);
    text-decoration: underline;
}

/* --- pret: doua cursoare native suprapuse pe aceeasi sina --- */

.cr-pret__slider {
    position: relative;
    height: 28px;
    margin: 4px 2px 14px;
}

.cr-pret__sina {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 6px;
    margin-top: -3px;
    background: var(--cr-fundal-2);
    border-radius: 3px;
}

.cr-pret__interval {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--cr-albastru);
    border-radius: 3px;
}

.cr .cr-pret__cursor {
    position: absolute;
    top: 0;
    left: -12px;
    z-index: 3;
    width: calc(100% + 24px);
    height: 28px;
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
    outline: 0;
    box-shadow: none;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
}

.cr-pret__cursor::-webkit-slider-runnable-track {
    height: 28px;
    background: none;
    border: 0;
}

.cr-pret__cursor::-moz-range-track {
    height: 28px;
    background: none;
    border: 0;
}

.cr-pret__cursor::-webkit-slider-thumb {
    width: 24px;
    height: 24px;
    margin-top: 2px;
    background: #fff;
    border: 2px solid var(--cr-albastru);
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(39, 54, 118, 0.3);
    cursor: grab;
    pointer-events: auto;
    -webkit-appearance: none;
    appearance: none;
    transition: box-shadow 0.12s ease, border-color 0.12s ease;
}

.cr-pret__cursor::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #fff;
    border: 2px solid var(--cr-albastru);
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(39, 54, 118, 0.3);
    cursor: grab;
    pointer-events: auto;
    transition: box-shadow 0.12s ease, border-color 0.12s ease;
}

.cr-pret__cursor:hover::-webkit-slider-thumb,
.cr-pret__cursor:focus-visible::-webkit-slider-thumb {
    border-color: var(--cr-portocaliu);
    box-shadow: 0 0 0 5px rgba(243, 121, 79, 0.2), 0 2px 6px rgba(39, 54, 118, 0.3);
}

.cr-pret__cursor:hover::-moz-range-thumb,
.cr-pret__cursor:focus-visible::-moz-range-thumb {
    border-color: var(--cr-portocaliu);
    box-shadow: 0 0 0 5px rgba(243, 121, 79, 0.2), 0 2px 6px rgba(39, 54, 118, 0.3);
}

.cr-pret__cursor:active::-webkit-slider-thumb {
    cursor: grabbing;
}

.cr-pret__cursor:active::-moz-range-thumb {
    cursor: grabbing;
}

.cr-pret__campuri {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.cr .cr-pret__camp {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    display: block;
    margin: 0;
}

.cr-pret__camp span {
    display: block;
    margin-bottom: 4px;
    color: var(--cr-text-2);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.3;
}

.cr .cr-pret__camp input {
    display: block;
    width: 100%;
    height: 40px;
    margin: 0;
    padding: 0 34px 0 12px;
    background: #fff;
    border: 1.5px solid var(--cr-linie);
    border-radius: 10px;
    box-shadow: none;
    color: var(--cr-text);
    font-family: var(--cr-font);
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    -moz-appearance: textfield;
    appearance: textfield;
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.cr-pret__camp input::-webkit-outer-spin-button,
.cr-pret__camp input::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.cr .cr-pret__camp input:focus {
    border-color: var(--cr-portocaliu);
    box-shadow: 0 0 0 3px rgba(243, 121, 79, 0.18);
    outline: 0;
}

.cr-pret__camp em {
    position: absolute;
    right: 12px;
    bottom: 11px;
    color: var(--cr-text-3);
    font-size: 13px;
    font-style: normal;
    line-height: 1.3;
    pointer-events: none;
}

.cr-pret__linie {
    flex: 0 0 8px;
    height: 1.5px;
    margin-bottom: 19px;
    background: #c3c9de;
}

/* --- casete de bifat --- */

.cr .cr-bifa {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 36px;
    padding: 5px 0;
    color: var(--cr-text);
    font-size: 14px;
    line-height: 1.3;
}

.cr .cr-bifa:hover {
    color: var(--cr-albastru);
}

.cr-bifa__caseta {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #fff;
    border: 1.5px solid #c3c9de;
    border-radius: 6px;
    color: transparent;
    transition: background-color 0.1s ease, border-color 0.1s ease;
}

.cr-bifa__caseta .cr-ico {
    width: 14px;
    height: 14px;
    stroke-width: 3;
}

.cr-bifa:hover .cr-bifa__caseta {
    border-color: var(--cr-albastru);
}

.cr-bifa.este-activ .cr-bifa__caseta {
    background: var(--cr-albastru);
    border-color: var(--cr-albastru);
    color: #fff;
}

/* ------------------------------------------------------------------ */
/* Bara de deasupra rezultatelor: filtre active + sortare              */
/* ------------------------------------------------------------------ */

.cr-bara {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    margin: 0 0 18px;
}

.cr-bara__filtre {
    display: none;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 16px;
    background: #fff;
    border: 1.5px solid var(--cr-albastru);
    border-radius: 12px;
    color: var(--cr-albastru);
    font-family: var(--cr-font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.cr-bara__filtre .cr-ico {
    width: 18px;
    height: 18px;
}

.cr-bara__numar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--cr-portocaliu);
    border-radius: 10px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.cr-active {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.cr .cr-activ {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    min-height: 34px;
    padding: 5px 8px 5px 13px;
    background: var(--cr-fundal);
    border: 1px solid var(--cr-linie);
    border-radius: 17px;
    color: var(--cr-albastru);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    transition: border-color 0.1s ease, background-color 0.1s ease;
}

.cr-activ span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cr-activ .cr-ico {
    width: 20px;
    height: 20px;
    padding: 4px;
    background: #fff;
    border-radius: 50%;
    color: var(--cr-text-2);
    stroke-width: 2.6;
}

.cr .cr-activ:hover {
    background: #fff;
    border-color: var(--cr-portocaliu);
    color: var(--cr-portocaliu-inchis);
}

.cr .cr-active__sterge {
    padding: 6px 4px;
    color: var(--cr-text-2);
    font-size: 13px;
    font-weight: 500;
    text-decoration: underline;
}

.cr .cr-active__sterge:hover {
    color: var(--cr-portocaliu-inchis);
}

.cr .cr-sortare {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 0 auto;
    color: var(--cr-text-2);
    font-family: var(--cr-font);
    font-size: 13px;
    font-weight: 400;
    white-space: nowrap;
}

.cr .cr-sortare select {
    width: auto;
    height: 44px;
    margin: 0;
    padding: 0 40px 0 14px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23273676' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 16px 16px;
    border: 1.5px solid var(--cr-linie);
    border-radius: 12px;
    box-shadow: none;
    color: var(--cr-text);
    font-family: var(--cr-font);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.cr .cr-sortare select:hover {
    border-color: #c3c9de;
}

.cr .cr-sortare select:focus {
    border-color: var(--cr-portocaliu);
    box-shadow: 0 0 0 3px rgba(243, 121, 79, 0.18);
    outline: 0;
}

/* ------------------------------------------------------------------ */
/* Grila de produse                                                    */
/* ------------------------------------------------------------------ */

.cr-grila {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(218px, 1fr));
    gap: 18px;
}

.cr-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #fff;
    border: 1px solid var(--cr-linie);
    border-radius: 16px;
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.cr-card:hover,
.cr-card:focus-within {
    border-color: rgba(39, 54, 118, 0.28);
    box-shadow: 0 16px 32px -18px rgba(27, 39, 87, 0.45);
    transform: translateY(-2px);
}

/* zona imaginii este mereu patrata; imaginea este pozitionata absolut ca proportiile ei sa nu poata intinde cardul */
.cr-card__imagine {
    position: relative;
    display: block;
    width: 100%;
    padding-top: 100%;
    background: #fff;
}

.cr-card__imagine img {
    position: absolute;
    top: 14px;
    left: 14px;
    display: block;
    width: calc(100% - 28px);
    height: calc(100% - 28px);
    object-fit: contain;
    transition: transform 0.25s ease;
}

.cr-card:hover .cr-card__imagine img {
    transform: scale(1.04);
}

.cr-card__imagine.este-gol {
    background: var(--cr-fundal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c3c9de' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 8 12 3 3 8v8l9 5 9-5V8z'/%3E%3Cpath d='m3 8 9 5 9-5M12 13v8'/%3E%3C/svg%3E") no-repeat center / 56px 56px;
}

.cr-card__reducere {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 1;
    padding: 4px 9px;
    background: var(--cr-portocaliu);
    border-radius: 8px;
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.2;
}

.cr-card__favorit {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--cr-linie);
    border-radius: 50%;
    color: var(--cr-text-2);
    cursor: pointer;
    transition: color 0.12s ease, border-color 0.12s ease, transform 0.1s ease;
    -webkit-tap-highlight-color: transparent;
}

.cr-card__favorit:hover {
    border-color: var(--cr-portocaliu);
    color: var(--cr-portocaliu-inchis);
}

.cr-card__favorit:active {
    transform: scale(0.9);
}

.cr-card__favorit.este-activ {
    border-color: var(--cr-portocaliu);
    color: var(--cr-portocaliu);
}

.cr-card__favorit.este-activ .cr-ico {
    fill: currentColor;
}

.cr-card__corp {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 14px 14px;
    border-top: 1px solid var(--cr-fundal-2);
}

.cr-card__categorie {
    overflow: hidden;
    color: var(--cr-text-3);
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: 0.03em;
    line-height: 1.3;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.cr .cr-card__nume {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    min-height: 2.7em;
    overflow: hidden;
    color: var(--cr-text);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.cr .cr-card__nume:hover {
    color: var(--cr-albastru);
}

/* tot cardul duce la produs, nu doar numele */
.cr-card__nume::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.cr-card__favorit,
.cr-card__cos {
    z-index: 2;
}

.cr-card__cos {
    position: relative;
}

.cr-stoc {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.3;
}

.cr-stoc::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.cr-stoc--da { color: var(--cr-verde); }
.cr-stoc--putin { color: var(--cr-galben); }
.cr-stoc--furnizor { color: var(--cr-text-2); }

.cr-card__pret {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 8px;
    min-height: 30px;
    margin-top: auto;
    padding-top: 4px;
}

.cr-card__pret strong {
    color: var(--cr-albastru);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.cr-card__pret strong.este-redus {
    color: var(--cr-portocaliu-inchis);
}

.cr-card__pret sup {
    top: -0.5em;
    font-size: 0.58em;
    font-weight: 600;
}

.cr-card__pret small {
    font-size: 0.62em;
    font-weight: 600;
}

.cr-card__pret s {
    order: 2;
    color: var(--cr-text-3);
    font-size: 13px;
    font-weight: 400;
    white-space: nowrap;
}

.cr-card__cerere {
    color: var(--cr-text-2);
    font-size: 14px;
    font-weight: 600;
}

.cr-card__cos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 44px;
    margin-top: 6px;
    padding: 8px 12px;
    background: var(--cr-albastru);
    border: 0;
    border-radius: 12px;
    color: #fff;
    font-family: var(--cr-font);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 0.12s ease, transform 0.08s ease;
    -webkit-tap-highlight-color: transparent;
}

.cr-card__cos .cr-ico {
    width: 18px;
    height: 18px;
}

.cr-card__cos:hover {
    background: var(--cr-portocaliu);
}

.cr-card__cos:active {
    transform: scale(0.98);
}

.cr-card__cos.se-adauga {
    opacity: 0.7;
    cursor: progress;
}

.cr-card__cos.este-adaugat,
.cr-card__cos.este-adaugat:hover {
    background: var(--cr-verde);
}

.cr-card__favorit:focus-visible,
.cr-card__cos:focus-visible,
.cr-card__nume:focus-visible,
.cr-categorie:focus-visible,
.cr-bifa:focus-visible,
.cr-activ:focus-visible,
.cr-pagina:focus-visible,
.cr-buton:focus-visible,
.cr-bara__filtre:focus-visible,
.cr-chip:focus-visible {
    outline: 3px solid rgba(39, 54, 118, 0.45);
    outline-offset: 2px;
}

/* ------------------------------------------------------------------ */
/* Paginare                                                            */
/* ------------------------------------------------------------------ */

.cr-pagini {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 30px 0 0;
}

.cr .cr-pagina {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 10px;
    background: #fff;
    border: 1.5px solid var(--cr-linie);
    border-radius: 12px;
    color: var(--cr-text);
    font-size: 14px;
    font-weight: 500;
    transition: border-color 0.1s ease, color 0.1s ease;
}

.cr a.cr-pagina:hover {
    border-color: var(--cr-albastru);
    color: var(--cr-albastru);
}

.cr .cr-pagina.este-activ {
    background: var(--cr-albastru);
    border-color: var(--cr-albastru);
    color: #fff;
    font-weight: 600;
}

.cr-pagina .cr-ico {
    width: 18px;
    height: 18px;
}

.cr-pagini__pauza {
    min-width: 20px;
    color: var(--cr-text-3);
    text-align: center;
}

/* ------------------------------------------------------------------ */
/* Butoane, chipuri, stari goale                                       */
/* ------------------------------------------------------------------ */

.cr .cr-buton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 10px 20px;
    background: var(--cr-albastru);
    border: 1.5px solid var(--cr-albastru);
    border-radius: 12px;
    color: #fff;
    font-family: var(--cr-font);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
}

.cr .cr-buton:hover {
    background: var(--cr-albastru-inchis);
    color: #fff;
}

.cr .cr-buton--secundar {
    background: #fff;
    color: var(--cr-albastru);
}

.cr .cr-buton--secundar:hover {
    background: var(--cr-fundal);
    color: var(--cr-albastru);
}

.cr-gol {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 44px 20px 30px;
    text-align: center;
}

.cr-gol--filtre {
    background: var(--cr-fundal);
    border-radius: 16px;
}

.cr-gol__ico {
    width: 64px;
    height: 64px;
    margin-bottom: 18px;
    padding: 18px;
    background: var(--cr-fundal);
    border-radius: 50%;
    color: var(--cr-albastru);
}

.cr-gol--filtre .cr-gol__ico {
    background: #fff;
}

.cr .cr-gol__titlu {
    margin: 0 0 8px;
    color: var(--cr-text);
    font-family: var(--cr-font);
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    text-transform: none;
    overflow-wrap: anywhere;
}

.cr .cr-gol__text {
    max-width: 460px;
    margin: 0 0 18px;
    color: var(--cr-text-2);
    font-family: var(--cr-font);
    font-size: 14.5px;
    line-height: 1.5;
}

.cr-gol__sectiune {
    width: 100%;
    max-width: 760px;
    margin-top: 22px;
}

.cr .cr-gol__subtitlu {
    margin: 0 0 12px;
    color: var(--cr-text-2);
    font-family: var(--cr-font);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.09em;
    line-height: 1.3;
    text-transform: uppercase;
}

.cr-gol__lista {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.cr .cr-chip {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 7px 16px;
    background: var(--cr-fundal);
    border: 1px solid transparent;
    border-radius: 19px;
    color: var(--cr-albastru);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    transition: background-color 0.1s ease, border-color 0.1s ease, color 0.1s ease;
}

.cr .cr-chip:hover {
    background: #fff;
    border-color: var(--cr-portocaliu);
    color: var(--cr-portocaliu-inchis);
}

.cr .cr-chip--categorie {
    background: #fff;
    border-color: var(--cr-linie);
}

/* ------------------------------------------------------------------ */
/* Tableta si mobil: filtrele devin un panou care se deschide la cerere */
/* ------------------------------------------------------------------ */

html.cr-blocat,
html.cr-blocat body {
    overflow: hidden !important;
}

@media (max-width: 1199px) {
    .cr-corp {
        grid-template-columns: 248px minmax(0, 1fr);
        gap: 24px;
    }

    .cr-grila {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 16px;
    }
}

@media (max-width: 991px) {
    .cr {
        padding-top: 16px;
    }

    .cr-corp {
        display: block;
    }

    .cr .cr-antet__titlu {
        font-size: 24px;
    }

    .cr-antet {
        margin-bottom: 16px;
        padding-bottom: 14px;
    }

    .cr-bara {
        flex-wrap: wrap;
    }

    .cr-bara__filtre {
        display: inline-flex;
    }

    .cr-active {
        order: 3;
        flex: 0 0 100%;
    }

    .cr-active:empty {
        display: none;
    }

    .cr-sortare span {
        display: none;
    }

    /* fundalul intunecat din spatele panoului */
    .cr-corp::before {
        content: "";
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 10040;
        background: rgba(15, 20, 48, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.2s ease, visibility 0s linear 0.2s;
    }

    .cr-filtre-deschise .cr-corp::before {
        opacity: 1;
        visibility: visible;
        transition: opacity 0.2s ease;
    }

    .cr-filtre {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 10041;
        display: flex;
        flex-direction: column;
        width: min(360px, 88vw);
        max-height: none;
        overflow: hidden;
        border: 0;
        border-radius: 0 18px 18px 0;
        box-shadow: 0 0 60px rgba(15, 20, 48, 0.35);
        transform: translateX(-105%);
        visibility: hidden;
        transition: transform 0.24s ease, visibility 0s linear 0.24s;
    }

    .cr-filtre-deschise .cr-filtre {
        transform: none;
        visibility: visible;
        transition: transform 0.24s ease;
    }

    .cr-filtre__sus {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 12px 14px 18px;
        padding-top: calc(14px + env(safe-area-inset-top, 0px));
        border-bottom: 1px solid var(--cr-linie);
        font-size: 17px;
    }

    .cr-filtre__sus strong {
        color: var(--cr-albastru);
        font-weight: 600;
    }

    .cr-filtre__inchide {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        padding: 0;
        background: var(--cr-fundal);
        border: 0;
        border-radius: 50%;
        color: var(--cr-text);
        cursor: pointer;
    }

    .cr-filtre__corp {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .cr-filtre__jos {
        flex: 0 0 auto;
        display: flex;
        gap: 10px;
        padding: 12px 16px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        border-top: 1px solid var(--cr-linie);
        box-shadow: 0 -8px 20px -14px rgba(15, 20, 48, 0.35);
    }

    .cr-filtre__jos .cr-buton {
        flex: 1 1 auto;
    }

    .cr-filtre__jos .cr-buton--secundar {
        flex: 0 0 auto;
    }

    .cr .cr-categorie {
        min-height: 44px;
    }

    .cr .cr-bifa {
        min-height: 44px;
    }

    .cr-pret__slider {
        margin-left: 6px;
        margin-right: 6px;
    }

    /* 16px: sub aceasta valoare iOS mareste pagina la focus */
    .cr .cr-pret__camp input {
        height: 44px;
        font-size: 16px;
    }

    .cr-pret__camp em {
        bottom: 12px;
    }

    .cr-pret__cursor::-webkit-slider-thumb {
        width: 28px;
        height: 28px;
        margin-top: 0;
    }

    .cr-pret__cursor::-moz-range-thumb {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 575px) {
    .cr-grila {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .cr-card {
        border-radius: 14px;
    }

    .cr-card:hover {
        transform: none;
    }

    .cr-card__imagine img {
        top: 10px;
        left: 10px;
        width: calc(100% - 20px);
        height: calc(100% - 20px);
    }

    .cr-card__corp {
        gap: 5px;
        padding: 10px 10px 10px;
    }

    .cr .cr-card__nume {
        font-size: 13px;
    }

    .cr-card__pret strong {
        font-size: 19px;
    }

    .cr-card__cos {
        min-height: 42px;
        padding: 8px 6px;
        font-size: 13px;
        gap: 6px;
    }

    .cr-card__favorit {
        top: 6px;
        right: 6px;
        width: 36px;
        height: 36px;
    }

    .cr-card__reducere {
        top: 8px;
        left: 8px;
    }

    .cr .cr-sortare select {
        max-width: 190px;
    }

    .cr .cr-antet__titlu {
        font-size: 22px;
    }
}

@media (max-width: 339px) {
    .cr-card__cos .cr-ico {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cr-card,
    .cr-card__imagine img,
    .cr-filtre,
    .cr-corp::before {
        transition: none;
    }

    .cr-card:hover {
        transform: none;
    }

    .cr.cr-se-incarca::before {
        animation-duration: 3s;
    }
}

/* ================================================================== */
/* Listingul unei categorii (partials/listing_categorie.php)           */
/* ================================================================== */

/* --- drumul pana la categorie --- */

.cr-fir {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 8px;
    margin: 0 0 10px;
    color: var(--cr-text-3);
    font-size: 13px;
    line-height: 1.4;
}

.cr .cr-fir a {
    color: var(--cr-text-2);
}

.cr .cr-fir a:hover {
    color: var(--cr-portocaliu-inchis);
    text-decoration: underline;
}

.cr-fir__curent {
    color: var(--cr-text);
    font-weight: 500;
}

.cr--categorie {
    padding-top: 20px;
}

/* --- arborele de subcategorii, cu bife --- */

.cr .cr-arbore,
.cr .cr-arbore__copii {
    margin: 0;
    padding: 0;
    list-style: none;
}

.cr .cr-arbore {
    margin: 0 -8px;
}

.cr .cr-arbore li {
    margin: 0;
    padding: 0;
}

.cr-arbore__rand {
    display: flex;
    align-items: center;
    gap: 2px;
}

.cr .cr-bifa--arbore {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 38px;
    padding: 6px 8px;
    border-radius: 10px;
    transition: background-color 0.1s ease, color 0.1s ease;
}

.cr .cr-bifa--arbore:hover {
    background: var(--cr-fundal);
}

.cr-bifa__nume {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
}

.cr-bifa__numar {
    flex: 0 0 auto;
    min-width: 28px;
    padding: 2px 8px;
    background: var(--cr-fundal);
    border-radius: 10px;
    color: var(--cr-text-2);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    text-align: center;
}

.cr-bifa--arbore:hover .cr-bifa__numar {
    background: #fff;
}

.cr .cr-bifa--arbore.este-activ,
.cr .cr-bifa--arbore.este-partial {
    color: var(--cr-albastru);
    font-weight: 500;
}

.cr .cr-bifa--toate {
    margin-bottom: 4px;
    font-weight: 500;
}

/* bifa partiala: o parte dintre subcategoriile de dedesubt sunt bifate */
.cr-bifa.este-partial .cr-bifa__caseta {
    background: #fff;
    border-color: var(--cr-albastru);
    color: var(--cr-albastru);
}

/* fara produse cu filtrele curente */
.cr .cr-bifa--arbore.este-gol:not(.este-activ):not(.este-partial) {
    color: var(--cr-text-3);
}

.cr-arbore__extinde {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 50%;
    color: var(--cr-text-2);
    cursor: pointer;
    transition: background-color 0.1s ease, transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.cr-arbore__extinde:hover {
    background: var(--cr-fundal);
    color: var(--cr-albastru);
}

.cr-arbore__extinde .cr-ico {
    width: 16px;
    height: 16px;
    stroke-width: 2.4;
}

.cr-arbore__nod.este-deschis > .cr-arbore__rand .cr-arbore__extinde {
    transform: rotate(180deg);
}

.cr-arbore__extinde:focus-visible {
    outline: 3px solid rgba(39, 54, 118, 0.45);
    outline-offset: 2px;
}

.cr .cr-arbore__copii {
    display: none;
    margin: 0 0 6px 17px;
    padding-left: 12px;
    border-left: 1.5px solid var(--cr-linie);
}

.cr .cr-arbore__nod.este-deschis > .cr-arbore__copii {
    display: block;
}

.cr .cr-arbore__copii .cr-bifa--arbore {
    min-height: 34px;
    font-size: 13.5px;
}

@media (max-width: 991px) {
    .cr--categorie {
        padding-top: 14px;
    }

    .cr-fir {
        font-size: 12.5px;
    }

    .cr .cr-bifa--arbore,
    .cr .cr-arbore__copii .cr-bifa--arbore {
        min-height: 44px;
    }

    .cr-arbore__extinde {
        width: 44px;
        height: 44px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cr-arbore__extinde {
        transition: none;
    }
}

/* pe telefon, butonul de filtre si sortarea impart acelasi rand */
@media (max-width: 575px) {
    .cr-bara__filtre {
        flex: 1 1 0;
        justify-content: center;
        min-width: 0;
        padding: 0 10px;
        font-size: 13.5px;
        white-space: nowrap;
    }

    .cr .cr-sortare {
        flex: 1 1 0;
        min-width: 0;
        margin-left: 0;
    }

    .cr .cr-sortare select {
        width: 100%;
        max-width: none;
        padding-left: 12px;
        padding-right: 34px;
        text-overflow: ellipsis;
    }
}
