/* ==========================================================================
   bizber.hu – additions on top of the shared main.css
   (product catalog, service cards, side navigation). Uses the shared tokens.
   ========================================================================== */

.section-sub {
    margin: 0.75rem 0 0;
    color: var(--muted);
}

/* Service cards (linked) ------------------------------------------------- */

.services-3 {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    margin-top: 0;
}

.service-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: inherit;
    text-decoration: none;
    background: var(--white);
    transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

.service-link:hover {
    color: inherit;
    border-color: transparent;
    box-shadow: var(--shadow);
    transform: translateY(-3px);
}

.service-link p {
    flex: 1;
}

.service-more {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1.25rem;
    color: var(--red);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.service-more .icon {
    width: 1rem;
    height: 1rem;
}

/* Category cards --------------------------------------------------------- */

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.category-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    background: var(--white);
    border-radius: var(--radius);
    border-top: 4px solid var(--navy);
    box-shadow: var(--shadow);
    transition: transform 0.25s, border-color 0.25s;
}

.category-card:hover {
    transform: translateY(-4px);
    border-top-color: var(--red);
}

.category-icon {
    display: inline-grid;
    place-items: center;
    width: 3.5rem;
    height: 3.5rem;
    margin-bottom: 1.25rem;
    border-radius: 50%;
    background: var(--tint);
    color: var(--navy);
}

.category-icon .icon {
    width: 1.75rem;
    height: 1.75rem;
}

.category-card h3 {
    font-size: 1.3rem;
}

.category-card h3 a {
    color: var(--navy);
    text-decoration: none;
}

/* Whole card is clickable */
.category-card h3 a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.category-card p {
    font-size: 0.98rem;
    color: var(--muted);
}

.category-groups {
    flex: 1;
    margin: 0 0 1.5rem;
    padding: 0;
    list-style: none;
    font-size: 0.95rem;
}

.category-groups li {
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--line);
}

.category-groups li::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin: 0 0.6rem 0.15rem 0;
    border-radius: 50%;
    background: var(--red);
}

.category-count {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--red);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
}

.category-count .icon {
    width: 1rem;
    height: 1rem;
}

/* Product cards ---------------------------------------------------------- */

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    transition: box-shadow 0.25s, transform 0.25s;
}

.product-card:not(.product-card-static):hover {
    box-shadow: var(--shadow);
    transform: translateY(-3px);
}

.product-card-media {
    display: grid;
    place-items: center;
    aspect-ratio: 4 / 3;
    padding: 1rem;
    background: var(--white);
    border-bottom: 1px solid var(--line);
}

.product-card-media {
    overflow: hidden;
}

.product-card-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-card-noimg {
    color: var(--line);
}

.product-card-noimg .icon {
    width: 3.5rem;
    height: 3.5rem;
}

.product-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 1.25rem 1.4rem 1.4rem;
}

.product-code {
    margin-bottom: 0.4rem;
    color: var(--red);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.product-card h3 {
    margin-bottom: 0.6rem;
    font-size: 1.08rem;
}

.product-card h3 a {
    color: var(--navy);
    text-decoration: none;
}

.product-card h3 a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.product-card p {
    flex: 1;
    margin-bottom: 1rem;
    font-size: 0.92rem;
    color: var(--muted);
    /* Long descriptions are cut to four lines on cards */
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-more {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: auto;
    color: var(--red);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
}

.product-card-more .icon {
    width: 1rem;
    height: 1rem;
}

/* Layout with a side navigation ----------------------------------------- */

.with-aside {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 3rem;
    align-items: start;
}

.with-aside.aside-left {
    grid-template-columns: 270px minmax(0, 1fr);
}

.with-aside > .prose {
    max-width: 52rem;
}

.side-nav {
    position: sticky;
    top: calc(var(--header-h) + 1.5rem);
    padding: 1.5rem;
    background: var(--tint);
    border-radius: var(--radius);
}

.side-nav h2 {
    margin: 0 0 0.75rem;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    color: var(--muted);
}

.side-nav ul {
    margin: 0 0 1.5rem;
    padding: 0;
    list-style: none;
}

.side-nav ul:last-child {
    margin-bottom: 0;
}

.side-nav a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid rgba(33, 46, 91, 0.1);
    color: var(--navy);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
}

.side-nav a:hover,
.side-nav a[aria-current] {
    color: var(--red);
}

.side-nav .icon {
    width: 1.15rem;
    height: 1.15rem;
}

.side-count {
    margin-left: auto;
    padding: 0.05rem 0.5rem;
    border-radius: 1rem;
    background: var(--white);
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 600;
}

.product-group + .product-group {
    margin-top: 3.5rem;
}

.product-group {
    scroll-margin-top: calc(var(--header-h) + 1.5rem);
}

/* Product page ----------------------------------------------------------- */

.product-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 3rem;
    align-items: start;
}

.product-media {
    display: grid;
    place-items: center;
    padding: 1.5rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
}

.product-media img {
    max-height: 520px;
    width: auto;
    border-radius: var(--radius);
}

.product-noimg {
    display: grid;
    place-items: center;
    gap: 0.75rem;
    min-height: 280px;
    color: var(--muted);
}

.product-noimg .icon {
    width: 4rem;
    height: 4rem;
    color: var(--line);
}

.product-type {
    margin-bottom: 1rem;
    color: var(--red);
    font-size: 1.15rem;
    font-weight: 700;
}

.product-type span {
    margin-right: 0.4rem;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.product-excerpt {
    font-size: 1.2rem;
    color: var(--ink);
}

.product-enquiry {
    margin-top: 2rem;
    padding: 1.75rem;
    background: var(--tint);
    border-left: 4px solid var(--red);
    border-radius: var(--radius);
}

.product-enquiry h2 {
    margin-bottom: 0.5rem;
    font-size: 1.15rem;
}

.product-enquiry p {
    color: var(--muted);
    font-size: 1rem;
}

.product-body {
    max-width: calc(var(--wrap-narrow) + 2 * var(--gutter));
    margin-top: 3.5rem;
}

.product-body .download-groups {
    margin-top: 3rem;
}

/* Notice box (placeholders) --------------------------------------------- */

.notice {
    padding: 1.75rem 2rem;
    background: var(--tint);
    border-left: 4px solid var(--red);
    border-radius: var(--radius);
}

.notice > :last-child {
    margin-bottom: 0;
}

/* Responsive ------------------------------------------------------------ */

@media (max-width: 1000px) {
    .with-aside,
    .with-aside.aside-left,
    .product-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .side-nav {
        position: static;
    }

    /* Category page: products first, menu after them on small screens */
    .with-aside.aside-left .side-nav {
        order: 2;
    }
}

@media (max-width: 600px) {
    .category-grid,
    .product-grid,
    .services-3 {
        grid-template-columns: 1fr;
    }
}

/* Inline photos in product descriptions */
.product-body .prose img {
    display: block;
    max-width: min(100%, 520px);
    margin: 2rem auto;
}
