/* ══════════════════════════════════════════════════════════════
   CALCULADORA DE TINTA - RC PINTURAS E DECORAÇÕES
   ══════════════════════════════════════════════════════════════ */

*, *::before, *::after { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

:root {
    --navy: #0f2044;
    --orange: #e8893a;
    --orange-light: #f5a85e;
    --white: #ffffff;
    --gray-bg: #f4f6fb;
    --gray-border: #dde3f0;
    --text: #1a2a4a;
    --text-muted: #6b7a99;
    --radius: 16px;
    --shadow: 0 4px 24px rgba(15,32,68,0.10);
}

/* ── LAYOUT ── */
.calc-wrap {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 20px;
}

.card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 36px 36px 28px;
    margin-bottom: 24px;
    border: 1.5px solid var(--gray-border);
    animation: fadeUp 0.45s ease both;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── SECTION TITLES ── */
.section-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.18rem;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title .badge {
    background: var(--orange);
    color: #fff;
    border-radius: 8px;
    width: 34px; 
    height: 34px;
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* ── FORM FIELDS ── */
.fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 18px;
}

.fields-row2 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 18px;
    margin-top: 18px;
}

.field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.6px;
    margin-bottom: 7px;
    text-transform: uppercase;
}

.field input,
.field select {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid var(--gray-border);
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'DM Sans', sans-serif;
    color: var(--text);
    background: var(--gray-bg);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    appearance: none;
    -webkit-appearance: none;
}

.field input:focus,
.field select:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(232,137,58,0.13);
    background: #fff;
}

.field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7a99' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

/* ── PAINT CARDS ── */
.paint-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
}

.paint-card {
    border: 2px solid var(--gray-border);
    border-radius: 14px;
    padding: 20px 12px 16px;
    cursor: pointer;
    text-align: center;
    background: var(--gray-bg);
    transition: border-color 0.18s, transform 0.15s, box-shadow 0.18s, background 0.18s;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.paint-card:hover {
    border-color: var(--orange);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(232,137,58,0.14);
}

.paint-card.selected {
    border-color: var(--orange);
    background: #fff8f2;
    box-shadow: 0 6px 22px rgba(232,137,58,0.20);
    transform: translateY(-3px);
}

.paint-card.selected::after {
    content: '✓';
    position: absolute;
    top: 9px; 
    right: 10px;
    background: var(--orange);
    color: #fff;
    border-radius: 50%;
    width: 22px; 
    height: 22px;
    font-size: 0.72rem;
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-weight: 700;
    line-height: 22px;
    text-align: center;
}

.paint-icon {
    font-size: 2.2rem;
    margin-bottom: 10px;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.08));
}

.paint-name {
    font-family: 'Syne', sans-serif;
    font-size: 0.83rem;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.25;
    margin-bottom: 5px;
}

.paint-info {
    font-size: 0.73rem;
    color: var(--text-muted);
    font-weight: 500;
}

.paint-dot {
    width: 10px; 
    height: 10px;
    border-radius: 50%;
    margin: 8px auto 0;
    display: block;
}

/* ── ERROR ── */
.error-msg {
    color: #d94f4f;
    font-size: 0.9rem;
    margin-top: 14px;
    display: none;
    font-weight: 500;
    padding: 10px 14px;
    background: #fff0f0;
    border-radius: 8px;
    border: 1px solid #f5c0c0;
}

/* ── BUTTON ── */
.btn-calc {
    width: 100%;
    background: linear-gradient(90deg, var(--orange) 0%, var(--orange-light) 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 18px;
    font-family: 'Syne', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 20px rgba(232,137,58,0.30);
    margin-top: 4px;
}

.btn-calc:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(232,137,58,0.40);
}

.btn-calc:active { 
    transform: translateY(0); 
}

/* ── RESULT ── */
.result-box {
    display: none;
    background: linear-gradient(135deg, var(--navy) 0%, #1b3560 100%);
    border-radius: var(--radius);
    padding: 36px;
    color: #fff;
    animation: fadeUp 0.4s ease both;
    margin-bottom: 24px;
    box-shadow: 0 8px 36px rgba(15,32,68,0.22);
}

.result-box.visible { 
    display: block; 
}

.result-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 22px;
    color: var(--orange-light);
    letter-spacing: 0.5px;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.result-item {
    background: rgba(255,255,255,0.07);
    border-radius: 12px;
    padding: 16px 18px;
    border: 1px solid rgba(255,255,255,0.10);
}

.result-item-label {
    font-size: 0.73rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.6;
    margin-bottom: 6px;
    font-weight: 600;
}

.result-item-value {
    font-family: 'Syne', sans-serif;
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--orange-light);
}

.result-item-sub {
    font-size: 0.76rem;
    opacity: 0.55;
    margin-top: 3px;
}

.latas-section {
    background: rgba(255,255,255,0.07);
    border-radius: 12px;
    padding: 18px 20px;
    border: 1px solid rgba(255,255,255,0.10);
}

.latas-title {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.6;
    margin-bottom: 12px;
    font-weight: 600;
}

.latas-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.lata-badge {
    background: var(--orange);
    border-radius: 8px;
    padding: 8px 18px;
    font-family: 'Syne', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 2px 8px rgba(232,137,58,0.3);
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
    .fields-grid, 
    .fields-row2 { 
        grid-template-columns: 1fr; 
    }
    
    .card { 
        padding: 24px 18px; 
    }
    
    .paint-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}
