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

:root {
    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
    --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

@font-face {
    font-family: 'Geist';
    src: url('../fonts/geist.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Geist Mono';
    src: url('../fonts/geist-mono.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

body {
    font-family: 'Geist', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, .font-display {
    font-family: 'Geist', sans-serif;
    letter-spacing: -0.025em;
}

/* ---- scroll reveal ---- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .55s ease, transform .55s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- marquee ---- */
@keyframes marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

.marquee-track {
    display: flex;
    animation: marquee 22s linear infinite;
    white-space: nowrap;
}

/* ---- faq answer ---- */
.faq-answer {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 380ms var(--ease-in-out);
}
.faq-answer-inner { overflow: hidden; }
.faq-item.open .faq-answer { grid-template-rows: 1fr; }

.faq-item {
    transition: border-color 250ms ease, box-shadow 250ms ease;
}
.faq-item.open {
    border-color: #ffbaba;
    box-shadow: 0 20px 45px -30px rgba(232,25,44,.35);
}

.faq-icon {
    transition: transform 300ms var(--ease-out), background-color 250ms ease, border-color 250ms ease, color 250ms ease;
}
.faq-item.open .faq-icon {
    background: #e8192c;
    border-color: #e8192c;
    color: #fff;
}

/* ---- service cards ---- */
.svc-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #e8192c;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .4s cubic-bezier(.2,.8,.2,1);
}
.svc:hover .svc-bar { transform: scaleX(1); }
.svc:hover { transform: translateY(-3px); }

.svc-ico {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    border: 1px solid #ffe0e0;
    background: #fff1f1;
    color: #e8192c;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: background .3s ease, transform .3s ease;
}
.svc-ico svg { width: 22px; height: 22px; }
.svc:hover .svc-ico { background: #e8192c; color: #fff; transform: translateY(-2px); }

/* ---- hero ---- */
.hero-btn {
    transition: transform 160ms var(--ease-out), box-shadow 200ms var(--ease-out), background-color 200ms ease, border-color 200ms ease;
}
.hero-btn:active { transform: scale(0.97); }

.hero-badge-dot {
    animation: hero-pulse 2.2s var(--ease-in-out) infinite;
}
@keyframes hero-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.55; transform: scale(0.85); }
}

@media (prefers-reduced-motion: reduce) {
    .hero-badge-dot { animation: none; }
}

/* ---- site header ---- */
#site-header {
    background-color: rgba(255, 255, 255, .82);
    border-bottom: 1px solid transparent;
    box-shadow: none;
    transition: background-color 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}
#site-header.header-scrolled {
    background-color: rgba(255, 255, 255, .97);
    border-bottom-color: #f1f1f2;
    box-shadow: 0 1px 0 rgba(10, 10, 10, .04), 0 16px 32px -20px rgba(10, 10, 10, .16);
}

.nav-logo-mark { transition: transform 200ms var(--ease-out); }
.nav-logo:hover .nav-logo-mark { transform: scale(1.08) rotate(-4deg); }

.nav-link {
    position: relative;
    padding-bottom: 3px;
}
.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 2px;
    border-radius: 2px;
    background: #e8192c;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 220ms var(--ease-out);
}
.nav-link:hover::after,
.nav-link.is-active::after {
    transform: scaleX(1);
}
.nav-link.is-active {
    color: #0a0a0a;
    font-weight: 600;
}

.mobile-nav-link.is-active {
    color: #e8192c;
}

/* ---- nav dropdowns (desktop) — Import auto / Resurse / Companie ---- */
.nav-dropdown-panel {
    transform: translate(-50%, -6px) scale(.97);
    opacity: 0;
    pointer-events: none;
    transition: transform 180ms var(--ease-out), opacity 160ms var(--ease-out);
}
.nav-dropdown-panel.open {
    transform: translate(-50%, 0) scale(1);
    opacity: 1;
    pointer-events: auto;
}
.nav-dropdown-chevron {
    transition: transform 180ms var(--ease-out);
}
.nav-dropdown-btn[aria-expanded="true"] .nav-dropdown-chevron {
    transform: rotate(180deg);
}

@media (prefers-reduced-motion: reduce) {
    .nav-logo-mark,
    .nav-link::after,
    .nav-dropdown-panel,
    .nav-dropdown-chevron {
        transition: none;
    }
}

/* ---- mobile menu ---- */
#mobile-menu {
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out);
}
#mobile-menu.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
    #mobile-menu {
        transition: opacity 160ms ease;
        transform: none;
    }
}

/* ---- logistics route ---- */
.route-dot {
    position: relative;
    z-index: 2;
    width: 56px;
    height: 56px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1.5px solid #ffbaba;
    color: #e8192c;
    flex-shrink: 0;
    transition: all .3s ease;
}
.route-step:hover .route-dot { background: #e8192c; color: #fff; border-color: #e8192c; transform: scale(1.06); }
.route-dot svg { width: 24px; height: 24px; }

/* ---- tiktok cards ---- */
.tt-card { transition: transform .35s ease, box-shadow .35s ease; }
.tt-card:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -20px rgba(232,25,44,.45); }

/* ---- contact modal ---- */
#contact-modal .contact-modal-panel {
    transition: transform 250ms var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1)),
                opacity 250ms var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1));
    transform: scale(0.95);
    opacity: 0;
}
#contact-modal.is-open .contact-modal-panel {
    transform: scale(1);
    opacity: 1;
}
#contact-modal-backdrop {
    transition: opacity 250ms ease;
    opacity: 0;
}
#contact-modal.is-open #contact-modal-backdrop {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    #contact-modal .contact-modal-panel {
        transition: opacity 200ms ease;
        transform: none;
    }
    #contact-modal.is-open .contact-modal-panel {
        transform: none;
    }
}

/* ---- gallery ---- */
.gallery-tile img,
.gallery-tile video { pointer-events: none; }

#gallery-modal .gallery-modal-panel {
    transition: transform 250ms var(--ease-out), opacity 250ms var(--ease-out);
    transform: scale(0.95);
    opacity: 0;
}
#gallery-modal.is-open .gallery-modal-panel {
    transform: scale(1);
    opacity: 1;
}
#gallery-modal-backdrop {
    transition: opacity 250ms ease;
    opacity: 0;
}
#gallery-modal.is-open #gallery-modal-backdrop {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    #gallery-modal .gallery-modal-panel {
        transition: opacity 200ms ease;
        transform: none;
    }
    #gallery-modal.is-open .gallery-modal-panel {
        transform: none;
    }
}

/* ---- blog article content (HTML scris de admin in baza de date) ---- */
.blog-content h2, .blog-content h3 {
    font-family: 'Geist', sans-serif;
    letter-spacing: -0.025em;
    color: #0a0a0a;
    font-weight: 600;
}
.blog-content h2 { font-size: 1.375rem; margin: 2.25rem 0 .9rem; }
.blog-content h3 { font-size: 1.125rem; margin: 1.75rem 0 .75rem; }
.blog-content p  { margin: 0 0 1.1rem; }
.blog-content ul, .blog-content ol { margin: 0 0 1.1rem; padding-left: 1.25rem; }
.blog-content li { margin-bottom: .4rem; }
.blog-content ul { list-style: disc; }
.blog-content ol { list-style: decimal; }
.blog-content a { color: #e8192c; text-decoration: underline; text-underline-offset: 2px; }
.blog-content a:hover { color: #c7000f; }
.blog-content strong { color: #0a0a0a; font-weight: 600; }
.blog-content blockquote {
    margin: 1.5rem 0;
    padding: .1rem 1.25rem;
    border-left: 2px solid #ffbaba;
    color: #4b5563;
    font-style: italic;
}
.blog-content figure { margin: 1.75rem 0; }
.blog-content img {
    width: 100%;
    height: auto;
    border-radius: .75rem;
    display: block;
}
.blog-content figcaption {
    margin-top: .5rem;
    font-size: .8rem;
    color: #9ca3af;
    text-align: center;
}

/* ---- catalog (catalog.php) ---- */
.catalog-card-wrap {
    animation: catalog-rise .5s var(--ease-out, cubic-bezier(.22, 1, .36, 1)) both;
    animation-delay: calc(var(--i, 0) * 40ms);
}
@keyframes catalog-rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* skeleton shimmer sub poza, pana se incarca imaginea (imaginea o acopera) */
.catalog-photo::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .7) 50%, transparent 70%);
    background-size: 220% 100%;
    animation: catalog-shimmer 1.4s linear infinite;
}
.catalog-photo > * { position: relative; }
.catalog-photo > .absolute { position: absolute; }
@keyframes catalog-shimmer {
    from { background-position: 120% 0; }
    to   { background-position: -120% 0; }
}

/* galeria de poze: track-ul aluneca pe orizontala, un slide = latimea cardului */
.catalog-track {
    transition: transform .3s cubic-bezier(.22, 1, .36, 1);
}
.catalog-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 9999px;
    background: rgba(255, 255, 255, .9);
    color: #111827;
    opacity: 0;
    cursor: pointer;
    transition: opacity .2s ease, background-color .2s ease;
}
.catalog-nav-prev { left: .5rem; }
.catalog-nav-next { right: .5rem; }
.catalog-photo:hover .catalog-nav,
.catalog-nav:focus-visible {
    opacity: 1;
}
.catalog-nav:hover { background: #fff; }
.catalog-dots {
    z-index: 10;
    opacity: 0;
    transition: opacity .2s ease;
}
.catalog-photo:hover .catalog-dots { opacity: 1; }
.catalog-dot {
    width: .375rem;
    height: .375rem;
    padding: 0;
    border: 0;
    border-radius: 9999px;
    background: rgba(255, 255, 255, .55);
    cursor: pointer;
    transition: background-color .2s ease, transform .2s ease;
}
.catalog-dot.is-active {
    background: #fff;
    transform: scale(1.25);
}

/* pagina masinii (car.php): lightbox-ul galeriei, pe tot ecranul */
.gal-lightbox {
    width: 100vw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 3.5rem 1rem;
    border: 0;
    background: rgba(3, 7, 18, .94);
}
.gal-lightbox::backdrop { background: transparent; }
.gal-lb-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 0;
    border-radius: 9999px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    cursor: pointer;
    transition: background-color .2s ease;
}
.gal-lb-btn:hover { background: rgba(255, 255, 255, .24); }
.gal-lb-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.gal-lb-close { top: .75rem; right: .75rem; transform: none; }
/* .catalog-nav / .gal-lb-btn au display:flex — "hidden" din Tailwind trebuie sa castige */
.gal-step.hidden { display: none; }

/* pagina masinii: "masina virtuala" cu piesele reparate/inlocuite (sections/car-diagram.php) */
.car-diagram .dg-body    { fill: #fff; stroke: #d1d5db; stroke-width: 1.5; }
.car-diagram .dg-wheel   { fill: #4b5563; }
.car-diagram .dg-glass   { fill: #e0f2fe; stroke: #bae6fd; }
.car-diagram .dg-neutral { fill: #f3f4f6; stroke: #e5e7eb; }
.car-diagram .dg-part    { fill: #f9fafb; stroke: #cbd5e1; stroke-width: 1; transition: stroke .15s ease, stroke-width .15s ease; }
.car-diagram .dg-label   { font-size: 9px; fill: #6b7280; }
.car-diagram .dg-x,  .dg-dot.dg-x  { fill: #ef4444; stroke: #b91c1c; background: #ef4444; }
.car-diagram .dg-wc, .dg-dot.dg-wc { fill: #f97316; stroke: #c2410c; background: #f97316; }
.car-diagram .dg-w,  .dg-dot.dg-w  { fill: #fbbf24; stroke: #b45309; background: #fbbf24; }
.dg-dot { display: inline-block; width: .75rem; height: .75rem; border-radius: .2rem; flex-shrink: 0; }
.dg-dot.dg-ok { background: #f9fafb; box-shadow: inset 0 0 0 1px #cbd5e1; }
.car-diagram .dg-part.dg-hi { stroke: #111827; stroke-width: 2.5; }
.dg-row.dg-hi { background: #f9fafb; }

/* pagina masinii: modalul "Cere calcul complet" */
.offer-dialog {
    width: calc(100% - 2rem);
    max-width: 28rem;
    max-height: calc(100dvh - 2rem);
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 30px 60px -20px rgba(17, 24, 39, .35);
    overflow-y: auto;
}
.offer-dialog::backdrop {
    background: rgba(17, 24, 39, .6);
    backdrop-filter: blur(4px);
}
.offer-dialog[open] { animation: offer-in .22s var(--ease-out, cubic-bezier(.23, 1, .32, 1)); }
@keyframes offer-in {
    from { opacity: 0; transform: translateY(8px) scale(.98); }
    to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
    .offer-dialog[open] { animation: none; }
}

@media (hover: none) {
    /* fara hover (touch): sagetile si punctele raman vizibile permanent */
    .catalog-nav, .catalog-dots { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .catalog-card-wrap { animation: none; }
    .catalog-photo::before { animation: none; }
    .catalog-card, .catalog-img { transition: none; }
    .catalog-card:hover { transform: none; }
    .catalog-card:hover .catalog-img { transform: none; }
    .catalog-track { transition: none; }
}

/* ---- catalog filters: translucent sticky toolbar, pill selects ---- */
.cf-bar {
    position: relative; z-index: 30;
    padding: .625rem;
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, .72);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(17, 24, 39, .08);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 18px 40px -24px rgba(17, 24, 39, .28);
    transition: opacity 200ms ease;
}
@media (min-width: 1024px) {
    .cf-bar { position: sticky; top: 4.75rem; }
}
.cf-bar.is-loading { opacity: .6; pointer-events: none; }
.cf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
@media (min-width: 768px)  { .cf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .cf-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.cf-field {
    position: relative; min-width: 0; min-height: 3.5rem;
    border-radius: .875rem; background: #f3f4f6;
    transition: background-color 160ms ease, box-shadow 160ms ease;
}
.cf-field:hover { background: #ebedf0; }
.cf-field:focus-within { background: #fff; box-shadow: 0 0 0 2px #e8192c; }
.cf-field label {
    position: absolute; left: 1rem; top: .55rem; right: 2.25rem;
    font-size: .6875rem; font-weight: 500; letter-spacing: .02em; color: #6b7280;
    pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cf-field select, .cf-sort select {
    -webkit-appearance: none; appearance: none;
    width: 100%; cursor: pointer; border: 0; outline: 0; background-color: transparent;
    font: inherit; color: #111827; text-overflow: ellipsis;
}
.cf-field select {
    height: 3.5rem; padding: 1.35rem 2.25rem .3rem 1rem;
    font-size: .9375rem; font-weight: 500;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right .8rem center; background-size: 1rem;
}
.cf-field select:disabled { cursor: not-allowed; color: #9ca3af; }
.cf-field:has(select:disabled) { opacity: .65; }
.cf-field:has(select:disabled):hover { background: #f3f4f6; }

.cf-chip, .cf-reset {
    display: inline-flex; align-items: center; gap: .375rem; min-height: 2rem;
    border-radius: 999px; font-size: .8125rem; font-weight: 500; text-decoration: none;
    transition: background-color 160ms ease, transform 160ms var(--ease-out), color 160ms ease;
}
.cf-chip { padding: .25rem .5rem .25rem .8rem; background: #111827; color: #fff; }
.cf-chip:hover { background: #1f2937; }
.cf-chip:active, .cf-reset:active { transform: scale(.96); }
.cf-reset { padding: .25rem .6rem; color: #6b7280; }
.cf-reset:hover { color: #e8192c; }
.cf-chip:focus-visible, .cf-reset:focus-visible, .cf-sort:focus-within {
    outline: 2px solid #e8192c; outline-offset: 2px;
}

.cf-sort {
    position: relative; display: inline-flex; align-items: center; gap: .5rem;
    height: 2.75rem; padding: 0 2.25rem 0 .9rem;
    border-radius: 999px; background: #f3f4f6; font-size: .875rem;
    transition: background-color 160ms ease;
}
.cf-sort:hover { background: #ebedf0; }
.cf-sort-ico { width: 1rem; height: 1rem; color: #6b7280; flex: none; }
.cf-sort label { color: #6b7280; white-space: nowrap; }
.cf-sort select { width: auto; font-weight: 600; }
.cf-sort.is-open, .cf-field.is-open { z-index: 40; }

/* select nativ ascuns cand dropdown-ul propriu e activ (ramane in DOM pentru formular) */
.cf-field select.cf-native, .cf-sort select.cf-native {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: 0; overflow: hidden;
    opacity: 0; pointer-events: none; background: none;
}
.cf-btn {
    -webkit-appearance: none; appearance: none;
    display: block; width: 100%; border: 0; outline: 0; background: transparent; cursor: pointer;
    font: inherit; color: #111827; text-align: left; -webkit-tap-highlight-color: transparent;
}
.cf-btn::after {
    content: ""; position: absolute; right: .8rem; top: 50%; width: 1rem; height: 1rem; margin-top: -.5rem;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: transform 200ms var(--ease-out);
}
.is-open > .cf-btn::after { transform: rotate(180deg); }
.cf-val { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cf-field .cf-btn {
    position: absolute; inset: 0; border-radius: .875rem;
    padding: 1.35rem 2.25rem .3rem 1rem; font-size: .9375rem; font-weight: 500;
}
.cf-field .cf-btn:disabled { cursor: not-allowed; color: #9ca3af; }
.cf-field .cf-btn:focus-visible { box-shadow: 0 0 0 2px #e8192c; }
.cf-sort .cf-btn { position: static; width: auto; padding: 0; font-weight: 600; font-size: .875rem; }
.cf-sort .cf-btn:focus-visible { outline: none; }

.cf-menu {
    position: absolute; left: 0; top: calc(100% + .375rem); z-index: 50;
    min-width: 100%; max-height: min(20rem, 60vh); overflow-y: auto; overscroll-behavior: contain;
    margin: 0; padding: .375rem; list-style: none;
    border-radius: 1rem; background: rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(17, 24, 39, .08);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 24px 48px -16px rgba(17, 24, 39, .32), 0 4px 12px -4px rgba(17, 24, 39, .12);
    opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.98); transform-origin: top left;
    transition: opacity 120ms ease, transform 120ms ease, visibility 0s linear 120ms;
}
.is-open > .cf-menu {
    opacity: 1; visibility: visible; transform: none;
    transition: opacity 180ms var(--ease-out), transform 220ms var(--ease-out), visibility 0s;
}
.cf-sort .cf-menu { left: auto; right: 0; min-width: 15rem; transform-origin: top right; }
.cf-opt {
    display: flex; align-items: center; justify-content: space-between; gap: .75rem;
    padding: .625rem .75rem; border-radius: .625rem; cursor: pointer;
    font-size: .9375rem; font-weight: 400; color: #374151;
}
.cf-opt svg { width: 1rem; height: 1rem; flex: none; color: #e8192c; opacity: 0; }
.cf-opt.is-active { background: rgba(17, 24, 39, .06); color: #111827; }
.cf-opt[aria-selected="true"] { font-weight: 600; color: #111827; }
.cf-opt[aria-selected="true"] svg { opacity: 1; }
.cf-menu::-webkit-scrollbar { width: .5rem; }
.cf-menu::-webkit-scrollbar-thumb { background: rgba(17, 24, 39, .18); border-radius: 999px; border: 2px solid transparent; background-clip: content-box; }
.cf-apply {
    margin-top: .5rem; height: 2.75rem; padding: 0 1.25rem; border: 0; border-radius: 999px;
    background: #e8192c; color: #fff; font-weight: 500; cursor: pointer;
}
@media (max-width: 480px) {
    .cf-sort label { display: none; }
}
/* paginare: pe telefon un singur rand (sageti fara text, doar pagina curenta + prima/ultima) */
.cf-pages { display: flex; align-items: center; justify-content: center; gap: .375rem; margin-top: 3rem; }
.cf-pg-set { display: contents; }
.cf-pg-desk { display: none; }
.cf-pg {
    display: inline-flex; align-items: center; justify-content: center; gap: .25rem;
    height: 2.5rem; min-width: 2.5rem; padding: 0 .625rem; flex: none;
    border-width: 1px; border-style: solid; border-radius: .625rem; font-size: .875rem; font-weight: 500;
    font-variant-numeric: tabular-nums; text-decoration: none;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}
.cf-pg svg { width: 1.125rem; height: 1.125rem; flex: none; }
.cf-pg-step { padding: 0; }
.cf-pg-txt { display: none; }
.cf-pg-gap { width: 1.25rem; flex: none; text-align: center; color: #9ca3af; }
@media (min-width: 640px) {
    .cf-pages { gap: .5rem; }
    .cf-pg-mob { display: none; }
    .cf-pg-desk { display: contents; }
    .cf-pg { height: 2.75rem; min-width: 2.75rem; padding: 0 .75rem; border-radius: .5rem; }
    .cf-pg-step { padding: 0 .875rem 0 .75rem; }
    .cf-pg-step[rel="next"] { padding: 0 .75rem 0 .875rem; }
    .cf-pg-txt { display: inline; }
    .cf-pg-gap { width: 2rem; }
}

/* buton "inapoi sus": apare dupa ce vizitatorul a coborat in lista */
.cf-top {
    position: fixed; right: 1.25rem; bottom: calc(1.25rem + env(safe-area-inset-bottom)); z-index: 45;
    display: flex; align-items: center; justify-content: center;
    width: 3rem; height: 3rem; border: 0; border-radius: 999px; cursor: pointer;
    background: #111827; color: #fff; -webkit-tap-highlight-color: transparent;
    box-shadow: 0 12px 28px -10px rgba(17, 24, 39, .5);
    opacity: 0; visibility: hidden; transform: translateY(.75rem) scale(.9);
    transition: opacity 180ms ease, transform 220ms var(--ease-out), visibility 0s linear 220ms, background-color 160ms ease;
}
.cf-top.is-visible {
    opacity: 1; visibility: visible; transform: none;
    transition: opacity 180ms ease, transform 220ms var(--ease-out), visibility 0s, background-color 160ms ease;
}
.cf-top:hover { background: #e8192c; }
.cf-top:active { transform: scale(.94); }
.cf-top:focus-visible { outline: 2px solid #e8192c; outline-offset: 3px; }
@media (min-width: 768px) {
    .cf-top { right: 2rem; bottom: 2rem; }
}

/* telefon: campuri mai compacte, ultimul camp fara pereche ocupa tot randul, iar meniurile se
   deschid ca panou jos pe toata latimea (bottom sheet) in loc de lista ingusta sub camp */
@media (max-width: 767px) {
    .cf-bar {
        padding: .5rem; border-radius: 1rem; background: #fff;
        -webkit-backdrop-filter: none; backdrop-filter: none; /* altfel meniul fixed s-ar pozitiona fata de bara */
    }
    .cf-bar:has(.is-open), .cf-sort.is-open { z-index: 60; } /* peste header-ul fix (z-50) */
    .cf-grid > .cf-field:last-child:nth-child(odd) { grid-column: 1 / -1; }
    .cf-field { min-height: 3.25rem; }
    .cf-field label { left: .875rem; top: .5rem; right: 2rem; }
    .cf-field select { height: 3.25rem; }
    .cf-field select, .cf-field .cf-btn { padding: 1.3rem 2rem .3rem .875rem; font-size: .875rem; }
    .cf-field .cf-btn::after { right: .7rem; }
    .cf-sort { display: flex; width: 100%; }
    .cf-sort .cf-btn { flex: 1; }

    .cf-field.is-open::before, .cf-sort.is-open::before {
        content: ""; position: fixed; inset: 0; background: rgba(17, 24, 39, .45);
    }
    .cf-menu, .cf-sort .cf-menu {
        position: fixed; left: 0; right: 0; top: auto; bottom: 0; min-width: 0; max-height: 70vh;
        padding: 0 .5rem calc(.75rem + env(safe-area-inset-bottom));
        border-radius: 1.25rem 1.25rem 0 0; border-width: 1px 0 0; background: #fff;
        -webkit-backdrop-filter: none; backdrop-filter: none;
        box-shadow: 0 -12px 40px -12px rgba(17, 24, 39, .35);
        transform: translateY(2rem);
    }
    .cf-menu::before {
        content: attr(data-title); display: block; position: sticky; top: 0; z-index: 1;
        padding: 1.125rem .75rem .625rem; background: #fff;
        font-size: 1rem; font-weight: 600; color: #111827;
    }
    .cf-opt { padding: .875rem .75rem; font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
    .cf-bar, .cf-field, .cf-chip, .cf-reset, .cf-sort, .cf-menu, .cf-btn::after, .cf-top, .cf-top.is-visible { transition: none; }
}
@media (prefers-reduced-transparency: reduce) {
    .cf-bar { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
    .cf-menu { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* ---- fundaluri pe pagina principala ----
   Sectiunile "gri" nu incep brusc: gri-ul (#f9fafb = gray-50) se topeste in alb
   sus si jos, ca trecerea dintre sectiuni sa fie lina. Ultima (contact) ramane
   gri pana jos, lipita de footer. */
.section-soft {
    background: linear-gradient(to bottom, #fff 0%, #f9fafb 22%, #f9fafb 78%, #fff 100%);
}
.section-soft-end {
    background: linear-gradient(to bottom, #fff 0%, #f9fafb 22%);
}
