/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

/* ============================================
   STILI TABELLA CATEGORIE
   ============================================ */
.bbc-pumpselector-category-row {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.bbc-pumpselector-category-row:hover {
    background-color: #f8f9fa !important;
}

.bbc-pumpselector-category-row td {
    vertical-align: middle;
}

/* ============================================
   STILI PAGINA PRODOTTO SINGOLO
   ============================================ */
.page-content {
    padding: 2rem 0;
}

/* Immagine prodotto - sovrascrive Elementor per impostare 50% */
.bbc-pumpselector-public-display .page-content img.product-image,
.elementor-shortcode .page-content img.product-image,
.elementor-element .page-content img.product-image,
.page-content img.product-image {
    width: 25% !important;
    max-width: 25% !important;
    height: auto !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    margin-bottom: 1.5rem !important;
}

.page-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #333;
}

/* Descrizione prodotto */
.product-description {
    margin-bottom: 2rem;
    line-height: 1.8;
    color: #555;
}

.product-description p {
    margin-bottom: 1rem;
}

.product-description h3,
.product-description h4,
.product-description h5 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #333;
}

.product-description ul,
.product-description ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.product-description li {
    margin-bottom: 0.5rem;
}

.product-description table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
}

.product-description table th,
.product-description table td {
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    text-align: left;
}

.product-description table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.product-description img {
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
}

/* Contenuto extra prodotto */
.product-extra-content {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #e9ecef;
}

.product-extra-section {
    margin-bottom: 3rem;
}

.product-extra-section:last-child {
    margin-bottom: 0;
}

.product-extra-section h3,
.product-extra-section h4,
.product-extra-section h5 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #2c3e50;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3498db;
}

.product-extra-section p {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: #555;
}

.product-extra-section ul,
.product-extra-section ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.product-extra-section li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.product-extra-section table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.product-extra-section table thead {
    background-color: #2c3e50;
    color: #fff;
}

.product-extra-section table th,
.product-extra-section table td {
    padding: 1rem;
    border: 1px solid #dee2e6;
    text-align: left;
}

.product-extra-section table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.product-extra-section table tbody tr:hover {
    background-color: #e9ecef;
}

.product-extra-section img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Stili specifici per sezioni extra */
.product-applicazioni h3,
.product-applicazioni h4,
.product-applicazioni h5 {
    border-bottom-color: #27ae60;
}

.product-funzionamento h3,
.product-funzionamento h4,
.product-funzionamento h5 {
    border-bottom-color: #e74c3c;
}

.product-caratteristiche-costruzione h3,
.product-caratteristiche-costruzione h4,
.product-caratteristiche-costruzione h5 {
    border-bottom-color: #f39c12;
}

/* ============================================
   STILI GRIGLIA PRODOTTI
   ============================================ */
.bbc-pumpselector-products-grid .col-md-4 {
    margin-bottom: 2rem;
}

.bbc-pumpselector-products-grid > div > div {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.bbc-pumpselector-products-grid > div > div:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.bbc-pumpselector-products-grid a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.bbc-pumpselector-products-grid img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
}

.bbc-pumpselector-products-grid h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 1rem 1rem 0.5rem;
    color: #2c3e50;
}

.bbc-pumpselector-products-grid ul {
    list-style: none;
    padding: 0 1rem 1rem;
    margin: 0;
    flex-grow: 1;
}

.bbc-pumpselector-products-grid ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
    color: #555;
}

.bbc-pumpselector-products-grid ul li:last-child {
    border-bottom: none;
}

.bbc-pumpselector-products-grid ul li strong {
    color: #2c3e50;
    margin-right: 0.5rem;
}

/* ============================================
   STILI ALERT E MESSAGGI
   ============================================ */
.bbc-pumpselector-public-display .alert {
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 2rem;
}

.bbc-pumpselector-public-display .alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

.bbc-pumpselector-public-display .alert-warning {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

.bbc-pumpselector-public-display .alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .page-content h1 {
        font-size: 2rem;
    }
    
    .bbc-pumpselector-public-display .page-content img.product-image,
    .elementor-shortcode .page-content img.product-image,
    .elementor-element .page-content img.product-image,
    .page-content img.product-image {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .product-extra-section h3,
    .product-extra-section h4,
    .product-extra-section h5 {
        font-size: 1.5rem;
    }
    
    .bbc-pumpselector-products-grid h3 {
        font-size: 1.25rem;
    }
    
    .product-description table,
    .product-extra-section table {
        font-size: 0.9rem;
    }
    
    .product-description table th,
    .product-description table td,
    .product-extra-section table th,
    .product-extra-section table td {
        padding: 0.5rem;
    }
}