/* =========================
   PRODOTTI
========================= */

/* ==================================================
   GRIGLIA PRODOTTI
================================================== */

.fr-products {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px;
    margin: 35px 0;
    align-items: stretch;
}


/* ==================================================
   CARD PRODOTTO
================================================== */

.fr-product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
    overflow: hidden;

    background: #ffffff;
    border: 1px solid #e2e6ea;
    border-radius: 14px;

    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}

.fr-product-card:hover {
    transform: translateY(-5px);
    border-color: rgba(2, 95, 191, 0.25);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.10);
}


/* ==================================================
   IMMAGINE
================================================== */

.fr-product-image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 280px;
    padding: 24px;

    background: #ffffff;
    overflow: hidden;
}

.fr-product-image::after {
    content: "";
    position: absolute;
    right: 20px;
    bottom: 0;
    left: 20px;

    height: 1px;
    background: #edf0f3;
}

.fr-product-image img {
    display: block;
    width: 100%;
    height: 100%;

    max-width: 100%;
    max-height: 230px;

    object-fit: contain;
    object-position: center;

    transition: transform 0.3s ease;
}

.fr-product-card:hover .fr-product-image img {
    transform: scale(1.035);
}


/* ==================================================
   CONTENUTO
================================================== */

.fr-product-content {
    display: flex;
    flex-direction: column;
    flex: 1;

    padding: 22px 20px 20px;
}


/* ==================================================
   TITOLO
================================================== */

.fr-product-content h3 {
    margin: 0 0 16px;

    font-size: 19px;
    font-weight: 700;
    line-height: 1.28;

    min-height: 74px;
}

.fr-product-content h3 a {
    color: #171717;
    text-decoration: none;
    transition: color 0.2s ease;
}

.fr-product-content h3 a:hover {
    color: #025fbf;
}


/* ==================================================
   DISPONIBILITÀ
================================================== */

.fr-stock,
.fr-outstock {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;

    width: fit-content;
    margin: 0 0 14px;

    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

.fr-stock {
    color: #078b49;
}

.fr-stock::before {
    content: "✓";

    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 17px;
    height: 17px;

    color: #ffffff;
    background: #078b49;
    border-radius: 50%;

    font-size: 11px;
    font-weight: 700;
}

.fr-outstock {
    color: #c62828;
}

.fr-outstock::before {
    content: "×";

    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 17px;
    height: 17px;

    color: #ffffff;
    background: #c62828;
    border-radius: 50%;

    font-size: 13px;
    font-weight: 700;
}


/* ==================================================
   PREZZO
================================================== */

.fr-price {
    position: relative;

    margin-top: auto;
    padding-top: 17px;
    padding-bottom: 31px;

    color: #025fbf;

    font-size: 27px;
    font-weight: 700;
    line-height: 1.1;

    border-top: 1px solid #e7eaed;
}

.fr-price::after {
    content: "IVA inclusa";

    position: absolute;
    bottom: 10px;
    left: 0;

    color: #747b84;

    font-size: 13px;
    font-weight: 400;
    line-height: 1;
}


/* ==================================================
   PULSANTE
================================================== */

.fr-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    width: 100%;
    min-height: 52px;
    padding: 12px 18px;

    color: #ffffff !important;
    background: #025fbf;

    border: 1px solid #025fbf;
    border-radius: 7px;

    text-align: center;
    text-decoration: none !important;

    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;

    box-shadow: 0 4px 10px rgba(2, 95, 191, 0.18);

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.fr-button::before {
    content: "›";
    font-size: 23px;
    font-weight: 400;
    line-height: 1;
}

.fr-button:hover {
    color: #ffffff !important;
    background: #004e9e;
    border-color: #004e9e;

    transform: translateY(-1px);
    box-shadow: 0 7px 16px rgba(2, 95, 191, 0.25);
}


/* ==================================================
   TABLET
================================================== */

@media screen and (max-width: 1024px) {

    .fr-products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px;
    }

    .fr-product-image {
        height: 250px;
    }

    .fr-product-image img {
        max-height: 205px;
    }
}


/* ==================================================
   MOBILE
================================================== */

@media screen and (max-width: 640px) {

    .fr-products {
        grid-template-columns: 1fr;
        gap: 20px;
        margin: 28px 0;
    }

    .fr-product-card {
        max-width: 100%;
    }

    .fr-product-image {
        height: 245px;
        padding: 20px;
    }

    .fr-product-image img {
        max-height: 205px;
    }

    .fr-product-content {
        padding: 20px 18px 18px;
    }

    .fr-product-content h3 {
        min-height: auto;
        margin-bottom: 14px;
        font-size: 18px;
    }

    .fr-price {
        font-size: 25px;
    }

    .fr-button {
        min-height: 50px;
    }
}
/* =========================
   CATEGORIE
========================= */

.fr-categories {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin: 35px 0;
    align-items: stretch;
}

.fr-category-card {
    position: relative;
    min-width: 0;
    background: #fff;
    border: 1px solid #e3e8ef;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 16px rgba(16, 37, 66, .06);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.fr-category-card:hover {
    transform: translateY(-6px);
    border-color: rgba(2, 95, 191, .22);
    box-shadow: 0 18px 38px rgba(16, 37, 66, .13);
}

.fr-category-card > a {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none !important;
}

.fr-category-image {
    position: relative;
    height: 230px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    overflow: hidden;
    background: linear-gradient(145deg, #f8fafc 0%, #eef3f8 100%);
}

.fr-category-image::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 55px;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,.9));
    pointer-events: none;
}

.fr-category-image img {
    position: relative;
    z-index: 1;
    display: block;
    max-width: 100%;
    max-height: 195px;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform .35s ease;
}

.fr-category-card:hover .fr-category-image img {
    transform: scale(1.045);
}

.fr-category-content {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 24px 24px 25px;
    background: #fff;
}

.fr-category-content::before {
    content: "";
    width: 34px;
    height: 3px;
    margin-bottom: 15px;
    border-radius: 999px;
    background: #025fbf;
}

.fr-category-content h3 {
    margin: 0 0 9px;
    min-height: 0;
    color: #1d2733;
    font-size: 20px;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -.01em;
}

.fr-category-content span {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 18px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #025fbf;
    background: #edf5ff;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 600;
}

.fr-category-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: auto;
    color: #025fbf;
    font-size: 15px;
    line-height: 1.3;
    font-weight: 700;
    transition: gap .2s ease, color .2s ease;
}

.fr-category-card:hover .fr-category-link {
    gap: 11px;
    color: #014d9c;
    text-decoration: none;
}

.fr-category-card:focus-within {
    outline: 3px solid rgba(2, 95, 191, .18);
    outline-offset: 3px;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1024px) {
    .fr-products,
    .fr-categories {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .fr-products,
    .fr-categories {
        grid-template-columns: 1fr;
        gap: 18px;
        margin: 25px 0;
    }

    .fr-category-image {
        height: 205px;
    }

    .fr-category-image img {
        max-height: 170px;
    }

    .fr-category-content {
        padding: 21px 20px 23px;
    }

    .fr-category-content h3 {
        font-size: 19px;
    }
}