:root {
    --bg-color: #f4f5f9;
    --card-bg: #ffffff;
    --text-color: #1f2937;
    --text-muted: #6b7280;
    
    /* Cores quentes inspiradas na referência */
    --primary-color: #dc2626; /* Vermelho descontos */
    --accent-color: #f59e0b; /* Amarelo/Laranja atenção */
    --success-color: #10b981; /* Verde frete */
    --header-bg: #ffffff;
    --border-color: #e5e7eb;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.2s ease-in-out;
}

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

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

a { text-decoration: none; color: inherit; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.hidden { display: none !important; }
.text-center { text-align: center; }

/* HEADER */
.glass-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--header-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
    box-shadow: var(--shadow-sm);
}

.header-content { display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; align-items: center; gap: 8px; }
.logo-image { width: 36px; height: 36px; border-radius: 6px; }
.logo h1 { font-size: 1.4rem; font-weight: 800; color: #111827; }
.logo h1 span { color: var(--primary-color); }
.header-link {
    display: flex; align-items: center;
    background-color: #25D366; color: #fff;
    padding: 8px 16px; border-radius: 50px;
    font-weight: 600; font-size: 0.9rem;
    transition: var(--transition);
}
.header-link:hover { background-color: #1fae51; transform: scale(1.05); }

/* HERO SECTION */
.hero-panel {
    background: #fff; border-radius: 12px;
    padding: 24px; margin-top: 16px; margin-bottom: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}
.hero-title { font-size: 1.8rem; font-weight: 800; margin-bottom: 8px; color: #111827; }
.hero-subtitle { color: var(--text-muted); font-size: 1.05rem; margin-bottom: 16px; }
.hero-status-badges { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.status-badge {
    display: flex; align-items: center; gap: 6px;
    background: #f3f4f6; padding: 6px 12px;
    border-radius: 20px; font-size: 0.85rem; color: var(--text-muted);
}
.status-badge i { width: 16px; height: 16px; }

/* SEÇÕES */
.section-title { font-size: 1.4rem; font-weight: 700; margin: 32px 0 16px; display: flex; align-items: center; gap: 8px; }
.section-title i { color: var(--primary-color); }

/* BARRAS: FILTROS E BUSCA */
.search-and-filter-bar {
    display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
    background: #fff; padding: 16px; border-radius: 12px;
    border: 1px solid var(--border-color); margin-bottom: 24px;
}
.search-bar { flex: 1; min-width: 250px; position: relative; }
.search-bar input {
    width: 100%; padding: 12px 16px 12px 42px;
    border: 1px solid var(--border-color); border-radius: 8px;
    font-family: inherit; font-size: 0.95rem; outline: none;
}
.search-bar input:focus { border-color: var(--primary-color); }
.search-bar i { position: absolute; left: 14px; top: 12px; color: var(--text-muted); }
.filter-group { display: flex; gap: 8px; flex-wrap: wrap; }
.stock-filter-group { margin-left: auto; }
.filter-btn {
    padding: 8px 16px; border: 1px solid var(--border-color);
    background: #fff; color: var(--text-color);
    border-radius: 50px; font-weight: 600; cursor: pointer; transition: var(--transition);
}
.filter-btn.active { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }

.toolbar-section { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.results-meta strong { font-size: 1.2rem; font-weight: 700; }
.toolbar-actions select { padding: 8px 12px; border-radius: 6px; border: 1px solid var(--border-color); outline: none; }

/* GRIDS */
.featured-grid {
    display: grid; gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.product-grid {
    display: grid; gap: 20px;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

/* CARDS COMPACTOS (Ex: Promoções do Dia / Relâmpago) */
.featured-card {
    background: var(--card-bg); border: 1px solid var(--border-color);
    border-radius: 12px; overflow: hidden; display: flex;
    transition: var(--transition); cursor: pointer; box-shadow: var(--shadow-sm);
    height: 120px;
}
.featured-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: var(--primary-color); }
.card-img-wrap { width: 110px; min-width: 110px; background: #fff; display: flex; align-items: center; justify-content: center; border-right: 1px solid var(--border-color); padding: 8px; position: relative; }
.card-img-wrap img { max-width: 100%; max-height: 100%; object-fit: contain; }
.feature-discount-tag { position: absolute; top: 0; left: 0; background: var(--primary-color); color: #fff; font-size: 0.7rem; font-weight: 800; padding: 2px 6px; border-bottom-right-radius: 8px; }
.featured-body { padding: 12px; display: flex; flex-direction: column; justify-content: space-between; flex: 1; }
.featured-body h4 { font-size: 0.85rem; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: #111827; }
.featured-body .price-box { margin-top: auto; }
.featured-body .old-price { font-size: 0.75rem; color: var(--text-muted); text-decoration: line-through; }
.featured-body .new-price { font-size: 1.1rem; font-weight: 800; color: var(--primary-color); }

/* CARDS GERAIS (Histórico) */
.product-card {
    background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px;
    overflow: hidden; display: flex; flex-direction: column;
    transition: var(--transition); box-shadow: var(--shadow-sm); cursor: pointer; position: relative;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.card-image-box { aspect-ratio: 1; padding: 16px; background: #fff; position: relative; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid #f3f4f6; }
.card-image-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.discount-badge-lg { position: absolute; top: 12px; left: 12px; background: var(--primary-color); color: #fff; font-weight: 800; font-size: 0.85rem; padding: 4px 8px; border-radius: 6px; }
.marketplace-badge { position: absolute; top: 12px; right: 12px; background: #f3f4f6; color: var(--text-muted); font-size: 0.75rem; font-weight: 700; padding: 3px 8px; border-radius: 20px; text-transform: uppercase; }
.stock-badge { position: absolute; top: 12px; left: 12px; z-index: 2; background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; font-size: 0.72rem; font-weight: 800; padding: 3px 8px; border-radius: 20px; text-transform: uppercase; }
.stock-badge-out { box-shadow: 0 4px 12px rgba(194, 65, 12, 0.12); }
.card-content { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.card-title { font-size: 0.95rem; font-weight: 500; color: #374151; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 12px; }
.card-prices { margin-top: auto; margin-bottom: 12px; }
.card-old-price { font-size: 0.85rem; color: var(--text-muted); text-decoration: line-through; }
.card-current-price { font-size: 1.4rem; font-weight: 800; color: var(--primary-color); line-height: 1; }
.price-unavailable { color: #c2410c; }
.card-footer { display: flex; align-items: center; justify-content: space-between; }
.free-shipping { color: var(--success-color); font-size: 0.8rem; font-weight: 700; display: flex; align-items: center; gap: 4px; }
.free-shipping i { width: 14px; height: 14px; }
.buy-btn { background: var(--primary-color); color: #fff; font-size: 0.85rem; font-weight: 700; padding: 8px 16px; border-radius: 6px; transition: var(--transition); text-align: center; }
.buy-btn:hover { background: #b91c1c; }
.product-card.is-out-of-stock { opacity: 0.96; }

/* DETAIL VIEW */
.breadcrumb { margin: 24px 0 16px; font-weight: 600; }
.breadcrumb a { display: flex; align-items: center; gap: 6px; color: var(--text-muted); transition: var(--transition); }
.breadcrumb a:hover { color: var(--primary-color); }
.breadcrumb i { width: 18px; height: 18px; }

.product-detail-container {
    background: #fff; border-radius: 16px; border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm); display: grid; grid-template-columns: 1fr 1.2fr;
    gap: 32px; padding: 32px; margin-bottom: 32px;
}
.detail-image { display: flex; justify-content: center; align-items: center; position: relative; background: #fff; border-radius: 8px; padding: 16px; }
.detail-image img { max-width: 100%; max-height: 500px; object-fit: contain; }
.detail-tag { position: absolute; top: 0; left: 0; background: var(--primary-color); color: #fff; padding: 6px 12px; border-radius: 8px; font-weight: 800; font-size: 1rem; }
.detail-tag-out { background: #c2410c; }

.detail-info { display: flex; flex-direction: column; }
.detail-marketplace { display: inline-block; background: #f3f4f6; padding: 4px 10px; border-radius: 6px; font-size: 0.8rem; font-weight: 700; color: var(--text-muted); margin-bottom: 12px; text-transform: uppercase; align-self: flex-start; }
.detail-title { font-size: 1.6rem; font-weight: 700; color: #111827; margin-bottom: 24px; line-height: 1.3; }

.detail-price-box { background: #fdf2f8; padding: 20px; border-radius: 12px; margin-bottom: 24px; border: 1px solid #fce7f3; }
.detail-price-box-out { background: #fff7ed; border-color: #fed7aa; }
.detail-old-price { font-size: 1rem; color: var(--text-muted); text-decoration: line-through; margin-bottom: 4px; }
.detail-main-price { font-size: 2.2rem; font-weight: 800; color: var(--primary-color); display: flex; align-items: baseline; gap: 8px; line-height: 1; }
.detail-main-price span { font-size: 1.2rem; font-weight: 600; color: var(--text-muted); }
.detail-disclaimer { font-size: 0.75rem; color: var(--text-muted); margin-top: 8px; }
.detail-out-of-stock { font-size: 0.95rem; color: #9a3412; font-weight: 700; margin-bottom: 8px; }
.detail-cta-disabled { background: #f3f4f6; color: #6b7280; box-shadow: none; cursor: not-allowed; pointer-events: none; }
.detail-cta.detail-cta-disabled:hover { transform: none; box-shadow: none; background: #f3f4f6; }

.detail-cta { background: var(--primary-color); color: #fff; text-align: center; padding: 16px; font-size: 1.1rem; font-weight: 800; border-radius: 8px; transition: var(--transition); box-shadow: 0 4px 14px rgba(220, 38, 38, 0.4); display: flex; justify-content: center; align-items: center; gap: 10px; }
.detail-cta:hover { background: #b91c1c; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(220, 38, 38, 0.5); }
.detail-meta { margin-top: 16px; font-size: 0.85rem; color: var(--text-muted); display: flex; flex-direction: column; gap: 6px; }

/* BANNER WHATSAPP (Abaixo do detalhe do produto) */
.whatsapp-banner { background: #dcfce7; border: 1px solid #bbf7d0; border-radius: 12px; padding: 24px; text-align: center; margin-bottom: 40px; }
.whatsapp-banner h3 { color: #166534; font-size: 1.4rem; font-weight: 800; margin-bottom: 8px; }
.whatsapp-banner p { color: #15803d; margin-bottom: 16px; }
.cta-whatsapp { display: inline-flex; align-items: center; gap: 8px; background: #25D366; color: #fff; padding: 12px 24px; border-radius: 50px; font-weight: 700; font-size: 1.1rem; transition: var(--transition); }
.cta-whatsapp:hover { background: #1fae51; transform: scale(1.02); }

/* FOOTER */
.site-footer { background: #111827; color: #9ca3af; padding: 40px 0; margin-top: 60px; font-size: 0.85rem; }
.footer-logo { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.footer-logo-image { width: 30px; height: 30px; border-radius: 6px; filter: grayscale(1) invert(1); }
.footer-logo h3 { color: #fff; font-size: 1.2rem; }
.footer-logo h3 span { color: var(--primary-color); }
.footer-text p { margin-bottom: 8px; }

/* RESPONSIVIDADE */
@media (max-width: 850px) {
    .product-detail-container { grid-template-columns: 1fr; padding: 20px; gap: 20px; }
    .detail-image img { max-height: 350px; }
    .detail-title { font-size: 1.3rem; }
}
@media (max-width: 600px) {
    .featured-grid, .product-grid { grid-template-columns: 1fr; }
    .search-and-filter-bar { flex-direction: column; align-items: stretch; }
    .filter-group { justify-content: center; }
    .hero-title { font-size: 1.4rem; }
}

/* SKELETONS */
.skeleton-card { background: #e5e7eb; border-radius: 12px; height: 350px; animation: pulse 1.5s infinite; }
.skeleton-compact { height: 120px; }
@keyframes pulse { 0% { opacity: 0.6; } 50% { opacity: 0.3; } 100% { opacity: 0.6; } }
