/**
 * ENAV - Styles for Prodotti Shortcode
 */

:root {
    --enav-primary: #2598d7;
    --enav-primary-dark: #1a74a5;
    --enav-dark: #232b34;
    --enav-gray-bg: #f7f7f7;
    --enav-font-family: Trueno, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Main block wrapper */
.enav-products-block {
    position: relative;
    width: 100%;
    overflow: visible;
    font-family: var(--enav-font-family);
    box-sizing: border-box;
}

.enav-products-block *,
.enav-products-block *::before,
.enav-products-block *::after {
    box-sizing: border-box;
}

/* Left geometric accent shape */
.enav-visual-shape-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    pointer-events: none;
    width: 7.5vw;
    max-width: 140px;
    min-width: 60px;
    line-height: 0;
}

.enav-visual-shape-wrapper svg {
    width: 100%;
    height: auto;
    display: block;
}

/* Inner container */
.enav-products-container {
    position: relative;
    max-width: 1856px;
    width: 100%;
    margin: 0 auto;
    padding: 3rem 1.5rem;
    z-index: 1;
    display: flex;
    flex-direction: column;
}

@media (min-width: 769px) {
    .enav-products-container {
        flex-direction: row;
        align-items: stretch;
        padding: 4rem 2rem 6rem;
    }
}

@media (min-width: 1200px) {
    .enav-products-container {
        padding: 5rem 4rem 7rem;
    }
}

/* Mobile section title */
.enav-mobile-title {
    display: block;
    text-align: center;
    margin-bottom: 2.5rem;
}

@media (min-width: 769px) {
    .enav-mobile-title {
        display: none !important;
    }
}

.enav-mobile-title__text {
    color: var(--enav-primary);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
}

/* Sticky Vertical Sidebar (Desktop - Bottom to Top orientation) */
.enav-sticky-sidebar {
    display: none;
}

@media (min-width: 769px) {
    .enav-sticky-sidebar {
        display: block;
        flex: 0 0 100px;
        width: 100px;
        position: relative;
        align-self: stretch;
        pointer-events: none;
        z-index: 5;
    }

    .enav-vertical-text-sticky {
        position: absolute;
        top: 400px;
        left: 50%;
        transform: translate(-50%, -50%);
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 0;
        pointer-events: none;
        will-change: top;
    }

    .enav-vertical-text__inner {
        transform: rotate(-90deg);
        transform-origin: center center;
        white-space: nowrap;
    }

    .enav-vertical-text__inner p {
        font-size: clamp(1.8rem, 1.1rem + 1.7vw, 2.75rem);
        color: var(--enav-primary);
        font-weight: 700;
        line-height: 1;
        margin: 0;
        white-space: nowrap;
        letter-spacing: 0.2px;
    }
}

@media (min-width: 1200px) {
    .enav-sticky-sidebar {
        flex: 0 0 130px;
        width: 130px;
    }
}

@media (min-width: 1600px) {
    .enav-sticky-sidebar {
        flex: 0 0 150px;
        width: 150px;
    }
}

/* Products Grid Wrapper */
.enav-products-grid-wrapper {
    flex: 1;
    min-width: 0;
    width: 100%;
}

.enav-products-grid {
    display: grid;
    grid-template-columns: 1fr;
    row-gap: 3rem;
    column-gap: 2.5rem;
    position: relative;
    width: 100%;
}

@media (min-width: 769px) {
    .enav-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 3.5rem;
        row-gap: 5rem;
        padding-left: 2rem;
    }
}

@media (min-width: 1200px) {
    .enav-products-grid {
        column-gap: 5rem;
        row-gap: 6rem;
        padding-left: 3rem;
    }
}

@media (min-width: 1600px) {
    .enav-products-grid {
        column-gap: 6rem;
        row-gap: 6.5rem;
        padding-left: 4rem;
    }
}

/* Product Card */
.enav-product-card {
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Image wrapper and picture */
.enav-product-card__image-wrapper {
    position: relative;
    overflow: hidden;
    background-color: var(--enav-gray-bg);
    line-height: 0;
}

.enav-product-card__image-link {
    display: block;
    overflow: hidden;
    text-decoration: none;
}

.enav-product-card__img {
    width: 100%;
    height: auto;
    object-fit: cover;
    aspect-ratio: 1350 / 1580;
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.enav-product-card:hover .enav-product-card__img {
    transform: scale(1.04);
}

.enav-product-card__placeholder {
    aspect-ratio: 1350 / 1580;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 1.25rem;
    font-weight: 600;
}

/* Button overlay attached bottom-left of image */
.enav-product-card__btn {
    position: absolute;
    bottom: 0;
    left: 0;
    background-color: var(--enav-primary);
    color: #ffffff !important;
    padding: 1.15rem 3.5rem 1.15rem 1.75rem;
    font-size: 0.9375rem;
    text-transform: uppercase;
    font-weight: 400;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
    z-index: 2;
}

.enav-product-card__btn b {
    font-weight: 700;
    margin-left: 0.35rem;
}

.enav-product-card__btn-icon {
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.1rem;
    height: 1.1rem;
}

.enav-product-card__btn-icon svg {
    width: 100%;
    height: 100%;
}

.enav-product-card__btn:hover,
.enav-product-card:hover .enav-product-card__btn {
    background-color: #ffffff;
    color: var(--enav-primary) !important;
}

/* Content below image */
.enav-product-card__content {
    padding-top: 1.5rem;
}

.enav-product-card__title-link {
    text-decoration: none;
    display: inline-block;
}

.enav-product-card__title {
    color: var(--enav-primary);
    font-size: 1.125rem;
    font-weight: 900;
    line-height: 1.15;
    text-transform: uppercase;
    margin: 0 0 0.85rem 0;
    letter-spacing: 0.4px;
    transition: color 0.25s ease;
}

.enav-product-card__title-link:hover .enav-product-card__title,
.enav-product-card:hover .enav-product-card__title {
    color: var(--enav-primary-dark);
}

.enav-product-card__subtitle {
    color: var(--enav-dark);
    font-size: 1.625rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
}

@media (max-width: 768px) {
    .enav-product-card__subtitle {
        font-size: 1.25rem;
    }
    .enav-product-card__btn {
        padding: 0.9rem 2.8rem 0.9rem 1.25rem;
        font-size: 0.8125rem;
    }
}
