/* ==========================================================================
   Taxonomy Categoria Prodotti — 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 {
    padding: 60px 0;
    background: var(--lh-white);
    overflow: hidden;
}

.lh-cat-hero__inner {
    max-width: var(--lh-container);
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--lh-gap);
    align-items: center;
}

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

.lh-cat-hero__label {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 12px;
    color: var(--lh-blue);
}

.lh-cat-hero__title {
    font-family: var(--lh-font-heading);
    font-size: 36px;
    font-weight: 600;
    line-height: 1.2;
    margin: 0 0 16px;
    color: var(--lh-text-dark);
}

.lh-cat-hero__text {
    font-size: 15px;
    margin-bottom: 24px;
    line-height: 1.7;
    color: var(--lh-text);
}

.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);
}

.lh-cat-hero__img-col {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lh-cat-hero__img {
    width: 100%;
    height: auto;
    border-radius: var(--lh-radius);
    object-fit: cover;
}

/* ---------- 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);
}

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

/* Tablet */
@media (max-width: 768px) {
    .lh-cat-hero__inner {
        grid-template-columns: 1fr;
    }

    .lh-cat-hero__img-col {
        order: -1;
    }

    .lh-cat-hero {
        padding: 40px 0;
    }

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

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

/* Small mobile */
@media (max-width: 480px) {
    .lh-cat-hero__title {
        font-size: 26px;
    }

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