/* Schede condivise di catalogo, ricerca e prodotti correlati. */
.ns-product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    align-items: stretch;
}

.ns-product-grid > .ns-product-item {
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 0;
}

.ns-product-grid > .col-12 {
    grid-column: 1 / -1;
    width: auto;
}

.ns-product-card.product-box-3 {
    height: 100%;
    margin: 0;
    padding: 0;
    border: 1px solid #dfe6e3;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.ns-product-card > .product,
.ns-product-card .ns-product-link,
.ns-product-card .ns-product-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
    width: 100%;
}

.ns-product-card .ns-product-link {
    color: #202a28;
    text-decoration: none;
}

.ns-product-card .ns-product-link:focus-visible {
    outline: 3px solid #087d68;
    outline-offset: -3px;
}

.ns-product-card .ns-card-image {
    width: 100%;
    flex: none;
    margin: 0;
    padding: 0;
}

.ns-product-card .ns-card-image .product-front {
    position: relative;
    height: 190px;
    background-color: #f5f7f6;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.ns-product-card .ns-card-express {
    position: absolute;
    bottom: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 8px;
    border-radius: 4px;
    background: #0da487;
}

.ns-product-card .ns-card-express img {
    width: 115px;
    max-width: 100%;
    height: auto;
}

.ns-product-card .ns-card-details {
    display: flex;
    flex: 1;
    flex-direction: column;
    width: 100%;
    padding: 16px 0 0;
    text-align: left;
}

.ns-product-card .ns-card-heading {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 0 16px;
}

.ns-product-card .ns-card-title { flex: 1; min-width: 0; }

.ns-product-card .ns-card-title .name {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    color: #202a28;
    white-space: normal;
    overflow-wrap: anywhere;
}

.ns-product-card .ns-card-title .product-content {
    display: block;
    height: auto;
    max-height: none;
    overflow: visible;
    -webkit-line-clamp: unset;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 400;
    color: #596760;
    white-space: normal;
    overflow-wrap: anywhere;
}

.ns-product-card .ns-card-brand {
    flex: 0 0 45px;
    height: 40px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: top center;
    mix-blend-mode: multiply;
}

.ns-product-card .ns-card-colors { padding: 0 16px; margin: 2px 0 14px; }
.ns-product-card .ns-card-colors-content { font-size: 12px; line-height: 1.7; color: #596760; overflow-wrap: anywhere; }
.ns-product-card .ns-card-swatch {
    display: inline-block;
    width: 18px;
    height: 18px;
    margin: 5px 4px 0 0;
    border: 1px solid rgba(0, 0, 0, .18);
    border-radius: 50%;
    vertical-align: top;
}
.ns-product-card .ns-card-colors .pittogramma { max-width: 100%; object-fit: contain; margin: 5px 4px 0 0; }

.ns-product-card .ns-card-pricing { margin-top: auto; }
.ns-product-card .ns-card-price-content { padding: 0 16px; }
.ns-product-card .ns-card-tiers {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 12px 4px;
    margin-bottom: 14px;
    border-radius: 5px;
    background: #f2f6f4;
}
.ns-product-card .ns-card-tier { min-width: 0; padding: 0 3px; }
.ns-product-card .ns-card-tier + .ns-card-tier { border-left: 1px solid #d9e2dd; }
/* Le etichette e la formattazione numerica dei prezzi restano in PHP. */
.ns-product-card .ns-card-tier p {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    letter-spacing: normal;
    text-align: center;
    overflow-wrap: anywhere;
}
.ns-product-card .ns-card-tier p:first-child { margin-bottom: 3px; font-size: 12px; color: #596760; }
.ns-product-card .ns-card-tier .ns-card-tier-value { font-weight: 600; color: #202a28; }
.ns-product-card .ns-card-summary { padding: 0 16px 16px; }
.ns-product-card .ns-card-summary p { margin: 0; letter-spacing: normal; }
.ns-product-card .ns-card-unit { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.ns-product-card .ns-card-unit strong { font-size: 28px; font-weight: 700; line-height: 1.2; color: #087d68; }
.ns-product-card .ns-card-unit span,
.ns-product-card .ns-card-quantity { font-size: 12px; color: #596760; line-height: 1.6; }
.ns-product-card .ns-card-total { margin-top: 6px !important; font-size: 13px; line-height: 1.5; color: #38473f; }
.ns-product-card .ns-card-action {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px;
    background: #087d68;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
}
.ns-product-card .ns-product-link:hover .ns-card-action { background: #066957; }

@media (max-width: 991.98px) {
    .ns-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}
@media (max-width: 575.98px) {
    .ns-product-grid { grid-template-columns: minmax(0, 1fr); }
}
