/*
Theme Name: Caixa de Cupons - Profissional
Theme URI: https://caixadecupons.com.br
Description: Tema profissional para site de cupons de desconto
Version: 1.0
Author: Caixa de Cupons
Author URI: https://caixadecupons.com.br
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: caixa-de-cupons
Domain Path: /languages
*/

/* ============================================
   RESET E ESTILOS BASE
   ============================================ */

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

html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #333;
    background-color: #fff;
    line-height: 1.6;
}

a {
    color: #22c55e;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #16a34a;
}

button {
    cursor: pointer;
    transition: all 0.3s ease;
}

/* ============================================
   CONTAINER
   ============================================ */

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

/* ============================================
   HEADER
   ============================================ */

header {
    background-color: #fff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #22c55e;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.logo-icon {
    font-size: 28px;
}

.search-box {
    flex: 1;
    max-width: 400px;
    display: flex;
    gap: 8px;
}

.search-box input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
}

.search-box input:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.search-box button {
    padding: 10px 20px;
    background-color: #22c55e;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
}

.search-box button:hover {
    background-color: #16a34a;
}

.header-nav {
    display: flex;
    gap: 20px;
    font-size: 13px;
}

.header-nav a {
    color: #666;
    font-weight: 500;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    background-color: #f9fafb;
    padding: 40px 0;
    border-bottom: 1px solid #e5e7eb;
    text-align: center;
}

.hero h1 {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #1f2937;
}

.hero p {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
}

/* ============================================
   FILTROS E CATEGORIAS
   ============================================ */

.filters {
    background-color: #f3f4f6;
    padding: 20px 0;
    border-bottom: 1px solid #e5e7eb;
}

.category-filter {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0;
    scroll-behavior: smooth;
}

.category-filter::-webkit-scrollbar {
    height: 4px;
}

.category-filter::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.category-filter::-webkit-scrollbar-thumb {
    background: #22c55e;
    border-radius: 2px;
}

.category-filter button {
    padding: 8px 16px;
    border: 1px solid #d1d5db;
    background-color: #fff;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.category-filter button:hover,
.category-filter button.active {
    background-color: #22c55e;
    color: #fff;
    border-color: #22c55e;
}

/* ============================================
   GRID DE LOJAS
   ============================================ */

.stores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    padding: 30px 0;
    border-bottom: 1px solid #e5e7eb;
}

.store-item {
    text-align: center;
    padding: 20px;
    border: 2px dashed #22c55e;
    border-radius: 8px;
    background-color: #f9fafb;
    cursor: pointer;
    transition: all 0.3s ease;
}

.store-item:hover {
    background-color: #f0fdf4;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.1);
}

.store-item img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 10px;
    border-radius: 50%;
    background-color: #fff;
    padding: 10px;
}

.store-item h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #1f2937;
}

.store-item .count {
    font-size: 12px;
    color: #22c55e;
    font-weight: bold;
}

/* ============================================
   MAIN LAYOUT
   ============================================ */

.main-layout {
    display: flex;
    gap: 30px;
    padding: 30px 0;
}

.coupons-section {
    flex: 1;
}

/* ============================================
   CARDS DE CUPONS
   ============================================ */

.coupon-card {
    display: flex;
    gap: 20px;
    background-color: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.coupon-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #22c55e;
}

.coupon-logo {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    background-color: #f9fafb;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.coupon-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
}

.coupon-content {
    flex: 1;
}

.coupon-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    gap: 10px;
}

.coupon-store {
    font-weight: 600;
    color: #1f2937;
    font-size: 16px;
}

.coupon-badge {
    display: inline-block;
    background-color: #fef08a;
    color: #854d0e;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    white-space: nowrap;
}

.coupon-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.coupon-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
    line-height: 1.5;
}

.coupon-code {
    background-color: #dcfce7;
    border: 2px solid #22c55e;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 12px;
}

.coupon-code-label {
    font-size: 11px;
    color: #666;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.coupon-code-value {
    font-size: 24px;
    font-weight: bold;
    color: #22c55e;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
}

.coupon-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

.coupon-date {
    font-size: 12px;
    color: #999;
}

.coupon-actions {
    display: flex;
    gap: 8px;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #22c55e;
    color: #fff;
}

.btn-primary:hover {
    background-color: #16a34a;
}

.btn-secondary {
    background-color: #f3f4f6;
    color: #1f2937;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background-color: #e5e7eb;
}

/* ============================================
   SIDEBAR
   ============================================ */

.sidebar {
    width: 300px;
}

.sidebar-box {
    background-color: #f9fafb;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.sidebar-box h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #1f2937;
}

.social-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background-color: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #22c55e;
    transition: all 0.3s ease;
    cursor: pointer;
}

.social-link:hover {
    background-color: #22c55e;
    color: #fff;
    border-color: #22c55e;
}

.popular-stores-list a {
    display: block;
    margin-bottom: 10px;
    padding: 8px;
    background-color: #fff;
    border-radius: 4px;
    font-size: 13px;
    color: #333;
    border-left: 3px solid #22c55e;
    transition: all 0.3s ease;
}

.popular-stores-list a:hover {
    background-color: #f0fdf4;
    padding-left: 12px;
}

/* ============================================
   PAGINAÇÃO
   ============================================ */

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.pagination a, .pagination span {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 13px;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background-color: #22c55e;
    color: #fff;
    border-color: #22c55e;
}

.pagination .current {
    background-color: #22c55e;
    color: #fff;
    border-color: #22c55e;
}

/* ============================================
   FOOTER
   ============================================ */

footer {
    background-color: #1f2937;
    color: #d1d5db;
    padding: 40px 0 20px;
    margin-top: 50px;
}

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

footer h3 {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
}

footer a {
    color: #d1d5db;
    font-size: 13px;
    display: block;
    margin-bottom: 8px;
}

footer a:hover {
    color: #22c55e;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 20px;
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
}

/* ============================================
   RESPONSIVO - TABLET
   ============================================ */

@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        gap: 15px;
    }

    .search-box {
        max-width: 100%;
        margin: 0;
    }

    .header-nav {
        flex-direction: column;
        gap: 10px;
        font-size: 12px;
    }

    .main-layout {
        flex-direction: column;
        gap: 20px;
    }

    .sidebar {
        width: 100%;
    }

    .coupon-card {
        flex-direction: column;
    }

    .coupon-logo {
        width: 100%;
        height: 150px;
    }

    .stores-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .hero h1 {
        font-size: 24px;
    }

    .coupon-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .coupon-actions {
        width: 100%;
    }

    .coupon-actions button,
    .coupon-actions a {
        flex: 1;
    }
}

/* ============================================
   RESPONSIVO - MOBILE
   ============================================ */

@media (max-width: 480px) {
    .header-top {
        padding: 10px 0;
    }

    .logo {
        font-size: 18px;
    }

    .search-box {
        flex-direction: column;
    }

    .hero h1 {
        font-size: 20px;
    }

    .hero p {
        font-size: 14px;
    }

    .coupon-code-value {
        font-size: 18px;
    }

    .stores-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .category-filter {
        gap: 8px;
    }

    .category-filter button {
        padding: 6px 12px;
        font-size: 12px;
    }

    .coupon-card {
        padding: 15px;
    }

    .coupon-logo {
        height: 100px;
    }

    .coupon-title {
        font-size: 14px;
    }

    .coupon-description {
        font-size: 13px;
    }

    .btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .sidebar-box {
        padding: 15px;
    }

    .footer-content {
        gap: 20px;
    }
}

/* ============================================
   WORDPRESS ESPECÍFICO
   ============================================ */

.wp-block-image {
    margin: 0;
}

.wp-block-image img {
    max-width: 100%;
    height: auto;
}

.wp-block-group {
    margin: 0;
}

/* Remover espaçamentos padrão do WordPress */
.wp-block-group > * + * {
    margin-top: 0;
}

.wp-block-group__inner-container > * + * {
    margin-top: 0;
}

/* Melhorar aparência de links */
.wp-block-button__link {
    background-color: #22c55e;
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
}

.wp-block-button__link:hover {
    background-color: #16a34a;
}
