﻿#products-root {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
    color: #1f2933;
}

.products-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

    .products-header h1 {
        font-size: clamp(2rem, 4vw, 2.75rem);
        margin-bottom: 0.75rem;
        font-weight: 700;
    }

    .products-header .lead {
        font-size: clamp(1rem, 2.5vw, 1.2rem);
        color: #52606d;
        margin: 0;
    }

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    color: #52606d;
}

.crumb-button {
    border: none;
    background: none;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    color: inherit;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

    .crumb-button:focus-visible,
    .crumb-button:hover {
        background-color: rgba(67, 97, 238, 0.12);
        color: #1f2933;
        outline: none;
    }

.crumb-separator {
    opacity: 0.4;
}

.toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.5rem;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    border-radius: 999px;
    padding: 0.55rem 1.25rem;
    background: linear-gradient(135deg, #4361ee, #4895ef);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 12px 25px rgba(67, 97, 238, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .back-button[disabled] {
        background: #d2d6dc;
        color: #7b8794;
        cursor: not-allowed;
        box-shadow: none;
    }

    .back-button:not([disabled]):hover,
    .back-button:not([disabled]):focus-visible {
        transform: translateY(-1px);
        box-shadow: 0 18px 30px rgba(67, 97, 238, 0.3);
        outline: none;
    }

.category-description {
    max-width: 60ch;
    margin: 0 auto 2rem;
    text-align: center;
    color: #334155;
    font-size: 1.05rem;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.category-card {
    border: none;
    padding: 0;
    text-align: left;
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.12);
    background: linear-gradient(165deg, #ffffff 0%, #f2f6ff 100%);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

    .category-card img {
        width: 100%;
        aspect-ratio: 4 / 3;
        object-fit: cover;
    }

.category-card__body {
    padding: 1.25rem 1.35rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

    .category-card__body h2 {
        font-size: 1.2rem;
        font-weight: 600;
        margin: 0;
        color: #1f2933;
    }

    .category-card__body p {
        margin: 0;
        color: #52606d;
        line-height: 1.5;
        font-size: 0.95rem;
    }

.category-card:hover,
.category-card:focus-visible {
    transform: translateY(-6px);
    box-shadow: 0 22px 45px rgba(15, 23, 42, 0.18);
    outline: none;
}

.product-type-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.product-type-card {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    padding: 1.5rem;
    border-radius: 1.25rem;
    background: linear-gradient(165deg, #ffffff 0%, #f7f9ff 100%);
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.1);
    color: inherit;
    text-decoration: none;
    align-items: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.product-type-card__image {
    flex: 0 0 180px;
    max-width: 220px;
}

    .product-type-card__image img {
        width: 100%;
        border-radius: 1rem;
        object-fit: cover;
    }

.product-type-card__content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.product-type-card__header {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

    .product-type-card__header h3 {
        margin: 0;
        font-size: 1.35rem;
        font-weight: 600;
        color: #1f2933;
    }

.product-sku {
    display: inline-flex;
    align-self: flex-start;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    background: rgba(67, 97, 238, 0.15);
    color: #1f2933;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.product-type-card ul {
    margin: 0;
    padding-left: 1.1rem;
    color: #475569;
    line-height: 1.55;
    font-size: 1rem;
}

.product-type-card:hover,
.product-type-card:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 25px 45px rgba(15, 23, 42, 0.18);
    outline: none;
}

.empty-state {
    text-align: center;
    margin-top: 3rem;
    color: #64748b;
}

.is-pressable {
    position: relative;
}

    .is-pressable::after {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: inherit;
        opacity: 0;
        background: radial-gradient(circle at center, rgba(72, 149, 239, 0.35), transparent 70%);
        transition: opacity 0.25s ease;
    }

    .is-pressable.is-pressable--active::after {
        opacity: 1;
    }

@media (max-width: 900px) {
    #products-root {
        padding: 2rem 1.25rem 3rem;
    }

    .product-type-card {
        flex-direction: column;
        align-items: stretch;
    }

    .product-type-card__image,
    .product-type-card__image img {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .breadcrumbs {
        justify-content: center;
    }

    .toolbar {
        justify-content: center;
    }

    .back-button {
        width: 100%;
        justify-content: center;
    }

    .category-grid {
        grid-template-columns: 1fr;
    }

    .product-type-card {
        padding: 1.25rem;
    }

    .product-type-card__header h3 {
        font-size: 1.2rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

#products-root .tiles-wrap {
    width: 100%;
    padding: 10px;
}

#products-root .tiles-grid {
    display: grid;
    gap: 10px;
    /* rugalmas rács: 220–1fr szélességű csempék */
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

#products-root .tile-container {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
}

#products-root .tile {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 70%; /* arányos magasság (kb. 16:9 közelében) */
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,.25), 0 12px 24px rgba(0,0,0,.3);
    transform: translateZ(0); /* hover smoothness */
    transition: transform .18s ease, box-shadow .18s ease;
    background: #000; /* amíg a kép tölt */
}

    #products-root .tile img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

#products-root .tile__text {
    position: absolute;
    inset: auto 0 0 0; /* alulra fektetett felirat */
    padding: 10px 12px;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.55) 60%, rgba(0,0,0,.72) 100%);
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,.35);
    font-weight: 700;
    font-size: clamp(1rem, 2.4vw, 1.25rem);
    display: flex;
    align-items: flex-end;
    min-height: 38%;
}

#products-root .tile-container:focus-visible .tile,
#products-root .tile-container:hover .tile {
    transform: translateY(-4px);
    box-shadow: 0 10px 22px rgba(0,0,0,.22), 0 18px 38px rgba(0,0,0,.28);
    outline: none;
}

/* Kisebb kijelzőkön picit magasabb csempe, jobb olvashatóság */
@media (max-width: 640px) {
    #products-root .tile {
        padding-bottom: 78%;
    }
}

/* === Products: fő kategóriák "tile" megjelenése (Industries-szerű) === */
#products-root .tiles-wrap {
    width: 100%;
    padding: 10px;
}

#products-root .tiles-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

#products-root .tile-container {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
}

#products-root .tile {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 70%; /* arányos magasság */
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,.25), 0 12px 24px rgba(0,0,0,.3);
    transform: translateZ(0);
    transition: transform .18s ease, box-shadow .18s ease;
    background: #000;
}

    #products-root .tile img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

#products-root .tile__text {
    position: absolute;
    inset: auto 0 0 0; /* alul overlay sáv */
    padding: 10px 12px;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.55) 60%, rgba(0,0,0,.72) 100%);
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,.35);
    font-weight: 700;
    font-size: clamp(1rem, 2.4vw, 1.25rem);
    display: flex;
    align-items: flex-end;
    min-height: 38%;
}

#products-root .tile-container:focus-visible .tile,
#products-root .tile-container:hover .tile {
    transform: translateY(-4px);
    box-shadow: 0 10px 22px rgba(0,0,0,.22), 0 18px 38px rgba(0,0,0,.28);
    outline: none;
}

/* Kisebb kijelzőkön kicsit magasabb csempe */
@media (max-width: 640px) {
    #products-root .tile {
        padding-bottom: 78%;
    }
}

/* === Submenu (child) tiles: 75% image + 25% text === */
.submenu-grid {
    display: grid;
    gap: 1.25rem;
    /* 1–3 oszlop: nagy kijelzőn 3, közepesen 2, mobilon 1 */
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 1024px) {
    .submenu-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .submenu-grid {
        grid-template-columns: 1fr;
    }
}

.submenu-tile {
    border: 0;
    padding: 0;
    border-radius: 1.1rem;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.12);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    /* A teljes kártya képaránya; a belsejében 75% lesz a kép */
    aspect-ratio: 3 / 5;
    transition: transform .22s ease, box-shadow .22s ease;
}

    .submenu-tile:hover,
    .submenu-tile:focus-visible {
        transform: translateY(-6px);
        box-shadow: 0 22px 45px rgba(15, 23, 42, 0.18);
        outline: none;
    }

/* Képzóna: a kártya 75%-a */
.submenu-tile__image {
    position: relative;
    flex: 0 0 60%;
    background: #f3f4f6;
}

    .submenu-tile__image img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* Fehér kiemelt cím a képen */
.submenu-tile__name {
    position: absolute;
    left: 12px;
    bottom: 12px;
    background: rgba(255,255,255,0.95);
    color: #111827;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 8px 18px rgba(0,0,0,0.15);
}

/* Leírás: a kártya alsó 25%-a */
.submenu-tile__body {
    flex: 1 1 35%;
    padding: 0.5rem 0.5rem 1.25rem;
    display: flex;
    align-items: center;
}

.submenu-tile__desc {
    margin: 0;
    color: #475569;
    line-height: 1.45;
    font-size: 1rem;
    /* 3 sorra tördelés, túlcsordulás elrejtése */
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

    .submenu-tile__desc.is-empty {
        /* Ha még nincs shortDescription, maradjon a magasság egységes */
        visibility: hidden;
    }

/* === ALMENÜ képméret javítás: a teljes kép látszódjon, ne vágjuk le === */
#products-root .submenu-tile__image {
    position: relative;
    flex: 0 0 75%;
    display: flex;
    align-items: center; /* kép középre igazítása függőlegesen */
    justify-content: center; /* kép középre igazítása vízszintesen */
    background: #fff; /* fehér háttér a "letterbox" sávokhoz */
    overflow: hidden;
}

    #products-root .submenu-tile__image img {
        /* Felülírjuk az esetleges absolute/inset korábbi beállításokat */
        position: static;
        inset: auto;
        /* A kép férjen bele a rendelkezésre álló helybe, torzítás nélkül */
        width: 100%;
        height: 100%;
        object-fit: contain; /* << kulcs: teljes kép, vágás nélkül */
        object-position: center; /* középre igazítás */
        display: block;
    }

/* A névcímke maradjon a kép fölött */
#products-root .submenu-tile__name {
    position: absolute;
    left: 12px;
    bottom: 12px;
    z-index: 2;
    background: rgba(255,255,255,0.95);
}

/* === Product template panel === */
.product-template {
    margin: 1.5rem 0 2.5rem;
}

.product-panel {
    border: none;
    border-radius: 1.25rem; /* lekerekített */
    background: linear-gradient(165deg, #ffffff 0%, #f7f9ff 100%);
    box-shadow: 0 18px 35px rgba(15,23,42,.12), 0 8px 18px rgba(15,23,42,.06); /* 3D hatás */
    overflow: hidden;
}

.product-panel__header {
    padding: 1.2rem 1.5rem 0.5rem;
    display: flex;
    gap: .75rem;
    align-items: center;
    flex-wrap: wrap;
}

    .product-panel__header h1 {
        margin: 0;
        font-size: clamp(1.25rem, 2.5vw, 1.6rem);
        font-weight: 700;
        color: #1f2933;
    }

    .product-panel__header .badge {
        display: inline-flex;
        align-items: center;
        padding: .3rem .6rem;
        border-radius: 999px;
        background: rgba(67,97,238,.15);
        color: #1f2933;
        font-weight: 600;
        letter-spacing: .02em;
    }

.product-panel__body {
    display: grid;
    grid-template-columns: 1fr 1.2fr; /* kép + tartalom */
    gap: 1.25rem;
    padding: 1rem 1.5rem 1.25rem;
}

@media (max-width: 900px) {
    .product-panel__body {
        grid-template-columns: 1fr;
    }
}

.product-media {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 1rem;
    min-height: 260px;
    box-shadow: inset 0 0 0 1px rgba(15,23,42,.06);
    padding: .75rem;
}

    .product-media img {
        width: 100%;
        height: 100%;
        object-fit: contain; /* ne vágjuk a képet */
        display: block;
        border-radius: .75rem;
    }

.product-media__placeholder {
    color: #64748b;
    font-size: .95rem;
}

.product-content .lead {
    margin: 0 0 .75rem 0;
    font-size: 1.05rem;
    color: #334155;
}

.product-content .description {
    color: #475569;
    line-height: 1.6;
}

.docs h3 {
    margin: 1rem 0 .5rem 0;
    font-size: 1.05rem;
}

.docs ul {
    margin: 0;
    padding-left: 1.2rem;
}

.product-panel__footer {
    padding: 0 1.5rem 1.25rem;
    display: flex;
    justify-content: flex-start;
}

/* Doc buttons row */
.doc-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

/* Make anchor look/behave like the existing back-button */
.back-button.doc-button {
    text-decoration: none;
    display: inline-flex;
}

/*Products page carousel*/
.product-gallery img {
    display: block;
    width: auto;
    height: 100%; /* magasság arányosan a szélességhez */
    max-height: 75vh; /* legfeljebb a viewport 75%-a, hogy ne lógjon ki */
    object-fit: contain; /* arányosan, levágás nélkül */
    background: #f8fafc; /* világos háttér, ha a kép kisebb */
    margin: 0 auto; /* középre igazítás */
}

/* --- Termék képek szekció --- */
.product-gallery {
    margin-top: 2rem;
    text-align: center;
}

.product-gallery-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #374151; /* sötétszürke */
}

.offer-button {
    margin-top: 1.25rem;
}
