/* Variáveis CSS */
:root {
    --primary: #0066ff;
    /* Azul WTI */
    --primary-dark: #0052cc;
    --success: #28a745;
    /* Verde WhatsApp */
    --danger: #dc3545;
    /* Vermelho */
    --light-bg: #f8f9fa;
    /* Fundo claro */
    --card-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

/* Estilos Globais */
body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--light-bg);
    color: #333;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 40px 0;
    margin-bottom: 40px;
    box-shadow: var(--card-shadow);
}

.header h1 {
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.95;
    margin-bottom: 0;
}

.logo {
    width: 100px;
    height: 100px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 30px;
    box-shadow: var(--card-shadow);
    font-size: 3rem;
    color: var(--primary);
}

/* Filtros */
.filters-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 40px;
    box-shadow: var(--card-shadow);
}

.filter-group {
    margin-bottom: 15px;
}

.filter-group label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    display: block;
}

.filter-group input,
.filter-group select {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 15px;
    transition: all 0.3s ease;
    width: 100%;
}

.filter-group input:focus,
.filter-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
    outline: none;
}

.btn-filter {
    background-color: var(--primary);
    border: none;
    color: white;
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100%;
}

.btn-filter:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 102, 255, 0.3);
}

.btn-clear {
    background-color: #6c757d;
    border: none;
    color: white;
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100%;
}

.btn-clear:hover {
    background-color: #5a6268;
}

/* Cards de Produto */
.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.product-image-wrapper {
    width: 100%;
    height: 200px;
    background: #f0f0f0;
    position: relative;
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--success);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.product-badge.unavailable {
    background: var(--danger);
}

.product-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
    min-height: 30px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
    height: 60px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.product-sold {
    font-size: 0.8rem;
    color: var(--danger);
    font-weight: 500;
    margin-bottom: 10px;
}

.product-price-old {
    font-size: 0.9rem;
    color: #999;
    text-decoration: line-through;
    margin-bottom: 0;
}

.product-price-promo {
    color: var(--success);
    margin-bottom: 4px;
}

.product-discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--danger);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    z-index: 2;
}

.product-discount-text {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--danger);
    white-space: nowrap;
}

.product-footer {
    margin-top: auto;
    display: flex;
    gap: 10px;
}

.btn-whatsapp {
    flex: 1;
    background-color: var(--success);
    border: none;
    color: white;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-whatsapp:hover {
    background-color: #218838;
    transform: scale(1.02);
}

.btn-whatsapp:disabled,
.btn-whatsapp.disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: scale(1);
}

.btn-favorite {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    padding: 0;
}

.btn-favorite:hover {
    border-color: var(--danger);
    color: var(--danger);
}

.btn-favorite.active {
    background-color: var(--danger);
    border-color: var(--danger);
    color: white;
}

/* Paginação */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.pagination-btn {
    background-color: white;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
}

.pagination-btn:hover:not(:disabled) {
    background-color: var(--primary);
    color: white;
}

.pagination-btn.active {
    background-color: var(--primary);
    color: white;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Modal */
.modal-content {
    border: none;
    border-radius: 12px;
}

.modal-header {
    border-bottom: 2px solid #f0f0f0;
    padding: 20px;
}

.modal-header h5 {
    font-weight: 700;
    color: #333;
}

.modal-body {
    padding: 30px;
}

.modal-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 20px;
}

.modal-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.modal-info-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

.modal-info-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
}

.modal-footer {
    border-top: 2px solid #f0f0f0;
    padding: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        padding: 30px 0;
    }

    .header h1 {
        font-size: 1.8rem;
    }

    .logo {
        width: 80px;
        height: 80px;
        margin-right: 15px;
        font-size: 2.5rem;
    }

    .filters-section {
        padding: 20px;
    }
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

.empty-state-icon {
    font-size: 4rem;
    color: #ccc;
    margin-bottom: 20px;
}

.empty-state-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.empty-state-text {
    color: #666;
    margin-bottom: 20px;
}

/* Footer */
.footer {
    background: #333;
    color: white;
    padding: 40px 0;
    margin-top: 60px;
    text-align: center;
}

.footer p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

.footer a {
    color: var(--primary);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* --- Header com imagem (MobiShopping) --- */
.header-img {
    position: relative;
    overflow: hidden;
}

.header-img picture,
.header-img img {
    display: block;
    width: 100%;
}

.header-img .header-loja-img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
}

.header-img .header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.15), rgba(0,0,0,0.55));
    color: #fff;
    display: flex;
    align-items: flex-end;
    padding-bottom: 2rem;
}

.header-img .header-overlay h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.6);
}

.header-img .header-overlay p {
    margin-bottom: 0.25rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

@media (max-width: 768px) {
    .header-img .header-loja-img {
        max-height: 250px;
    }
    .header-img .header-overlay h1 {
        font-size: 1.3rem;
    }
    .header-img .header-overlay p {
        font-size: 0.85rem;
    }
}

/* --- Footer com imagem (MobiShopping) --- */
.footer-img picture,
.footer-img img {
    display: block;
    width: 100%;
}

.footer-img .footer-loja-img {
    width: 100%;
    object-fit: cover;
}