/*
Theme Name: Ofertas Imperdíveis
Theme URI: https://ofertasimperdiveis.com.br
Author: Diogo Soares
Author URI: https://instagram.com/diogosoares
Description: Tema WordPress completo para site de ofertas e afiliados com sistema de administração integrado
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ofertas-imperdiveis
Tags: e-commerce, affiliate, offers, responsive, custom-admin
*/

/* Estilos principais do tema */
body {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

* {
    box-sizing: border-box;
}

.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 20px;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

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

.stores-section {
    padding: 80px 20px;
    background: #f8f9fa;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: #2c3e50;
}

.stores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.store-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent;
}

.store-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.store-card.shopee {
    border-color: #ee4d2d;
}

.store-card.amazon {
    border-color: #ff9900;
}

.store-card.mercadolivre {
    border-color: #fff159;
}

.store-card.magalu {
    border-color: #0071ce;
}

.store-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    color: white;
}

.shopee-logo { background: #ee4d2d; }
.amazon-logo { background: #232f3e; }
.mercadolivre-logo { background: #fff159; color: #333; }
.magalu-logo { background: #0071ce; }

.store-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #2c3e50;
}

.store-card p {
    color: #666;
    margin-bottom: 25px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    color: white;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: white;
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
}

.products-section {
    padding: 80px 20px;
    background: white;
}

/* Search Styles */
.search-container {
    margin-bottom: 30px;
    position: relative;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    padding: 18px 25px;
    padding-right: 50px;
    border: 3px solid #e1e8ed;
    border-radius: 50px;
    font-size: 1.1rem;
    background: white;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1), 0 8px 25px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.search-input:hover {
    border-color: #667eea;
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.clear-search-btn {
    position: absolute;
    right: 15px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.clear-search-btn:hover {
    background: #c0392b;
    transform: scale(1.1);
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e1e8ed;
    border-top: none;
    border-radius: 0 0 15px 15px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.autocomplete-item {
    padding: 15px 20px;
    cursor: pointer;
    border-bottom: 1px solid #f8f9fa;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
}

.autocomplete-item:hover,
.autocomplete-item.highlighted {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-icon {
    font-size: 1.5rem;
    min-width: 30px;
}

.autocomplete-content {
    flex: 1;
}

.autocomplete-title {
    font-weight: 600;
    margin-bottom: 3px;
}

.autocomplete-details {
    font-size: 0.9rem;
    opacity: 0.8;
}

.search-results-info {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 15px 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    text-align: center;
    border: 2px solid #667eea;
}

.search-results-info h3 {
    margin: 0 0 5px 0;
    color: #2c3e50;
    font-size: 1.2rem;
}

.search-results-info p {
    margin: 0;
    color: #666;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #2c3e50;
}

.no-results p {
    font-size: 1.1rem;
    margin-bottom: 25px;
}

.filters-container {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 40px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: end;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 180px;
}

.filter-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
    font-size: 0.9rem;
}

.filter-select {
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    background: white;
    font-size: 1rem;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.filter-select:hover {
    border-color: #667eea;
}

.clear-btn {
    padding: 12px 25px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.clear-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.product-card {
    transition: all 0.3s ease;
}

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

.product-store {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.store-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
    flex-shrink: 0;
}

.store-badge.shopee { background: #ee4d2d; }
.store-badge.amazon { background: #232f3e; }
.store-badge.mercadolivre { background: #fff159; color: #333; }
.store-badge.magalu { background: #0071ce; }

.products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    max-width: 600px;
    margin: 0 auto;
}

.product-card {
    width: 100%;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    height: 200px;
    background: linear-gradient(45deg, #f0f2f5, #e1e8ed);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: #666;
    background-size: cover;
    background-position: center;
}

.product-info {
    padding: 25px;
}

.product-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #e74c3c;
    margin-bottom: 10px;
}

.product-original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 1rem;
    margin-left: 10px;
}

.product-discount {
    background: #e74c3c;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 15px;
}

.cta-section {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 80px 20px;
    text-align: center;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.footer {
    background: #2c3e50;
    color: white;
    padding: 40px 20px;
    text-align: center;
}

.footer p {
    margin: 0;
    opacity: 0.8;
}

.footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.footer a:hover {
    color: #764ba2;
}

/* Registration Form Styles */
.registration-section {
    padding: 80px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.registration-form-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.product-form {
    position: relative;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 30px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 15px;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

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

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: #667eea;
}

.image-upload-area {
    border: 2px dashed #e1e8ed;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-upload-area:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.02);
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: 100%;
    cursor: pointer;
    pointer-events: auto;
}

.upload-icon {
    font-size: 3rem;
    color: #667eea;
}

.upload-placeholder p {
    margin: 0;
    font-weight: 600;
    color: #2c3e50;
}

.upload-placeholder small {
    color: #666;
}

.image-preview {
    position: relative;
    display: inline-block;
}

.image-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.remove-image {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.remove-image:hover {
    background: #c0392b;
    transform: scale(1.1);
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.submit-btn {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    min-width: 180px;
    position: relative;
}

.submit-btn:hover {
    background: linear-gradient(45deg, #229954, #27ae60);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.clear-form-btn {
    background: linear-gradient(45deg, #95a5a6, #bdc3c7);
}

.clear-form-btn:hover {
    background: linear-gradient(45deg, #7f8c8d, #95a5a6);
}

.success-message {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border: 2px solid #27ae60;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    margin-top: 20px;
}

.success-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.success-icon {
    font-size: 3rem;
}

.success-content h3 {
    margin: 0;
    color: #27ae60;
    font-size: 1.5rem;
}

.success-content p {
    margin: 0;
    color: #155724;
}

/* Popup Styles */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.8) translateY(50px);
    transition: all 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.popup-overlay.active .popup-content {
    transform: scale(1) translateY(0);
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.popup-close:hover {
    background: #f8f9fa;
    color: #e74c3c;
    transform: rotate(90deg);
}

.popup-header {
    text-align: center;
    margin-bottom: 30px;
}

.popup-icon {
    font-size: 4rem;
    margin-bottom: 15px;
}

.popup-title {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 700;
}

.popup-subtitle {
    color: #666;
    font-size: 1rem;
    line-height: 1.5;
}

.popup-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.popup-form-group {
    display: flex;
    flex-direction: column;
}

.popup-form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
    font-size: 0.95rem;
}

.popup-form-group input {
    padding: 15px;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

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

.popup-form-group input:hover {
    border-color: #667eea;
}

.popup-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.popup-btn {
    flex: 1;
    padding: 15px 25px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.popup-btn-primary {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    color: white;
}

.popup-btn-primary:hover {
    background: linear-gradient(45deg, #229954, #27ae60);
    transform: translateY(-2px);
}

.popup-btn-secondary {
    background: #f8f9fa;
    color: #666;
    border: 2px solid #e1e8ed;
}

.popup-btn-secondary:hover {
    background: #e9ecef;
    border-color: #667eea;
    color: #2c3e50;
}

.popup-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.whatsapp-info {
    background: linear-gradient(135deg, #dcf8c6, #b2df8a);
    border: 2px solid #25d366;
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
    text-align: center;
}

.whatsapp-info h4 {
    margin: 0 0 10px 0;
    color: #075e54;
    font-size: 1.1rem;
}

.whatsapp-info p {
    margin: 0;
    color: #128c7e;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        max-width: 500px;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .stores-grid {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 100%;
    }
    
    .filters-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        min-width: auto;
        width: 100%;
    }

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

    .registration-form-container {
        padding: 25px;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
    }
}

/* Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

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

.fade-in {
    animation: fadeIn 0.6s ease;
}


/* Ajustes para o layout dos cards de produto */
@media (min-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 900px;
    }
}

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

