/* ============================================================
   1) CARD — CONTENITORE PRINCIPALE
   ============================================================ */
.b2b-card {
    background: #FFFFFF;
    border: 1px solid #AAAAAA;
    border-radius: 5px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    font-family: "Inclusive Sans", sans-serif;
    position: relative;
    min-width: 0;
    width: 100%; /* necessario per grid */
    height: 100%;
}

/* ============================================================
   2) HEADER — CHIP + PREZZO
   ============================================================ */
.b2b-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: transparent !important;
    z-index: 10;
}

.b2b-chip-tech {
    background: #2D2D2D;
    color: #FFFFFF;
    font-size: clamp(0.75rem, 1vw + 0.4rem, 1rem);
    font-weight: 400;
    padding: 4px 10px;
    border-radius: 4px;
    line-height: 1;
    text-transform: uppercase;
}

.b2b-price {
    font-size: clamp(1rem, 1vw + 0.6rem, 1.125rem);
    font-weight: 400;
    color: #000000;
}

/* ============================================================
   3) IMMAGINE PRODOTTO
   ============================================================ */
.b2b-card-image {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 0;
}

.b2b-card-image img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================================
   4) TITOLO PRODOTTO
   ============================================================ */
.b2b-card-title {
    font-size: clamp(0.8rem, 1vw + 1rem, 1.875rem);
    font-weight: 600;
    color: #2D2D2D !important;
    margin: -20% 0 0 0;
}

.b2b-card-title a {
    color: #2D2D2D !important;
    text-decoration: none !important;
}

/* ============================================================
   5) SPECIFICHE TECNICHE
   ============================================================ */
.b2b-spec-row,
.b2b-specs-row {
    display: flex;
    align-items: center;
    gap: 3px;
}

.b2b-specs-row {
    gap: 10px;
}

.b2b-spec-item {
    display: flex;
    align-items: center;
    gap: 3px;
}

.b2b-spec-value {
    font-size: clamp(0.3rem, 1vw + 0.5rem, 1.125rem);
    font-weight: 400;
    color: #2D2D2D;
}

.b2b-icon {
    width: clamp(14px, 1vw + 10px, 18px);
    height: clamp(14px, 1vw + 10px, 18px);
    display: inline-block;
    object-fit: contain;
    color: #2D2D2D;
}

/* ============================================================
   6) BRAND
   ============================================================ */
.b2b-brand-link {
    font-size: clamp(0.3rem, 1vw + 0.5rem, 1.125rem);
    font-weight: 400;
    color: #2D2D2D;
    text-decoration: none;
}

/* ============================================================
   7) FOOTER — SKU + CART BUTTON
   ============================================================ */
.b2b-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-top: auto; /* footer sempre in basso */
}

.b2b-sku {
    display: grid;
    align-items: center;
    gap: 0px;
}

.b2b-sku-value {
    font-size: clamp(0.75rem, 1vw + 0.4rem, 0.875rem);
    font-weight: 500;
    color: #2D2D2D;
}

.b2b-cart-btn {
    display: flex;
    align-items: center;
}

/* ============================================================
   8) GRIGLIA PRODOTTI — GRID (4 → 3 → 2 colonne)
   ============================================================ */
.b2b-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    justify-items: center;
    position: relative; /* overlay */
}

/* 3 colonne (tablet / medium screens) */
@media (max-width: 1280px) {
    .b2b-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 2 colonne (mobile) */
@media (max-width: 1023px) {
    .b2b-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* ============================================================
   9) PULSANTE CARICA ALTRO
   ============================================================ */
#b2b-load-more {
    display: block;
    margin: 30px auto 0 auto;
    padding: 12px 28px;
    background: #F02900 !important;
    color: #ffffff !important;
    font-family: "Inclusive Sans", sans-serif !important;
    font-size: 16px;
    font-weight: 600;
    border: none !important;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: none !important;
    text-shadow: none !important;
    transition: none !important;
    transform: none !important;
    outline: none !important;
}

#b2b-load-more:hover,
#b2b-load-more:focus,
#b2b-load-more:active {
    background: #F02900 !important;
    color: #ffffff !important;
    box-shadow: none !important;
    outline: none !important;
}

/* ============================================================
   10) OVERLAY DI ATTESA
   ============================================================ */
.b2b-products-grid.b2b-loading::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.65);
    backdrop-filter: blur(2px);
    z-index: 10;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.b2b-products-grid.b2b-loading::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    margin-top: -16px;
    margin-left: -16px;
    border: 3px solid #ccc;
    border-top-color: #333;
    border-radius: 50%;
    animation: b2b-spin 0.7s linear infinite;
    z-index: 11;
}

@keyframes b2b-spin {
    to { transform: rotate(360deg); }
}

/* ============================================================
   11) NASCONDI SKU SU MOBILE
   ============================================================ */
/* Nascondi completamente lo SKU su mobile, mantenendo il layout */
@media (max-width: 576px) {
    .b2b-card .b2b-sku .b2b-icon,
    .b2b-card .b2b-sku .b2b-sku-value {
        display: none !important;
    }
}