/* ==========================================================================
   WooCommerce Product Attributes Display - Estilos CSS
   ========================================================================== */

/* Especificações do Pneu */
.tire-specifications {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.tire-specifications .specs-title {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

/* Layout de duas colunas para especificações */
.specs-grid-two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    background: white;
    border-radius: 6px;
    padding: 15px;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-left: 4px solid #3498db;
    background: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 5px;
}

.spec-row:nth-child(even) {
    background: #ffffff;
    border-left-color: #2ecc71;
}

.spec-row .spec-label {
    font-weight: 500;
    color: #555;
    font-size: 14px;
    text-transform: capitalize;
}

.spec-row .spec-value {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.spec-item {
    display: flex;
    align-items: center;
    background: white;
    padding: 12px;
    border-radius: 6px;
    border-left: 4px solid #3498db;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.spec-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.spec-icon {
    font-size: 20px;
    margin-right: 10px;
    min-width: 30px;
}

.spec-content {
    flex: 1;
}

.spec-label {
    display: block;
    font-weight: 500;
    color: #555;
    font-size: 13px;
    margin-bottom: 2px;
}

.spec-value {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
}

/* Estilo Compacto para Especificações */
.tire-specs-compact {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
}

.tire-size-display {
    font-family: 'Courier New', monospace;
}

.tire-size-main {
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 1px;
}

.tire-indices {
    font-size: 18px;
    opacity: 0.9;
    margin-left: 10px;
}

/* Etiqueta Energética */
.energy-label {
    background: white;
    border: 2px solid #27ae60;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    position: relative;
}

.energy-label::before {
    content: "🇪🇺";
    position: absolute;
    top: -10px;
    right: 15px;
    background: white;
    padding: 0 10px;
    font-size: 20px;
}

.energy-label-title {
    margin: 0 0 15px 0;
    color: #27ae60;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
}

.energy-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.energy-metric {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #27ae60;
}

.metric-icon {
    font-size: 18px;
    margin-right: 10px;
    min-width: 25px;
}

.metric-label {
    flex: 1;
    font-weight: 500;
    color: #555;
    font-size: 14px;
}

.metric-value {
    font-weight: bold;
    font-size: 16px;
    padding: 4px 8px;
    border-radius: 4px;
    color: white;
    min-width: 40px;
    text-align: center;
}

/* Classes de Eficiência Energética */
.grade-a { background-color: #27ae60; }
.grade-b { background-color: #2ecc71; }
.grade-c { background-color: #f39c12; }
.grade-d { background-color: #e67e22; }
.grade-e { background-color: #e74c3c; }
.grade-f { background-color: #c0392b; }
.grade-g { background-color: #8e44ad; }

/* Etiqueta Energética Compacta */
.energy-label-compact {
    background: none;
    border: none;
    padding: 10px 0;
}

.energy-compact {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.energy-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    background: #3498db;
}

.energy-badge.fuel { background: #27ae60; }
.energy-badge.wet { background: #3498db; }
.energy-badge.noise { background: #e67e22; }

/* Tabela de Atributos */
.product-attributes-table {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.attributes-title {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.attributes-grid {
    display: grid;
    gap: 10px;
}

.attributes-grid.columns-1 {
    grid-template-columns: 1fr;
}

.attributes-grid.columns-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.attributes-grid.columns-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.attribute-row {
    display: flex;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #3498db;
}

.attribute-row:nth-child(even) {
    background: #ffffff;
}

.attribute-label {
    font-weight: 600;
    color: #555;
    min-width: 120px;
    margin-right: 10px;
}

.attribute-value {
    flex: 1;
    color: #2c3e50;
    font-weight: 500;
}

/* Código EAN */
.product-ean {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    margin: 15px 0;
    font-family: 'Courier New', monospace;
}

.ean-label {
    font-weight: 600;
    color: #555;
    margin-right: 8px;
}

.ean-code {
    font-weight: bold;
    color: #2c3e50;
    font-size: 16px;
    letter-spacing: 1px;
}

.ean-barcode {
    margin-left: 15px;
    font-family: 'Courier New', monospace;
    font-size: 20px;
    color: #333;
    letter-spacing: 2px;
}

/* Logo da Marca */
.product-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin: 15px 0;
}

.product-brand.brand-small {
    padding: 10px;
}

.product-brand.brand-large {
    padding: 25px;
}

.brand-logo {
    max-height: 40px;
    max-width: 120px;
    object-fit: contain;
    margin-right: 10px;
}

.brand-small .brand-logo {
    max-height: 30px;
    max-width: 80px;
}

.brand-large .brand-logo {
    max-height: 60px;
    max-width: 180px;
}

.brand-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
}

.brand-small .brand-name {
    font-size: 14px;
}

.brand-large .brand-name {
    font-size: 18px;
}

/* Mensagens de Erro */
.no-specs,
.no-energy-label,
.no-attributes {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    margin: 15px 0;
}

/* Responsividade */
@media (max-width: 768px) {
    .specs-grid,
    .energy-metrics,
    .attributes-grid,
    .specs-grid-two-columns {
        grid-template-columns: 1fr;
    }
    
    .spec-item,
    .energy-metric,
    .attribute-row {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    
    .spec-icon,
    .metric-icon {
        margin-bottom: 5px;
    }
    
    .attribute-label {
        min-width: auto;
        margin-bottom: 5px;
    }
    
    .tire-size-main {
        font-size: 20px;
    }
    
    .tire-indices {
        font-size: 16px;
        margin-left: 0;
        margin-top: 5px;
        display: block;
    }
    
    .energy-compact {
        justify-content: flex-start;
    }
    
    .product-brand {
        flex-direction: column;
        text-align: center;
    }
    
    .brand-logo {
        margin-right: 0;
        margin-bottom: 10px;
    }
}

/* Animações */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tire-specifications,
.energy-label,
.product-attributes-table {
    animation: fadeInUp 0.5s ease-out;
}

/* Impressão */
@media print {
    .tire-specifications,
    .energy-label,
    .product-attributes-table {
        background: white !important;
        border: 1px solid #000 !important;
        box-shadow: none !important;
        page-break-inside: avoid;
    }
    
    .spec-item,
    .energy-metric,
    .attribute-row {
        background: white !important;
        box-shadow: none !important;
    }
    
    .metric-value {
        color: #000 !important;
        background: #f0f0f0 !important;
    }
}
