/* ============================================
   BLACK FRAUD SCORE - Estilos
   ============================================ */

:root {
    /* Cores */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #0ea5e9;

    --green: #22c55e;
    --green-bg: rgba(34, 197, 94, 0.1);
    --yellow: #eab308;
    --yellow-bg: rgba(234, 179, 8, 0.1);
    --red: #ef4444;
    --red-bg: rgba(239, 68, 68, 0.1);

    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --bg-card: #1e293b;
    --bg-card-hover: #334155;

    --text: #f8fafc;
    --text-muted: #94a3b8;
    --text-dark: #64748b;

    --border: #334155;

    /* Espaçamento */
    --container: 1200px;
    --radius: 12px;
    --radius-sm: 8px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text);
    line-height: 1.6;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   HEADER
   ============================================ */
.header {
    background: var(--bg-darker);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 800;
}

.logo-icon {
    font-size: 1.8rem;
}

.logo-text {
    color: var(--text);
}

.logo-highlight {
    color: var(--red);
}

.nav {
    display: flex;
    gap: 24px;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--text);
}

.search-box {
    display: flex;
    gap: 8px;
}

.search-input {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    color: var(--text);
    width: 250px;
    font-size: 14px;
}

.search-input::placeholder {
    color: var(--text-dark);
}

.search-btn {
    background: var(--primary);
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.search-btn:hover {
    background: var(--primary-dark);
}

/* ============================================
   HERO
   ============================================ */
.hero {
    padding: 80px 0;
    text-align: center;
    background: linear-gradient(180deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px;
}

.text-red {
    color: var(--red);
}

.text-green {
    color: var(--green);
}

.text-gradient {
    background: linear-gradient(90deg, var(--red), var(--yellow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-label {
    color: var(--text-muted);
    font-size: 14px;
}

/* ============================================
   SCORE LEGEND
   ============================================ */
.score-legend {
    padding: 20px 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.legend-items {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
}

.legend-green {
    background: var(--green-bg);
}

.legend-yellow {
    background: var(--yellow-bg);
}

.legend-red {
    background: var(--red-bg);
}

.legend-score {
    font-weight: 700;
    font-size: 1.1rem;
}

.legend-green .legend-score {
    color: var(--green);
}

.legend-yellow .legend-score {
    color: var(--yellow);
}

.legend-red .legend-score {
    color: var(--red);
}

.legend-label {
    color: var(--text-muted);
    font-size: 14px;
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
    padding: 60px 0;
}

.section-dark {
    background: var(--bg-darker);
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.section-subtitle {
    color: var(--text-muted);
    margin-bottom: 0;
}

/* When not in section-header (categorias) */
#categorias .section-title {
    text-align: center;
}

#categorias .section-subtitle {
    text-align: center;
    margin-bottom: 40px;
}

/* ============================================
   PRODUCTS GRID
   ============================================ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.product-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border);
    transition: all 0.2s;
    cursor: pointer;
}

.product-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-4px);
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.product-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-favorite {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 6px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-favorite .heart-icon {
    width: 22px;
    height: 22px;
    transition: all 0.2s ease;
}

.btn-favorite:hover {
    color: var(--red);
    background: var(--red-bg);
    transform: scale(1.1);
}

.btn-favorite:hover .heart-icon {
    stroke: var(--red);
}

.btn-favorite.favorited .heart-icon {
    fill: var(--red);
    stroke: var(--red);
    animation: heartBeat 0.3s ease;
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Section Header with View Toggle */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.view-toggle-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-toggle-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    color: var(--primary);
}

/* List View Styles */
.products-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.product-list-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    transition: all 0.2s ease;
}

.product-list-item:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
}

.list-item-position {
    background: var(--primary);
    color: white;
    font-weight: 700;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

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

.list-item-name {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-item-store {
    color: var(--text-muted);
    font-size: 13px;
}

.list-item-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 120px;
}

.list-item-price .price-current {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--green);
}

.list-item-price .price-old {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.list-item-discount {
    min-width: 130px;
}

.list-item-discount .discount-badge {
    font-size: 12px;
    padding: 4px 10px;
}

.btn-view-store {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--bg-darker);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-view-store svg {
    width: 18px;
    height: 18px;
}

.btn-view-store:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.product-position {
    background: var(--primary);
    color: white;
    font-weight: 700;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.fraud-score {
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 14px;
}

.score-green {
    background: var(--green-bg);
    color: var(--green);
}

.score-yellow {
    background: var(--yellow-bg);
    color: var(--yellow);
}

.score-red {
    background: var(--red-bg);
    color: var(--red);
}

.product-name {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 15px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-store {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 16px;
}

.product-prices {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 12px;
}

.price-current {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--green);
}

.price-old {
    font-size: 14px;
    color: var(--text-dark);
    text-decoration: line-through;
}

.product-discount {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.discount-badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 13px;
}

.discount-real {
    background: var(--green-bg);
    color: var(--green);
}

.discount-fake {
    background: var(--red-bg);
    color: var(--red);
}

.product-link {
    color: var(--secondary);
    font-size: 13px;
    text-decoration: none;
}

.product-link:hover {
    text-decoration: underline;
}

/* ============================================
   CATEGORIES
   ============================================ */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
}

.category-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: var(--text);
}

.category-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
}

.category-card.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-color: transparent;
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.category-card.active .category-name {
    color: white;
    font-weight: 700;
}

.category-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.category-name {
    font-weight: 600;
}

/* ============================================
   STEPS
   ============================================ */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.step {
    text-align: center;
    padding: 24px;
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 16px;
}

.step h3 {
    margin-bottom: 8px;
}

.step p {
    color: var(--text-muted);
    font-size: 14px;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--bg-darker);
    border-top: 1px solid var(--border);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand p {
    color: var(--text-muted);
    margin-top: 12px;
}

.footer-links h4 {
    margin-bottom: 16px;
}

.footer-links a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 8px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--text);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 20px;
    text-align: center;
    color: var(--text-dark);
    font-size: 14px;
}

/* ============================================
   MODAL
   ============================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius);
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 30px;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--text);
}

/* ============================================
   LOADING
   ============================================ */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    grid-column: 1 / -1;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border);
    color: var(--text);
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid rgba(239, 68, 68, 0.3);
    color: var(--red);
    width: 44px;
    height: 44px;
    padding: 0;
    font-size: 20px;
    border-radius: 12px;
}

.btn-icon:hover {
    border-color: var(--red);
    background: var(--red);
    color: white;
    transform: scale(1.05);
}

/* ============================================
   AUTH BUTTONS & USER AREA
   ============================================ */
.auth-buttons {
    display: flex;
    gap: 12px;
}

.user-area {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

#user-name {
    color: var(--text-muted);
    font-weight: 500;
}

/* ============================================
   AUTH MODAL
   ============================================ */
.modal-auth {
    max-width: 440px;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.98) 0%, rgba(15, 23, 42, 0.98) 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 20px;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    padding: 40px;
    backdrop-filter: blur(20px);
}

.modal-auth .modal-close {
    color: var(--text-muted);
    font-size: 1.8rem;
    top: 20px;
    right: 25px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.modal-auth .modal-close:hover {
    color: white;
    background: var(--red);
}

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

.auth-header .logo-text {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--text) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-header .logo-highlight {
    background: linear-gradient(135deg, var(--red) 0%, #ff6b6b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 32px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tab-btn {
    flex: 1;
    padding: 14px 20px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.tab-btn:hover:not(.active) {
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group input {
    width: 100%;
    padding: 16px 18px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text);
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.08);
    box-shadow:
        0 0 0 4px rgba(99, 102, 241, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.form-group input::placeholder {
    color: var(--text-dark);
}

#form-login h2,
#form-registro h2 {
    margin-bottom: 8px;
    text-align: center;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text);
}

#form-login p.auth-subtitle,
#form-registro p.auth-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 28px;
    font-size: 14px;
    line-height: 1.5;
}

.btn-primary.btn-block {
    padding: 16px 24px;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 12px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, #818cf8 50%, var(--primary-dark) 100%);
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.btn-primary.btn-block:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

/* ============================================
   DESEJOS MODAL
   ============================================ */
.modal-desejos {
    max-width: 500px;
}

.modal-desejos h2 {
    margin-bottom: 8px;
}

.modal-subtitle {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.desejos-lista {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
}

.desejo-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--bg-darker);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.desejo-item.meta-atingida {
    border-color: var(--green);
    background: var(--green-bg);
}

.desejo-info h4 {
    font-size: 14px;
    margin-bottom: 4px;
}

.desejo-info p {
    font-size: 13px;
    color: var(--text-muted);
}

.desejo-info .preco-alvo {
    color: var(--primary);
    font-weight: 500;
}

.desejo-item.meta-atingida .preco-alvo {
    color: var(--green);
}

.btn-remove {
    background: var(--red-bg);
    color: var(--red);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.2s;
}

.btn-remove:hover {
    background: var(--red);
    color: white;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 20px;
    line-height: 1.8;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 16px 24px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    color: var(--text);
    font-weight: 500;
    z-index: 2000;
    transform: translateX(120%);
    transition: transform 0.3s ease;
    max-width: 350px;
}

.toast.show {
    transform: translateX(0);
}

.toast-success {
    border-color: var(--green);
    background: var(--green-bg);
    color: var(--green);
}

.toast-error {
    border-color: var(--red);
    background: var(--red-bg);
    color: var(--red);
}

.toast-warning {
    border-color: var(--yellow);
    background: var(--yellow-bg);
    color: var(--yellow);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
    }

    .nav {
        order: 4;
        width: 100%;
        justify-content: center;
        padding-top: 16px;
        border-top: 1px solid var(--border);
        margin-top: 16px;
    }

    .search-box {
        flex: 1;
        order: 2;
    }

    .search-input {
        width: 100%;
    }

    .auth-buttons,
    .user-area {
        order: 3;
    }

    .auth-buttons .btn {
        padding: 8px 12px;
        font-size: 13px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }

    .legend-items {
        flex-direction: column;
        gap: 12px;
    }

    .steps-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        padding: 20px;
    }

    .toast {
        left: 20px;
        right: 20px;
        max-width: none;
    }
}

/* ============================================
   BOTAO COMPARAR PRECOS
   ============================================ */
.btn-compare {
    width: 100%;
    padding: 10px 16px;
    margin-top: 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-compare:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-compare.btn-disabled {
    background: var(--bg-card);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.5;
}

.btn-compare.btn-disabled:hover {
    transform: none;
    box-shadow: none;
}

/* ============================================
   MODAL COMPARATIVO
   ============================================ */
.modal-comparativo {
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
}

.comparativo-header {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.comparativo-header h3 {
    font-size: 1.4rem;
    margin-bottom: 8px;
    color: var(--text);
}

.economia-destaque {
    color: var(--green);
    font-size: 1.1rem;
}

.economia-destaque strong {
    font-size: 1.3rem;
}

.aviso-preco {
    margin-top: 12px;
    padding: 8px 12px;
    background: rgba(234, 179, 8, 0.1);
    border-radius: var(--radius-sm);
    color: var(--yellow);
    font-size: 0.85rem;
}

.comparativo-lojas {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comparativo-loja {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    position: relative;
    transition: all 0.3s ease;
}

.comparativo-loja:hover {
    border-color: var(--primary);
    transform: translateX(4px);
}

.comparativo-loja.melhor-preco {
    border-color: var(--green);
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), transparent);
}

.tag-melhor {
    position: absolute;
    top: -10px;
    left: 20px;
    background: var(--green);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.tag-tempo-real {
    position: absolute;
    top: -10px;
    right: 20px;
    background: var(--secondary);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.loja-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.loja-info h4 {
    font-size: 1.1rem;
    color: var(--text);
}

.loja-preco {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 8px;
}

.loja-preco .preco-atual {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
}

.loja-preco .economia {
    color: var(--green);
    font-weight: 600;
    font-size: 0.9rem;
}

.loja-historico {
    color: var(--text-muted);
    margin-bottom: 12px;
}

.btn-ir-loja {
    display: inline-block;
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-ir-loja:hover {
    background: var(--primary-dark);
}

/* Selecao de lojas com checkboxes */
.comparativo-header .subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 4px;
}

.lojas-selecao {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 24px 0;
}

.loja-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.loja-checkbox:hover {
    border-color: var(--primary);
    background: var(--bg-card-hover);
}

.loja-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
    cursor: pointer;
}

.loja-checkbox input[type="checkbox"]:checked + .checkmark + .loja-nome {
    color: var(--text);
}

.loja-checkbox .loja-nome {
    color: var(--text-muted);
    font-size: 0.95rem;
    transition: color 0.2s;
}

.lojas-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 20px;
}

.lojas-actions .btn {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-buscar-lojas {
    width: 100%;
    padding: 14px 24px;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Responsivo comparativo */
@media (max-width: 600px) {
    .modal-comparativo {
        width: 95%;
        padding: 16px;
    }

    .comparativo-loja {
        padding: 16px;
    }

    .lojas-selecao {
        grid-template-columns: 1fr;
    }

    .loja-preco .preco-atual {
        font-size: 1.3rem;
    }
}

/* ============================================
   TOAST / NOTIFICACOES
   ============================================ */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-icon {
    font-size: 1.2rem;
}

.toast-msg {
    color: var(--text);
    font-size: 0.95rem;
}

.toast-success {
    border-color: var(--green);
}

.toast-success .toast-icon {
    color: var(--green);
}

.toast-error {
    border-color: var(--red);
}

.toast-error .toast-icon {
    color: var(--red);
}

.toast-warning {
    border-color: var(--yellow);
}

.toast-warning .toast-icon {
    color: var(--yellow);
}

.toast-info {
    border-color: var(--primary);
}

.toast-info .toast-icon {
    color: var(--primary);
}

/* ============================================
   ANIMACAO BUSCA DE PRECO REAL
   ============================================ */

/* Loading Spinner para preco */
.preco-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.preco-loading .spinner {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Animacao de pulse no preco enquanto carrega */
.preco-pulse {
    animation: pricePulse 1.5s ease-in-out infinite;
}

@keyframes pricePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Preco atualizado - fade in com destaque */
.preco-atualizado {
    animation: priceUpdate 0.6s ease-out;
}

@keyframes priceUpdate {
    0% {
        transform: scale(1.1);
        background: rgba(99, 102, 241, 0.3);
    }
    100% {
        transform: scale(1);
        background: transparent;
    }
}

/* Tag de preco verificado */
.tag-preco-real {
    display: inline-block;
    padding: 2px 8px;
    margin-left: 8px;
    background: linear-gradient(135deg, var(--green), #16a34a);
    color: white;
    font-size: 10px;
    font-weight: 600;
    border-radius: 12px;
    text-transform: uppercase;
}

/* Status do preco */
.preco-status {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.preco-status.verificado {
    color: var(--green);
}

.preco-status.erro {
    color: var(--yellow);
}

/* Loading animation completo para comparativo */
.comparativo-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.comparativo-loading .loader {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 24px;
}

.comparativo-loading .loading-text {
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.comparativo-loading .loading-subtext {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Barra de progresso para busca de precos */
.progress-bar-container {
    width: 100%;
    max-width: 300px;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 16px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Animacao de busca por loja */
.loja-buscando {
    position: relative;
    overflow: hidden;
}

.loja-buscando::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(99, 102, 241, 0.1),
        transparent
    );
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    100% { left: 100%; }
}

/* Diferenca de preco destacada */
.preco-diferenca {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 8px;
}

.preco-diferenca.economia {
    background: var(--green-bg);
    color: var(--green);
}

.preco-diferenca.aumento {
    background: var(--red-bg);
    color: var(--red);
}
