/**
 * AGRISUB.COM - Foglio di Stile Ufficiale Catalogo
 * Stile Apple Blue / Fiamma con Griglie Responsive & Mobile First
 */

/* 1. CAROSELLO MARCHI SCORREVOLE IN SCALA DI GRIGI */
.marquee-section-catalog {
    padding: 16px 0;
    background: #FFFFFF;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    margin-bottom: 24px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 14px rgba(0,0,0,0.02);
}
.marquee-section-catalog::before,
.marquee-section-catalog::after {
    content: '';
    position: absolute;
    top: 0;
    width: 60px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}
.marquee-section-catalog::before {
    left: 0;
    background: linear-gradient(to right, #FFFFFF 20%, transparent);
}
.marquee-section-catalog::after {
    right: 0;
    background: linear-gradient(to left, #FFFFFF 20%, transparent);
}
.marquee-track-catalog {
    display: flex;
    align-items: center;
    gap: 46px;
    width: max-content;
    animation: marqueeScrollInfinite 32s linear infinite;
}
.marquee-track-catalog:hover {
    animation-play-state: paused;
}
.marquee-item-catalog {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    text-decoration: none;
    cursor: pointer;
    flex-shrink: 0;
}
.marquee-item-catalog img {
    height: 36px !important;
    max-height: 36px !important;
    width: auto !important;
    max-width: 130px !important;
    object-fit: contain !important;
    opacity: 0.7 !important;
    filter: grayscale(100%) !important;
    transition: all 0.25s ease !important;
    display: block !important;
}
.marquee-item-catalog:hover img {
    opacity: 1 !important;
    filter: grayscale(0%) !important;
    transform: scale(1.08) !important;
}
.marquee-item-catalog img[alt*="Kunst" i],
.marquee-item-catalog img[src*="kunst" i],
.marquee-item-catalog img[alt*="Rocal" i],
.marquee-item-catalog img[src*="rocal" i] {
    filter: brightness(0) !important;
}
.marquee-item-catalog:hover img[alt*="Kunst" i],
.marquee-item-catalog:hover img[src*="kunst" i],
.marquee-item-catalog:hover img[alt*="Rocal" i],
.marquee-item-catalog:hover img[src*="rocal" i] {
    filter: brightness(0) !important;
    transform: scale(1.08) !important;
}
.marquee-item-catalog span {
    font-size: 0.9rem;
    font-weight: 700;
    color: #8E8E93;
}
@keyframes marqueeScrollInfinite {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* 2. BOX INFORMATIVO BENEFIT CATALOGHI */
.info-card-benefit {
    background: #FFFFFF;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 16px;
    padding: 18px 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

/* 3. BACHECA MARCHI CENTRATA (ALFABETICA A-Z) */
.brand-showcase-box {
    background: #FFFFFF;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 24px;
    padding: 24px;
    margin-bottom: 26px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}
.brand-grid-shelf {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* CENTRATA AL 100% */
    gap: 10px;
    margin-top: 16px;
}
.brand-pill-card {
    flex: 0 1 130px;
    width: 130px;
    background: #F5F5F7;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 14px;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.brand-pill-card:hover {
    background: #FFFFFF;
    border-color: #E85D04;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(232, 93, 4, 0.12);
}
/* STATO ATTIVO PULITO: Sfondo sempre bianco con elegante bordo arancione fiamma */
.brand-pill-card.active {
    background: #FFFFFF !important;
    border: 2px solid #E85D04 !important;
    box-shadow: 0 6px 18px rgba(232, 93, 4, 0.25) !important;
}
.brand-pill-card.active span {
    color: #E85D04 !important;
}
.brand-pill-card img {
    max-height: 32px;
    max-width: 95px;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.2s ease;
    display: block;
}
.brand-pill-card:hover img {
    transform: scale(1.06);
}
.brand-pill-card img[alt*="Kunst" i],
.brand-pill-card img[src*="kunst" i],
.brand-pill-card img[alt*="Rocal" i],
.brand-pill-card img[src*="rocal" i] {
    filter: brightness(0) !important;
}
.brand-pill-card.active img[alt*="Kunst" i],
.brand-pill-card.active img[src*="kunst" i],
.brand-pill-card.active img[alt*="Rocal" i],
.brand-pill-card.active img[src*="rocal" i] {
    filter: brightness(0) invert(1) !important;
}
.brand-pill-card span {
    font-size: 0.82rem;
    font-weight: 700;
    color: #1D1D1F;
    text-align: center;
}

/* 4. CONFIGURATORE RAPIDO A 2 PASSI */
.wizard-box-guided {
    background: linear-gradient(145deg, #181C24 0%, #101216 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 22px;
    padding: 22px 26px;
    margin-bottom: 24px;
    color: #FFF;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.wizard-grid-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 14px;
    align-items: flex-end;
    margin-top: 14px;
}
.wizard-select {
    width: 100%;
    height: 44px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 12px;
    color: #FFF;
    padding: 0 12px;
    font-size: 0.88rem;
    font-weight: 600;
    outline: none;
    color-scheme: dark;
}
.wizard-select option {
    background: #181C24;
    color: #FFF;
}

/* 5. PILLOLE CATEGORIE / TIPOLOGIE CENTRATE */
.apple-pill-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* CENTRATA AL 100% */
    gap: 8px;
    padding: 6px 0 16px 0;
    margin-bottom: 20px;
}
.cat-pill {
    padding: 8px 16px;
    background: #F5F5F7;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 9999px;
    font-size: 0.84rem;
    font-weight: 600;
    color: #1D1D1F;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}
.cat-pill:hover, .cat-pill.active {
    background: #1D1D1F;
    color: #FFFFFF;
    border-color: #1D1D1F;
}
.cat-pill .pill-badge {
    background: rgba(0,0,0,0.08);
    padding: 2px 7px;
    border-radius: 9999px;
    font-size: 0.72rem;
}
.cat-pill.active .pill-badge {
    background: rgba(255,255,255,0.25);
    color: #FFF;
}

/* 6. BARRA DI CONTROLLO E RICERCA CON CHIP */
.catalog-control-strip {
    background: #FFFFFF;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 18px;
    padding: 14px 18px;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
}
.search-box-live {
    position: relative;
    flex-grow: 1;
    max-width: 600px;
}
.autocomplete-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.18);
    z-index: 999;
    overflow: hidden;
}
.autocomplete-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    cursor: pointer;
    transition: background 0.2s ease;
}
.autocomplete-item:hover { background: #F5F5F7; }

.search-chip-shelf {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}
.search-chip {
    background: #F5F5F7;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 9999px;
    padding: 5px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #1D1D1F;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}
.search-chip:hover {
    background: #E85D04;
    color: #FFF;
    border-color: #E85D04;
    transform: translateY(-1px);
}

/* 7. GRIGLIA E LISTA PRODOTTI */
.product-grid-catalog {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}
.product-grid-catalog.list-view {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.product-grid-catalog.list-view .product-card {
    flex-direction: row;
    align-items: center;
    padding: 14px 20px;
}
.product-grid-catalog.list-view .product-card-thumb {
    width: 140px;
    height: 110px;
    flex-shrink: 0;
    padding: 6px;
}
.product-grid-catalog.list-view .product-card-body {
    padding: 0 20px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}
.product-grid-catalog.list-view .product-card-actions {
    margin-top: 0;
    width: 260px;
    flex-shrink: 0;
}

/* 8. DOCK CONFRONTO */
.compare-dock {
    display: none;
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(28, 28, 30, 0.95);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 9999px;
    padding: 10px 24px;
    color: #FFF;
    z-index: 990;
    box-shadow: 0 16px 40px rgba(0,0,0,0.4);
    align-items: center;
    gap: 16px;
}
.compare-dock.active { display: flex; }

/* 9. PULSANTI BANNER */
.phone-btn-banner {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #FFFFFF !important;
    font-size: 0.86rem;
    font-weight: 750;
    padding: 9px 16px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s ease;
}
.phone-btn-banner:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}
.promo-pill-warm {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 12px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #FFFFFF;
    font-weight: 600;
}

/* 10. REGOLE PERFEZIONATE PER SMARTPHONE */
@media (max-width: 768px) {
    .wizard-grid-inputs { grid-template-columns: 1fr; }
    .brand-pill-card { flex: 0 1 calc(50% - 10px); width: auto; }
    .catalog-control-strip { padding: 12px; }
    .product-grid-catalog { grid-template-columns: 1fr; gap: 16px; }
    .compare-dock { width: calc(100% - 32px); bottom: 74px; justify-content: space-between; }
}