/* ============================================
   Calculadora de Termostato — Wizard Styles
   ============================================ */

/* === Container & Header === */
.termostato-wizard {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 16px;
}

.calculadora-header {
    text-align: center;
    margin-bottom: 32px;
}

/* === Diary Shortcut Step 1 === */
.termostato-diario-shortcut {
    background: #fdf2f8;
    border: 1px solid #fbcfe8;
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    animation: termFadeIn 0.5s ease-out;
}

.termostato-diario-shortcut .shortcut-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #9d174d;
}

.termostato-diario-shortcut .shortcut-icon {
    font-size: 1.4rem;
}

.termostato-diario-shortcut .shortcut-controls {
    flex: 1;
    max-width: 280px;
}

.termostato-select-sm {
    padding: 8px 12px;
    font-size: 0.9rem;
    border-color: #f9a8d4;
}

.termostato-select-sm:focus {
    border-color: #ec4899;
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.15);
}

@media (max-width: 580px) {
    .termostato-diario-shortcut {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .termostato-diario-shortcut .shortcut-controls {
        width: 100%;
        max-width: none;
    }
}

.calculadora-icon {
    font-size: 3rem;
    margin-bottom: 8px;
}

.calculadora-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0;
}

/* === Progress Dots === */
.termostato-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 28px;
    padding: 0 20px;
}

.termostato-progress-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e2e8f0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.termostato-progress-dot.active {
    background: #3182ce;
    transform: scale(1.3);
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.2);
}

.termostato-progress-dot.completed {
    background: #38a169;
}

.termostato-progress-line {
    flex: 1;
    height: 2px;
    background: #e2e8f0;
    max-width: 40px;
    transition: background 0.3s ease;
}

.termostato-progress-line.completed {
    background: #38a169;
}

/* === Step Container === */
.termostato-step {
    animation: termFadeIn 0.35s ease-out;
}

@keyframes termFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.termostato-step-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.termostato-step-title .step-icon {
    font-size: 1.4rem;
}

/* === Form Fields === */
.termostato-field {
    margin-bottom: 20px;
}

.termostato-label {
    display: block;
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.termostato-input,
.termostato-select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    color: #2d3748;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.termostato-input:focus,
.termostato-select:focus {
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.15);
    outline: none;
}

.termostato-input::placeholder {
    color: #a0aec0;
}

.termostato-input-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.termostato-input-row .termostato-field {
    flex: 1;
}

.termostato-input-row .termostato-btn-inline {
    padding: 10px 20px;
    margin-bottom: 20px;
    white-space: nowrap;
}

/* === Card Radio Options === */
.termostato-card-group {
    margin-bottom: 20px;
}

.termostato-card-group-label {
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.termostato-card-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.termostato-card-option {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
    text-align: center;
}

.termostato-card-option:hover {
    border-color: #90cdf4;
    background: #ebf8ff;
}

.termostato-card-option.selected {
    border-color: #3182ce;
    background: #ebf8ff;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.15);
}

.termostato-card-option .card-icon {
    font-size: 1.8rem;
    margin-bottom: 6px;
}

.termostato-card-option .card-label {
    font-weight: 600;
    color: #2d3748;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.termostato-card-option .card-desc {
    font-size: 0.78rem;
    color: #718096;
    line-height: 1.3;
}

/* === Micro-Info Callout === */
.termostato-micro-info {
    background: #ebf8ff;
    border: 1px solid #bee3f8;
    border-radius: 10px;
    padding: 14px 16px;
    margin: 16px 0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9rem;
    color: #2b6cb0;
    line-height: 1.5;
}

.termostato-micro-info .info-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.termostato-micro-info.demand-increase {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #9a3412;
}

.termostato-micro-info.demand-decrease {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

/* === CEP Confirm Card === */
.termostato-cep-confirm {
    background: #f0fff4;
    border: 1px solid #c6f6d5;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    margin: 16px 0;
}

.termostato-cep-confirm .city-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #276749;
    margin-bottom: 12px;
}

.termostato-cep-confirm .confirm-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* === Buttons === */
.termostato-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.termostato-btn-primary {
    background: #3182ce;
    color: #fff;
}

.termostato-btn-primary:hover {
    background: #2b6cb0;
}

.termostato-btn-primary:disabled {
    background: #a0aec0;
    cursor: not-allowed;
}

.termostato-btn-secondary {
    background: #edf2f7;
    color: #4a5568;
}

.termostato-btn-secondary:hover {
    background: #e2e8f0;
}

.termostato-btn-outline {
    background: transparent;
    color: #3182ce;
    border: 1.5px solid #3182ce;
}

.termostato-btn-outline:hover {
    background: #ebf8ff;
}

.termostato-btn-sm {
    padding: 6px 14px;
    font-size: 0.85rem;
}

.termostato-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

/* === Loading Spinner === */
.termostato-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #718096;
    font-size: 0.9rem;
    padding: 12px 0;
}

.termostato-spinner {
    width: 20px;
    height: 20px;
    border: 2.5px solid #e2e8f0;
    border-top-color: #3182ce;
    border-radius: 50%;
    animation: termSpin 0.7s linear infinite;
}

@keyframes termSpin {
    to { transform: rotate(360deg); }
}

/* === Input Summary === */
.termostato-input-summary {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
}

.termostato-input-summary h4 {
    margin: 0 0 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #4a5568;
}

.termostato-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 16px;
}

.termostato-summary-grid .summary-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 4px 0;
    border-bottom: 1px dotted #e2e8f0;
    font-size: 0.85rem;
}

.termostato-summary-grid .summary-label {
    color: #718096;
}

.termostato-summary-grid .summary-value {
    font-weight: 600;
    color: #2d3748;
}

/* === Results === */
.termostato-result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.termostato-result-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 16px;
    text-align: center;
    transition: box-shadow 0.2s;
}

.termostato-result-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.termostato-result-card.highlight {
    border-color: #3182ce;
    background: linear-gradient(135deg, #ebf8ff, #e6fffa);
}

.termostato-result-card .result-icon {
    font-size: 1.6rem;
    margin-bottom: 6px;
}

.termostato-result-card .result-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 2px;
}

.termostato-result-card .result-unit {
    font-size: 0.85rem;
    color: #718096;
}

.termostato-result-card .result-label {
    font-size: 0.82rem;
    color: #a0aec0;
    margin-top: 4px;
}

/* === Scenarios === */
.termostato-scenarios {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 24px;
}

.termostato-scenario {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
}

.termostato-scenario h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #2d3748;
}

.termostato-scenario .scenario-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 0.88rem;
    color: #4a5568;
}

.termostato-scenario .scenario-value {
    font-weight: 600;
    color: #2d3748;
}

.termostato-scenario.worst-case {
    border-color: #fed7d7;
    background: #fff5f5;
}

/* === Month Chart === */
.termostato-month-chart {
    margin-bottom: 24px;
}

.termostato-month-chart h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 12px 0;
}

.termostato-months-bar {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 4px;
}

.termostato-month-cell {
    text-align: center;
    border-radius: 6px;
    padding: 8px 4px;
    font-size: 0.72rem;
    font-weight: 500;
    transition: all 0.2s;
}

.termostato-month-cell.active {
    background: #3182ce;
    color: #fff;
}

.termostato-month-cell.inactive {
    background: #edf2f7;
    color: #a0aec0;
}

/* === Tips === */
.termostato-tips {
    background: #fffff0;
    border: 1px solid #fefcbf;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 24px;
}

.termostato-tips h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #744210;
    margin: 0 0 10px 0;
}

.termostato-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.termostato-tips li {
    padding: 6px 0;
    font-size: 0.88rem;
    color: #744210;
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.termostato-tips li::before {
    content: "💡";
    flex-shrink: 0;
}

/* === Insulation Analysis === */
.termostato-insulation-analysis {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 24px;
}

.termostato-insulation-analysis h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #0c4a6e;
    margin: 0 0 12px 0;
}

.insulation-overview {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.insulation-factor-display {
    display: flex;
    align-items: center;
    gap: 8px;
}

.factor-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #0c4a6e;
}

.factor-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
}

.factor-badge.excellent { background: #dcfce7; color: #166534; }
.factor-badge.good { background: #dbeafe; color: #1e40af; }
.factor-badge.moderate { background: #fef3c7; color: #92400e; }
.factor-badge.poor { background: #fee2e2; color: #991b1b; }

.insulation-explanation {
    font-size: 0.88rem;
    color: #475569;
    margin: 0;
    line-height: 1.5;
    flex: 1;
    min-width: 200px;
}

.insulation-suggestions h5 {
    font-size: 0.88rem;
    font-weight: 600;
    color: #0c4a6e;
    margin: 0 0 10px 0;
}

.suggestion-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.suggestion-item {
    display: flex;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px dashed #e0f2fe;
    align-items: flex-start;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.suggestion-content {
    flex: 1;
}

.suggestion-change {
    font-size: 0.85rem;
    color: #334155;
    margin-bottom: 2px;
}

.change-from {
    color: #dc2626;
    text-decoration: line-through;
    opacity: 0.7;
}

.change-arrow {
    color: #94a3b8;
    margin: 0 4px;
}

.change-to {
    color: #16a34a;
    font-weight: 600;
}

.suggestion-savings {
    font-size: 0.82rem;
    color: #16a34a;
    font-weight: 600;
}

.insulation-optimal {
    font-size: 0.9rem;
    color: #166534;
    margin: 8px 0 0;
}

/* === Month Tooltip === */
.termostato-tooltip-container {
    display: none;
    margin-top: 10px;
}

.termostato-month-tooltip {
    background: #1e293b;
    color: #f1f5f9;
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 0.85rem;
    animation: tooltipFadeIn 0.2s ease;
}

@keyframes tooltipFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.tooltip-header {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #334155;
}

.tooltip-rows {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 16px;
}

.tooltip-row {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
}

.tooltip-row span:first-child {
    color: #94a3b8;
}

.tooltip-row span:last-child {
    font-weight: 600;
    color: #f1f5f9;
}

.tooltip-care-tip {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #334155;
    font-size: 0.82rem;
    color: #fbbf24;
    line-height: 1.4;
}

.termostato-month-cell {
    cursor: pointer;
}

.termostato-month-cell.tooltip-active {
    outline: 2px solid #fbbf24;
    outline-offset: -2px;
    transform: scale(1.08);
}

/* === Diário Banner === */
.termostato-diario-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    color: #fff;
    margin: 16px 0;
}

.termostato-diario-banner p {
    margin: 0 0 12px 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.termostato-diario-banner a {
    color: #fff;
    text-decoration: underline;
    font-weight: 600;
}

/* === Actions Row === */
.termostato-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 24px;
}

/* === Error Message === */
.termostato-error {
    color: #e53e3e;
    font-size: 0.85rem;
    margin-top: 4px;
}

/* === US-only Notice Banner === */
.termostato-us-notice {
    background: #dbeafe;
    border: 1px solid #93c5fd;
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    color: #1e40af;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* === Responsive === */
@media (max-width: 768px) {
    .termostato-wizard {
        padding: 0 8px;
    }

    .termostato-card-options {
        grid-template-columns: 1fr;
    }

    .termostato-result-grid {
        grid-template-columns: 1fr 1fr;
    }

    .termostato-scenarios {
        grid-template-columns: 1fr;
    }

    .termostato-months-bar {
        grid-template-columns: repeat(6, 1fr);
    }

    .termostato-input-row {
        flex-direction: column;
    }

    .termostato-input-row .termostato-btn-inline {
        margin-bottom: 0;
        width: 100%;
    }

    .termostato-summary-grid {
        grid-template-columns: 1fr;
    }

    .insulation-overview {
        flex-direction: column;
        align-items: flex-start;
    }

    .tooltip-rows {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .calculadora-title {
        font-size: 1.3rem;
    }

    .termostato-result-grid {
        grid-template-columns: 1fr;
    }

    .termostato-months-bar {
        grid-template-columns: repeat(4, 1fr);
    }

    .termostato-nav {
        flex-direction: column;
        gap: 10px;
    }

    .termostato-nav .termostato-btn {
        width: 100%;
    }
}

/* === Dark Mode === */
@media (prefers-color-scheme: dark) {
    .calculadora-title { color: #e2e8f0; }
    .termostato-step-title { color: #e2e8f0; }
    .termostato-label { color: #cbd5e0; }
    .termostato-input,
    .termostato-select {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    .termostato-card-option {
        background: #2d3748;
        border-color: #4a5568;
    }
    .termostato-card-option:hover {
        border-color: #63b3ed;
        background: #2a4365;
    }
    .termostato-card-option.selected {
        border-color: #3182ce;
        background: #2a4365;
    }
    .termostato-card-option .card-label { color: #e2e8f0; }
    .termostato-card-option .card-desc { color: #a0aec0; }
    .termostato-micro-info {
        background: #2a4365;
        border-color: #2b6cb0;
        color: #90cdf4;
    }
    .termostato-micro-info.demand-increase {
        background: #431407;
        border-color: #9a3412;
        color: #fed7aa;
    }
    .termostato-micro-info.demand-decrease {
        background: #052e16;
        border-color: #166534;
        color: #bbf7d0;
    }
    .termostato-cep-confirm {
        background: #22543d;
        border-color: #276749;
    }
    .termostato-cep-confirm .city-name { color: #9ae6b4; }
    .termostato-result-card {
        background: #2d3748;
        border-color: #4a5568;
    }
    .termostato-result-card .result-value { color: #e2e8f0; }
    .termostato-result-card.highlight {
        background: linear-gradient(135deg, #2a4365, #234e52);
        border-color: #3182ce;
    }
    .termostato-scenario {
        background: #2d3748;
        border-color: #4a5568;
    }
    .termostato-scenario h4 { color: #e2e8f0; }
    .termostato-scenario .scenario-row { color: #cbd5e0; }
    .termostato-scenario .scenario-value { color: #e2e8f0; }
    .termostato-scenario.worst-case {
        background: #3b1a1a;
        border-color: #9b2c2c;
    }
    .termostato-month-cell.inactive {
        background: #4a5568;
        color: #718096;
    }
    .termostato-tips {
        background: #3b3204;
        border-color: #744210;
    }
    .termostato-tips h4,
    .termostato-tips li { color: #fefcbf; }
    .termostato-btn-secondary {
        background: #4a5568;
        color: #e2e8f0;
    }
    .termostato-nav { border-top-color: #4a5568; }
    .termostato-progress-dot { background: #4a5568; }
    .termostato-progress-line { background: #4a5568; }
    .termostato-us-notice {
        background: #1e3a5f;
        border-color: #2b6cb0;
        color: #90cdf4;
    }
    .termostato-insulation-analysis {
        background: #0c1929;
        border-color: #1e3a5f;
    }
    .termostato-insulation-analysis h4 { color: #7dd3fc; }
    .insulation-explanation { color: #cbd5e0; }
    .insulation-suggestions h5 { color: #7dd3fc; }
    .suggestion-item { border-bottom-color: #1e3a5f; }
    .suggestion-change { color: #e2e8f0; }
    .insulation-optimal { color: #86efac; }
}

.dark-theme .calculadora-title { color: #e2e8f0; }
.dark-theme .termostato-step-title { color: #e2e8f0; }
.dark-theme .termostato-label { color: #cbd5e0; }
.dark-theme .termostato-input,
.dark-theme .termostato-select {
    background: #2d3748;
    border-color: #4a5568;
    color: #e2e8f0;
}
.dark-theme .termostato-card-option {
    background: #2d3748;
    border-color: #4a5568;
}
.dark-theme .termostato-card-option:hover {
    border-color: #63b3ed;
    background: #2a4365;
}
.dark-theme .termostato-card-option.selected {
    border-color: #3182ce;
    background: #2a4365;
}
.dark-theme .termostato-card-option .card-label { color: #e2e8f0; }
.dark-theme .termostato-card-option .card-desc { color: #a0aec0; }
.dark-theme .termostato-result-card {
    background: #2d3748;
    border-color: #4a5568;
}
.dark-theme .termostato-result-card .result-value { color: #e2e8f0; }
.dark-theme .termostato-scenario {
    background: #2d3748;
    border-color: #4a5568;
}
.dark-theme .termostato-nav { border-top-color: #4a5568; }
.dark-theme .termostato-us-notice {
    background: #1e3a5f;
    border-color: #2b6cb0;
    color: #90cdf4;
}

.dark-theme .termostato-micro-info.demand-increase {
    background: #431407;
    border-color: #9a3412;
    color: #fed7aa;
}
.dark-theme .termostato-micro-info.demand-decrease {
    background: #052e16;
    border-color: #166534;
    color: #bbf7d0;
}

.dark-theme .termostato-insulation-analysis {
    background: #0c1929;
    border-color: #1e3a5f;
}
.dark-theme .termostato-insulation-analysis h4 { color: #7dd3fc; }
.dark-theme .insulation-explanation { color: #cbd5e0; }
.dark-theme .insulation-suggestions h5 { color: #7dd3fc; }
.dark-theme .suggestion-item { border-bottom-color: #1e3a5f; }
.dark-theme .suggestion-change { color: #e2e8f0; }
.dark-theme .insulation-optimal { color: #86efac; }

/* === Recommended Products === */
.termostato-products {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px solid #e2e8f0;
}

.termostato-products-header {
    text-align: center;
    margin-bottom: 20px;
}

.termostato-products-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #2d3748;
    margin: 0 0 4px 0;
}

.termostato-products-header p {
    font-size: 0.88rem;
    color: #718096;
    margin: 0;
}

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

.termostato-product-card {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
}

.termostato-product-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.termostato-product-card img {
    width: 100%;
    height: 140px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #f7fafc;
}

.termostato-product-card .product-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 6px;
    line-height: 1.3;
}

.termostato-product-card .product-desc {
    font-size: 0.78rem;
    color: #718096;
    line-height: 1.4;
    margin-bottom: 10px;
    flex: 1;
}

.termostato-product-card .product-badge {
    display: inline-block;
    background: #ebf8ff;
    color: #2b6cb0;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.termostato-product-card .product-cta {
    display: block;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    padding: 9px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    transition: opacity 0.2s;
}

.termostato-product-card .product-cta:hover {
    opacity: 0.9;
}

.termostato-products-empty {
    text-align: center;
    color: #a0aec0;
    font-size: 0.9rem;
    padding: 20px 0;
}

@media (max-width: 480px) {
    .termostato-products-grid {
        grid-template-columns: 1fr;
    }
}

.dark-theme .termostato-products { border-top-color: #4a5568; }
.dark-theme .termostato-products-header h3 { color: #e2e8f0; }
.dark-theme .termostato-product-card { background: #2d3748; border-color: #4a5568; }
.dark-theme .termostato-product-card .product-name { color: #e2e8f0; }
.dark-theme .termostato-product-card .product-badge { background: #2a4365; color: #90cdf4; }
.dark-theme .termostato-product-card img { background: #1a202c; }

/* === Electricity Rate Field === */
.termostato-elec-rate-field {
    margin: 16px 0 8px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}
.termostato-rate-input-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}
.termostato-rate-currency {
    font-weight: 600;
    font-size: 0.95rem;
    color: #475569;
    min-width: 28px;
}
.termostato-rate-input {
    max-width: 120px;
    text-align: center;
    font-size: 1rem;
}
.termostato-rate-unit {
    font-size: 0.85rem;
    color: #64748b;
}
.termostato-rate-hint {
    margin-top: 6px;
    font-size: 0.78rem;
    color: #94a3b8;
}

/* Rate warning in results */
.result-rate-warning {
    margin-top: 4px;
    font-size: 0.72rem;
    color: #d97706;
    line-height: 1.3;
}
.result-rate-info {
    margin-top: 4px;
    font-size: 0.72rem;
    color: #16a34a;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    .termostato-elec-rate-field {
        background: #1e293b;
        border-color: #334155;
    }
    .termostato-rate-currency {
        color: #cbd5e1;
    }
    .termostato-rate-unit {
        color: #94a3b8;
    }
    .termostato-rate-hint {
        color: #64748b;
    }
}
.dark-theme .termostato-elec-rate-field {
    background: #1e293b;
    border-color: #334155;
}
.dark-theme .termostato-rate-currency {
    color: #cbd5e1;
}
.dark-theme .termostato-rate-unit {
    color: #94a3b8;
}
.dark-theme .termostato-rate-hint {
    color: #64748b;
}
