/* ── DiGesu Filter – Stili ───────────────────────────────── */

.digesu-filter-wrap {
    background: #fff;
    border: 1.5px solid #0082EF;
    border-radius: 10px;
    padding: 18px 24px;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
}

.digesu-filter-inner {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    width: 100%;
}

.digesu-filter-title {
    font-size: 15px;
    font-weight: 500;
    color: #0082EF;
    margin: 0;
    white-space: nowrap;
    flex-shrink: 0;
    padding-bottom: 11px;
    border-bottom: 2px solid #0082EF;
}

.digesu-filter-fields {
    display: flex;
    gap: 10px;
    flex: 1;
    align-items: flex-end;
}

.digesu-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.digesu-filter-group label {
    display: block;
    font-size: 10px;
    font-weight: 500;
    color: #444;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.digesu-filter-group select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 13px;
    color: #333;
    background: #f8f9fa;
    appearance: auto;
    cursor: pointer;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.digesu-filter-group select:focus {
    outline: none;
    border-color: #0082EF;
    box-shadow: 0 0 0 3px rgba(0,130,239,0.15);
}

.digesu-filter-group select:disabled {
    background: #f0f0f0;
    color: #999;
    cursor: not-allowed;
}

/* ── Pulsanti ────────────────────────────────────────────── */

.digesu-filter-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

.digesu-btn {
    display: block;
    width: 100%;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    background: #0082EF;
    color: #fff !important;
    transition: background 0.2s, opacity 0.2s;
    box-sizing: border-box;
}

.digesu-btn:hover:not(:disabled) {
    background: #006ecc;
}

.digesu-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.digesu-btn-reset {
    background: #0082EF;
    color: #fff !important;
}

.digesu-btn-reset:hover {
    background: #006ecc;
}

/* ── WhatsApp ────────────────────────────────────────────── */

.digesu-whatsapp-wrap {
    margin-top: 16px;
    text-align: center;
}

.digesu-whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #25D366;
    color: #fff !important;
    font-size: 15px;
    font-weight: 700;
    padding: 13px 28px;
    border-radius: 50px;
    text-decoration: none !important;
    transition: background 0.2s, transform 0.2s;
    box-shadow: 0 4px 12px rgba(37,211,102,0.3);
    text-shadow: 0 0 1px rgba(0,0,0,0.6), 0 0 1px rgba(0,0,0,0.4);
}

.digesu-whatsapp-btn:hover {
    background: #1ebe5d;
    transform: translateY(-2px);
    color: #fff !important;
    box-shadow: 0 6px 18px rgba(37,211,102,0.4);
}

.digesu-whatsapp-btn svg {
    flex-shrink: 0;
}

/* ── Tablet e mobile ─────────────────────────────────────── */

@media only screen and (max-width: 900px) {
    .digesu-filter-inner {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
    }
    .digesu-filter-title {
        white-space: normal !important;
        padding-bottom: 10px !important;
    }
    .digesu-filter-fields {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
        width: 100% !important;
        flex: none !important;
    }
    .digesu-filter-group {
        width: 100% !important;
        flex: none !important;
    }
    .digesu-filter-group select {
        width: 100% !important;
        font-size: 15px !important;
        padding: 10px 12px !important;
    }
    .digesu-filter-actions {
        flex-direction: row !important;
        gap: 10px !important;
        width: 100% !important;
        flex-shrink: unset !important;
    }
    .digesu-btn {
        flex: 1 !important;
        font-size: 15px !important;
        padding: 12px !important;
        width: auto !important;
        white-space: normal !important;
    }
    .digesu-whatsapp-btn {
        font-size: 14px !important;
        padding: 12px 20px !important;
    }
}

@media only screen and (max-width: 480px) {
    .digesu-filter-wrap {
        padding: 14px 16px !important;
    }
    .digesu-filter-actions {
        flex-direction: column !important;
    }
    .digesu-btn {
        width: 100% !important;
    }
    .digesu-whatsapp-btn {
        width: 100% !important;
        justify-content: center !important;
    }
}

/* ── Risultati ───────────────────────────────────────────── */

#digesu-results-wrap { width: 100%; }
#digesu-results-count { font-size: 14px; color: #666; margin-bottom: 12px; }

.digesu-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.digesu-product-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
    background: #fff;
}

.digesu-product-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.digesu-product-card a { text-decoration: none; color: inherit; display: block; }

.digesu-product-card img {
    width: 100%; height: 160px; object-fit: contain;
    padding: 10px; background: #fafafa;
    border-bottom: 1px solid #f0f0f0;
}

.digesu-card-body { padding: 10px 12px 14px; }
.digesu-card-body h4 { font-size: 13px; font-weight: 600; color: #222; margin: 0 0 5px 0; line-height: 1.3; }
.digesu-sku { font-size: 11px; color: #999; margin: 0 0 5px 0; }
.digesu-price { font-size: 15px; font-weight: 700; color: #0082EF; margin: 0 0 6px 0; }

.digesu-badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px; }
.digesu-badge-stock { background: #e6f4ea; color: #2e7d32; }
.digesu-badge-nostock { background: #fdecea; color: #c62828; }

#digesu-loading { text-align: center; padding: 40px 0; color: #666; }

.digesu-spinner {
    width: 36px; height: 36px;
    border: 4px solid #e0e0e0; border-top-color: #0082EF;
    border-radius: 50%;
    animation: digesu-spin 0.8s linear infinite;
    margin: 0 auto 12px;
}

@keyframes digesu-spin { to { transform: rotate(360deg); } }

.digesu-placeholder,
.digesu-no-results { color: #999; font-size: 14px; text-align: center; padding: 40px 20px; grid-column: 1 / -1; }
