/* ======================================================================
   GLOBAL RESET & BASE
====================================================================== */

html, body {
    background: #020617 !important;
    margin: 0;
    padding: 0;
    color: #e5e7eb;
    overflow-x: hidden;
    font-family: "Inter", system-ui, sans-serif;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* Contenitore sezione prodotti */
.am-products-section {
    padding-bottom: 80px;
}

/* Messaggio nessun risultato */
.am-no-results {
    max-width: 1180px;
    margin: 40px auto 80px;
    padding: 24px 30px;
    border-radius: 18px;
    background: rgba(15,23,42,0.95);
    border: 1px solid rgba(148,163,184,0.4);
    color: #e5e7eb;
}

/* ======================================================================
   LOADER ECG
====================================================================== */

#am-ecg-loader {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.96);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease-in-out;
}

#am-ecg-loader.active {
    opacity: 1;
    pointer-events: all;
}

#am-ecg-loader svg {
    width: 240px;
    height: 60px;
    stroke: #38bdf8;
    stroke-width: 3;
    fill: none;
    stroke-dasharray: 200;
    animation: ecg-wave 1.3s infinite linear;
}

@keyframes ecg-wave {
    0% { stroke-dashoffset: 200; }
    100% { stroke-dashoffset: -200; }
}

/* ======================================================================
   HERO CATALOGO + ECG BACKGROUND
====================================================================== */

.am-products-hero {
    position: relative;
    margin-top: -80px;
    padding: 220px 5vw 240px;
    background:
        radial-gradient(circle at 15% 0%, rgba(56,189,248,.22), transparent 55%),
        radial-gradient(circle at 90% 80%, rgba(23,212,195,.18), transparent 55%),
        #03121d;
    overflow: hidden;
}

#amProductsHeroCanvas {
    position: absolute;
    inset: 0;
    opacity: .48;
    width: 100%;
    height: 100%;
}

.am-products-hero-inner {
    position: relative;
    z-index: 10;
    max-width: 1120px;
    margin: 0 auto;
}

.ap-section-kicker {
    font-size: 12px;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: #9ca3af;
}

.am-products-hero-title {
    font-size: clamp(42px,4vw,70px);
    font-weight: 900;
    color: #fff;
    margin: 10px 0 18px;
    letter-spacing: -0.03em;
}

.am-products-hero-text {
    font-size: 18px;
    max-width: 620px;
    color: #94a3b8;
    line-height: 1.7;
}

.am-hero-fade {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 200px;
    background: linear-gradient(to bottom, rgba(3,18,29,0) 0%, #020617 100%);
    z-index: 8;
}

/* ======================================================================
   BRAND ROW
====================================================================== */

.am-brand-row {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 28px;
    width: 100%;
    max-width: 1180px;
    padding: 40px 30px 30px;
    margin: 0 auto;
}

.am-brand-box {
    width: 150px;
    height: 70px;
    border-radius: 14px;
    background: rgba(255,255,255,0.06);
    border: 2px solid rgba(255,255,255,0.15);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: .25s ease;
    padding: 12px;
}

.am-brand-box img {
    width: 70%;
    filter: brightness(0) invert(1);
    opacity: .95;
}

.am-brand-box:hover,
.am-brand-box.active {
    transform: translateY(-4px);
    border-color: #38bdf8;
    box-shadow: 0 0 22px rgba(56,189,248,.45);
}

/* ======================================================================
   FILTER BAR 
   ✔ SOLO QUESTA SEZIONE È MODIFICATA COME DA TUA RICHIESTA
====================================================================== */

.am-filter-bar {
    display: grid;
    grid-template-columns: 1fr 1fr 180px;
    gap: 20px;
    max-width: 1180px;
    margin: 0 auto 60px;
    padding: 0 30px;
}

.am-search input,
.am-select select {
    height: 56px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 14px !important;
    padding: 14px 18px;
    font-size: 16px;
    color: #e2e8f0;
    backdrop-filter: blur(4px);
}

.am-search input::placeholder {
    color: #7d8fa0;
}

/* 🎯 Pulsante Filtra — aggiornato SOLO come richiesto */

.am-filter-button {
    height: 56px !important;
    border-radius: 14px !important;
    background: rgba(255,255,255,0.06) !important;
    border: 1px solid rgba(255,255,255,0.18) !important;
    color: #e2e8f0 !important;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: .25s ease;
}

.am-filter-button:hover {
    background: rgba(255,255,255,0.12) !important;
    transform: translateY(-2px);
}

.am-filter-button:focus,
.am-search input:focus,
.am-select select:focus {
    outline: none !important;
    border-color: #38bdf8 !important;
    box-shadow: 0 0 0 3px rgba(56,189,248,0.35);
}

/* ======================================================================
   PRODUCT GRID & CARD
====================================================================== */

.am-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px,1fr));
    gap: 34px;
    max-width: 1180px;
    padding: 0 30px;
    margin: 40px auto 80px;
}

.am-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 22px;
    padding: 24px;
    backdrop-filter: blur(12px);
    transition: 0.25s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 5px 18px rgba(0,0,0,0.25);
}

.am-card:hover {
    border-color: #38bdf8;
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(56,189,248,0.45);
}

.am-card-cat {
    background: rgba(56,189,248,0.18);
    color: #38bdf8;
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 12px;
    display: inline-block;
    margin: -6px 0 14px;
}

.am-card-thumb {
    height: 180px;
    background: rgba(255,255,255,0.07);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 18px;
}

.am-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.am-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 18px;
    letter-spacing: -0.02em;
}

.am-card-btn {
   display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 14px 22px;
    border-radius: 16px;
    border: 2px solid #38bdf8;
    color: #38bdf8;
    font-weight: 600;
    font-size: 14px;
    transition: .25s;
    margin-top: 10px;
    background: transparent;
}

.am-card-btn svg {
    width: 18px;
    height: 18px;
}

.am-card-btn:hover {
    transform: translateX(4px);
}

/* ======================================================================
   SINGLE PRODUCT PAGE — HERO / LAYOUT
====================================================================== */

.am-single-hero {
    padding: 180px 5vw 140px;
    background:
        radial-gradient(circle at 15% 0%, rgba(56,189,248,.22), transparent 55%),
        radial-gradient(circle at 90% 80%, rgba(23,212,195,.18), transparent 55%),
        #03121d;
}

.am-single-hero-inner {
    max-width: 1150px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    gap: 70px;
}

@media (max-width: 900px) {
    .am-single-hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }
}

.am-single-kicker {
    font-size: 12px;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: #9ca3af;
}

.am-single-title {
    font-size: clamp(40px, 4vw, 64px);
    font-weight: 900;
    color: #fff;
    margin: 14px 0;
    letter-spacing: -0.03em;
}

.am-single-cat {
    padding: 6px 14px;
    background: rgba(56,189,248,.18);
    color: #38bdf8;
    font-size: 12px;
    border-radius: 12px;
    display: inline-block;
    margin-bottom: 24px;
}

.am-single-desc {
    font-size: 18px;
    color: #a2b9c8;
    line-height: 1.7;
    max-width: 580px;
    margin-bottom: 30px;
}

@media(max-width: 900px){
    .am-single-desc {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
}

/* ======================================================================
   SINGLE PRODUCT — PDF LIST
====================================================================== */

.am-pdf-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 35px;
}

.am-pdf-card {
    display: flex;
    gap: 18px;
    align-items: center;
    padding: 18px 20px;
    border-radius: 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    transition: .25s;
}

.am-pdf-card:hover {
    border-color: #38bdf8;
    background: rgba(56,189,248,0.10);
    transform: translateY(-3px);
}

.am-pdf-icon svg,
.am-pdf-arrow svg {
    width: 24px;
    height: 24px;
    color: #38bdf8;
}

.am-pdf-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.am-pdf-name {
    font-size: 16px;
    font-weight: 600;
    color: #f1f5f9;
}

.am-pdf-download {
    font-size: 13px;
    color: #9ccae7;
}

@media(max-width: 600px){
    .am-pdf-card {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
}

/* ======================================================================
   SINGLE PRODUCT — IMMAGINE
====================================================================== */

.am-single-right {
    width: 100%;
    overflow: hidden;
}

.am-single-right img,
.am-single-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 22px;
    display: block;
    box-shadow: 0 0 30px rgba(56,189,248,.25);
}

@media(max-width: 600px){
    .am-single-right img,
    .am-single-image {
        border-radius: 18px;
    }
}

/* ======================================================================
   SINGLE PRODUCT — BUTTON "VISITA SITO PRODUTTORE"
====================================================================== */

.am-prod-btn-alt {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 14px 22px;
    border-radius: 16px;
    border: 2px solid #38bdf8;
    color: #38bdf8;
    font-weight: 600;
    font-size: 14px;
    transition: .25s;
    margin-top: 10px;
    background: transparent;
}

.am-prod-btn-alt:hover {
    background: rgba(56,189,248,0.18);
    transform: translateX(6px);
    color:white;
}

@media(max-width: 900px){
    .am-prod-btn-alt {
        display: inline-flex;
        margin-top: 16px;
    }
}

/* ======================================================================
   RESPONSIVE — TABLET & MOBILE
====================================================================== */

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

    .am-brand-row {
        gap: 20px;
        padding: 30px 20px 26px;
        max-width: 92%;
    }

    .am-brand-box {
        width: 130px;
        height: 60px;
        padding: 10px;
    }

    .am-filter-bar {
        grid-template-columns: 1fr 1fr;
        max-width: 92%;
        padding: 0 20px;
        gap: 16px;
    }

    .am-filter-button {
        grid-column: span 2;
    }

    .am-grid {
        grid-template-columns: repeat(auto-fill, minmax(230px,1fr));
        gap: 26px;
        padding: 0 20px;
        max-width: 92%;
    }
}

@media(max-width: 600px){

    .am-brand-row {
        justify-content: center;
        gap: 16px;
        padding: 22px 14px 10px;
        margin-bottom: 8px;
    }

    .am-brand-box {
        width: 110px;
        height: 58px;
        padding: 8px;
        border-radius: 12px;
    }

    .am-filter-bar {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 0 16px;
        margin-bottom: 36px;
    }

    .am-search input,
    .am-select select {
        font-size: 17px;
    }

    .am-filter-button {
        width: 100%;
        margin-top: 4px;
    }

    .am-grid {
        grid-template-columns: 1fr;
        padding: 0 16px;
        margin-top: 20px;
        gap: 28px;
    }
}