* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-gradient-start: #667eea;
    --bg-gradient-end: #764ba2;
    --text-color: #2d3748;
    --card-bg: white;
    --border-color: #f0f0f0;
    --shadow: 0 6px 20px rgba(0,0,0,0.1);
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    min-height: 100vh;
    padding: 15px;
    transition: all 0.3s ease;
}

/* ===== MODO ESCURO ===== */
body.dark-mode {
    --bg-gradient-start: #1a1a2e;
    --bg-gradient-end: #16213e;
    --text-color: #e0e0e0;
    --card-bg: #2d3748;
    --border-color: #4a5568;
    --shadow: 0 6px 20px rgba(0,0,0,0.3);
}

body.dark-mode .search-input,
body.dark-mode .calc-input {
    background: #4a5568;
    color: white;
    border-color: #718096;
}

body.dark-mode .modal-content {
    background: #2d3748;
    color: white;
}

body.dark-mode .contacts-section,
body.dark-mode .footer {
    background: #2d3748;
    color: white;
}

body.dark-mode .contact-info,
body.dark-mode .footer p {
    color: #cbd5e0;
}

.main-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* ===== HEADER ===== */
.header {
    text-align: center;
    padding: 20px 15px;
    margin-bottom: 20px;
    position: relative;
}

.logo {
    font-size: 2.5em;
    margin-bottom: 8px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.header h1 {
    color: white;
    font-size: 2em;
    font-weight: 800;
    margin-bottom: 5px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.header p {
    color: rgba(255,255,255,0.9);
    font-size: 1em;
    font-weight: 500;
}

/* Botões do Header */
.header-buttons {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
}

.icon-btn {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.3em;
    transition: all 0.3s ease;
    color: white;
}

.icon-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

/* ===== CONTROLES ===== */
.controls {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.3);
}

.search-bar {
    position: relative;
    margin-bottom: 12px;
    display: flex;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 12px 45px 12px 18px;
    border: none;
    border-radius: 50px;
    font-size: 0.95em;
    font-family: inherit;
    background: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.search-icon {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2em;
}

.voice-btn {
    background: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.3em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.voice-btn:hover {
    transform: scale(1.1);
}

.voice-btn.listening {
    animation: pulse 1s infinite;
    background: #ff4757;
    color: white;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.filter-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-label {
    color: white;
    font-weight: 600;
    font-size: 0.85em;
}

.chip {
    padding: 6px 14px;
    background: rgba(255,255,255,0.25);
    border: 2px solid transparent;
    border-radius: 50px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.8em;
    backdrop-filter: blur(10px);
}

.chip:hover {
    background: rgba(255,255,255,0.35);
    transform: translateY(-2px);
}

.chip.active {
    background: white;
    color: #667eea;
    border-color: white;
}

/* ===== PRODUTOS GRID (5 COLUNAS - mais compacto) ===== */
.products-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 25px;
}

.product-card {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 12px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--category-color, linear-gradient(90deg, #FF1493, #FFD700, #667eea));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.product-card:hover::before {
    transform: scaleX(1);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    border-color: var(--category-color);
}

.product-card.hidden {
    display: none;
}

.product-card.comparing {
    border-color: #00d2ff;
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(0,210,255,0.1) 100%);
}

.product-image {
    width: 100%;
    height: 150px;
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    margin-bottom: 12px;
}

.product-actions-top {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
}

.btn-icon {
    background: rgba(255,255,255,0.9);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2em;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.btn-icon:hover {
    transform: scale(1.2);
}

.btn-icon.favorited {
    background: #FFD700;
}

.btn-icon.comparing {
    background: #00d2ff;
    color: white;
}

.product-header {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
}

.product-icon {
    font-size: 1.4em;
    background: var(--category-color, linear-gradient(135deg, #667eea, #764ba2));
    padding: 6px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    box-shadow: 0 2px 8px rgba(102,126,234,0.2);
}

.product-info {
    flex: 1;
    min-width: 0;
}

.category-badge {
    display: inline-block;
    padding: 2px 6px;
    background: var(--category-color, linear-gradient(135deg, #FF1493, #ff69b4));
    color: white;
    border-radius: 4px;
    font-size: 0.65em;
    font-weight: 600;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

.product-name {
    font-size: 0.8em;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.2;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

.price-tag {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.price-value {
    font-size: 1.2em;
    font-weight: 800;
    background: linear-gradient(135deg, #FF1493, #667eea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.price-unit {
    font-size: 0.7em;
    color: #718096;
    font-weight: 500;
}

.calc-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.75em;
    white-space: nowrap;
    width: 100%;
}

.calc-btn:hover {
    background: #5a67d8;
    transform: translateY(-1px);
}

/* ===== BOTÃO ORÇAMENTO FLUTUANTE ===== */
#orcamentoBtn {
    position: fixed;
    bottom: 90px;
    right: 25px;
    background: linear-gradient(135deg, #FF1493, #ff69b4);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1em;
    box-shadow: 0 8px 24px rgba(255,20,147,0.4);
    transition: all 0.3s ease;
    display: none;
    align-items: center;
    gap: 10px;
    z-index: 999;
}

#orcamentoBtn:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(255,20,147,0.5);
}

.orcamento-count {
    background: white;
    color: #FF1493;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

/* ===== MODAIS ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 30px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    animation: slideUp 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.modal-title {
    font-size: 1.4em;
    font-weight: 800;
    color: var(--text-color);
}

.close-btn {
    background: #f0f0f0;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.3em;
    color: #718096;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #e0e0e0;
    color: #2d3748;
    transform: rotate(90deg);
}

.modal-product-name {
    font-size: 1.1em;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 20px;
    padding: 12px;
    background: #f7fafc;
    border-radius: 10px;
    text-align: center;
}

body.dark-mode .modal-product-name {
    background: #4a5568;
}

.calc-group {
    margin-bottom: 20px;
}

.calc-label {
    display: block;
    font-size: 0.9em;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
}

.calc-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1em;
    font-family: inherit;
    transition: all 0.3s ease;
}

.calc-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

.calc-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Serviços Adicionais */
.additional-services {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
}

.additional-title {
    font-size: 1em;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 12px;
}

.service-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f7fafc;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

body.dark-mode .service-item {
    background: #4a5568;
}

.service-item:hover {
    background: #edf2f7;
}

body.dark-mode .service-item:hover {
    background: #718096;
}

.service-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.service-label {
    flex: 1;
    font-size: 0.9em;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
}

.service-price {
    font-size: 0.85em;
    font-weight: 700;
    color: #667eea;
}

.result-box {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    margin-top: 20px;
}

.result-label {
    font-size: 0.9em;
    opacity: 0.9;
    margin-bottom: 8px;
}

.result-value {
    font-size: 2.2em;
    font-weight: 800;
}

.modal-buttons-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 15px;
}

.whatsapp-btn-modal,
.share-btn,
.btn-secondary,
.btn-add-orcamento {
    width: 100%;
    background: #25D366;
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9em;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.whatsapp-btn-modal:hover {
    background: #20BA5A;
    transform: translateY(-2px);
}

.share-btn {
    background: #667eea;
}

.share-btn:hover {
    background: #5a67d8;
}

.btn-secondary {
    background: #718096;
    margin-top: 10px;
}

.btn-secondary:hover {
    background: #4a5568;
}

.btn-add-orcamento {
    background: #FF1493;
}

.btn-add-orcamento:hover {
    background: #e31284;
}

/* Orçamento */
.orcamento-items {
    margin-bottom: 20px;
}

.orcamento-item {
    background: #f7fafc;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    border-left: 4px solid #FF1493;
}

body.dark-mode .orcamento-item {
    background: #4a5568;
}

.orcamento-item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.orcamento-item-title {
    font-weight: 700;
    color: var(--text-color);
}

.orcamento-item-total {
    font-weight: 700;
    color: #FF1493;
}

.orcamento-item-body {
    font-size: 0.9em;
    color: var(--text-color);
}

.orcamento-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid #e2e8f0;
}

body.dark-mode .orcamento-row {
    border-bottom-color: #4a5568;
}

.btn-remove-orcamento {
    width: 100%;
    margin-top: 10px;
    padding: 8px;
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85em;
}

.orcamento-total {
    text-align: center;
    font-size: 1.5em;
    font-weight: 800;
    color: #FF1493;
    margin: 20px 0;
}

.empty-orcamento {
    text-align: center;
    padding: 40px;
    color: #718096;
}

/* WhatsApp Preview */
.whatsapp-preview {
    margin-top: 20px;
    padding: 15px;
    background: #e5ddd5;
    border-radius: 12px;
    border: 1px solid #d1d1d1;
}

body.dark-mode .whatsapp-preview {
    background: #1f2c33;
    border-color: #2a3942;
}

.preview-title {
    font-size: 0.85em;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 10px;
    text-align: center;
}

.preview-content {
    background: white;
    padding: 12px;
    border-radius: 8px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.85em;
    line-height: 1.5;
    color: #111;
    white-space: pre-wrap;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    max-height: 200px;
    overflow-y: auto;
}

body.dark-mode .preview-content {
    background: #1f2c33;
    color: #e9edef;
}

.preview-content em {
    color: #667eea;
}

/* NO RESULTS */
.no-results {
    text-align: center;
    padding: 50px 20px;
    color: white;
    display: none;
}

.no-results.show {
    display: block;
}

.no-results-icon {
    font-size: 3.5em;
    margin-bottom: 12px;
    opacity: 0.6;
}

/* CONTATOS */
.contacts-section {
    background: var(--card-bg);
    border-radius: 18px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
}

.contacts-title {
    text-align: center;
    font-size: 1.8em;
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: 25px;
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 18px;
}

.contact-card {
    background: linear-gradient(135deg, #FF1493, #ff69b4);
    color: white;
    padding: 18px;
    border-radius: 14px;
    text-align: center;
    transition: all 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(255,20,147,0.4);
}

.contact-icon {
    font-size: 2.2em;
    margin-bottom: 10px;
}

.contact-title {
    font-size: 1em;
    font-weight: 700;
    margin-bottom: 10px;
}

.contact-info {
    font-size: 0.85em;
    line-height: 1.5;
}

/* FOOTER */
.footer {
    background: var(--card-bg);
    border-radius: 18px;
    padding: 35px 25px;
    text-align: center;
    box-shadow: var(--shadow);
    margin-top: 35px;
}

.footer-icon {
    font-size: 2.2em;
    margin-bottom: 10px;
}

.footer h3 {
    font-size: 1.6em;
    color: var(--text-color);
    margin-bottom: 8px;
    font-weight: 700;
}

.footer p {
    color: #718096;
    font-size: 0.95em;
    margin-bottom: 18px;
}

.whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #25D366;
    color: white;
    padding: 14px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1em;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(37,211,102,0.3);
}

.whatsapp-btn:hover {
    background: #20BA5A;
    transform: translateY(-3px);
}

.whatsapp-icon {
    width: 22px;
    height: 22px;
}

/* BACK TO TOP */
.back-to-top {
    position: fixed;
    bottom: 22px;
    right: 22px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(102,126,234,0.4);
    transition: all 0.3s ease;
    opacity: 0;
    pointer-events: none;
    font-size: 1.3em;
}

.back-to-top.show {
    opacity: 1;
    pointer-events: all;
}

.back-to-top:hover {
    transform: translateY(-4px);
}

/* RESPONSIVE */
@media (max-width: 1400px) {
    .products-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1200px) {
    .products-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 1.6em;
    }

    .header-buttons {
        position: static;
        justify-content: center;
        margin-top: 15px;
    }

    .products-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .modal-content {
        padding: 20px 15px;
    }

    .filter-chips {
        justify-content: center;
    }

    .calc-row {
        grid-template-columns: 1fr;
    }
}

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