/* ==========================================================================
   Taxonomy Settore — Lindhaus custom template
   ========================================================================== */

/* ---------- Design tokens (shared with single-prodotto) ---------- */
:root {
    --lh-blue: #4992BB;
    --lh-blue-light: #DCEBF3;
    --lh-gray-bg: #EBEBEB;
    --lh-text: #565656;
    --lh-text-dark: #333;
    --lh-footer-gray: #777474;
    --lh-white: #fff;
    --lh-radius: 10px;
    --lh-container: 1140px;
    --lh-gap: 24px;
    --lh-section-spacing: 60px;
    --lh-font-heading: 'Inter', sans-serif;
    --lh-font-body: 'Inter', sans-serif;
    --lh-font-btn: 'Roboto', sans-serif;
}

/* ---------- Base ---------- */
.lh-cat-archive {
    color: var(--lh-text);
    font-family: var(--lh-font-body);
    font-weight: 400;
    line-height: 1.6;
    overflow-x: hidden;
    overflow-x: clip;
}

.lh-cat-archive *,
.lh-cat-archive *::before,
.lh-cat-archive *::after {
    box-sizing: border-box;
}

.lh-cat-archive img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ---------- 1. Hero ---------- */
.lh-cat-hero {
    position: relative;
    overflow: hidden;
    background-color: var(--lh-white);
    background-position: right center;
    background-repeat: no-repeat;
    background-size: contain;
    min-height: 60vh;
    min-height: 60dvh;
}

/* Diagonal white overlay — covers left half with angled cut */
.lh-cat-hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: var(--lh-white);
    clip-path: polygon(0 0, 55% 0, 50% 100%, 0 100%);
    z-index: 1;
}

.lh-cat-hero__inner {
    position: relative;
    z-index: 2;
    max-width: var(--lh-container);
    margin: 0 auto;
    padding: 0 20px;
    min-height: 60vh;
    min-height: 60dvh;
    display: flex;
    align-items: center;
}

.lh-cat-hero__text-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 400px;
}

.lh-cat-hero__title {
    font-family: var(--lh-font-heading);
    font-size: 42px;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.3;
    margin: 0 0 16px;
    color: var(--lh-blue);
}

.lh-cat-hero__text {
    font-size: 14px;
    margin-bottom: 24px;
    line-height: 1.3;
    color: #000;
}

.lh-cat-hero__text p:last-child {
    margin-bottom: 0;
}

.lh-cat-hero__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--lh-font-btn);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: var(--lh-radius);
    border: 2px solid var(--lh-blue);
    color: var(--lh-blue);
    background: transparent;
    transition: background 0.2s, color 0.2s;
}

.lh-cat-hero__btn:hover {
    background: var(--lh-blue);
    color: var(--lh-white);
}

/* ---------- 2. Breadcrumb ---------- */
.lh-cat-breadcrumb {
    background: #ebebeb;
    padding: 60px 0;
    font-size: 13px;
    color: var(--lh-footer-gray);
}

.lh-cat-breadcrumb__inner {
    max-width: var(--lh-container);
    margin: 0 auto;
    padding: 0 20px;
}

.lh-cat-breadcrumb__inner p {
    margin: 0;
}

.lh-cat-breadcrumb__inner span:last-child {
    color: var(--lh-text-dark);
}

.lh-cat-breadcrumb a {
    color: var(--lh-blue);
    text-decoration: none;
}

.lh-cat-breadcrumb a:hover {
    text-decoration: underline;
}

/* ---------- 3. Product Grid ---------- */
.lh-cat-grid-section {
    padding: 0 0 var(--lh-section-spacing);
    background: var(--lh-gray-bg);
}

.lh-cat-grid-inner {
    max-width: var(--lh-container);
    margin: 0 auto;
    padding: 0 20px;
}

.lh-cat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--lh-gap);
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ---------- 4. Product Card ---------- */
a.lh-cat-card,
a.lh-cat-card:visited,
a.lh-cat-card:hover {
    display: flex;
    flex-direction: column;
    background: var(--lh-white);
    border-radius: var(--lh-radius);
    overflow: hidden;
    text-decoration: none;
    color: var(--lh-text);
    border: 2px solid transparent;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.lh-cat-card:hover {
    border-color: var(--lh-blue);
    box-shadow: 0 4px 20px rgba(73, 146, 187, 0.12);
}

.lh-cat-card__img-wrap {
    position: relative;
    background: var(--lh-white);
    padding-top: 75%; /* 4:3 ratio */
}

.lh-cat-card__img-wrap .lh-cat-card__img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 20px;
}

.lh-cat-card__body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

a.lh-cat-card .lh-cat-card__name {
    font-family: var(--lh-font-heading);
    font-size: 18px;
    font-weight: 400;
    color: var(--lh-text-dark);
    margin: 0 0 4px;
}

a.lh-cat-card .lh-cat-card__subtitle {
    font-size: 13px;
    font-weight: 600;
    color: #000;
    line-height: 1.5;
    margin: 0;
}

/* ---------- 5. Infinite Scroll Loader ---------- */
.lh-cat-loader {
    text-align: center;
    padding: 40px 0 0;
}

.lh-cat-loader__spinner {
    display: inline-block;
    width: 36px;
    height: 36px;
    border: 3px solid var(--lh-gray-bg);
    border-top-color: var(--lh-blue);
    border-radius: 50%;
    animation: lh-spin 0.7s linear infinite;
}

@keyframes lh-spin {
    to {
        transform: rotate(360deg);
    }
}

/* No results */
.lh-cat-no-results {
    text-align: center;
    padding: 60px 20px;
    font-size: 16px;
    color: var(--lh-footer-gray);
}

/* ---------- 6. Articles Section ---------- */
.lh-cat-articles {
    padding: var(--lh-section-spacing) 0;
    background: var(--lh-white);
}

.lh-cat-articles__inner {
    max-width: var(--lh-container);
    margin: 0 auto;
    padding: 0 20px;
}

.lh-cat-articles__label {
    display: block;
    font-family: var(--lh-font-heading);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--lh-blue);
    margin: 0 0 8px;
}

.lh-cat-articles__title {
    font-family: var(--lh-font-heading);
    font-size: 28px;
    font-weight: 400;
    font-style: italic;
    color: var(--lh-text-dark);
    margin: 0 0 40px;
    line-height: 1.3;
}

.lh-cat-articles__list {
    display: flex;
    flex-direction: column;
    gap: var(--lh-gap);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Tablet large (new breakpoint) */
@media (max-width: 1100px) {
    .lh-cat-hero {
        background-size: cover;
    }

    .lh-cat-hero::before {
        display: none;
    }

    .lh-cat-hero__text-col {
        max-width: 100%;
        padding: 20px;
        background: rgba(255, 255, 255, 0.95);
        border-radius: var(--lh-radius);
    }
}

/* Tablet */
@media (max-width: 768px) {
    .lh-cat-hero {
        min-height: auto;
    }

    .lh-cat-hero__inner {
        min-height: auto;
        padding: 40px 20px;
    }

    .lh-cat-hero__title {
        font-size: 30px;
    }

    .lh-cat-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .lh-cat-articles__title {
        font-size: 22px;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .lh-cat-hero {
        min-height: 300px;
    }

    .lh-cat-hero__inner {
        padding: 20px;
    }

    .lh-cat-hero__title {
        font-size: 26px;
    }

    .lh-cat-grid {
        grid-template-columns: 1fr;
    }
}