/*
Theme Name: Achados Adami v2.1
Theme URI: https://adamicast.com.br
Author: Antigravity Code Assistant
Description: Tema premium estilo Gatry, totalmente otimizado para conversão.
Version: 2.1
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #27ae60;
    --primary-hover: #2ecc71;
    --accent: #e74c3c;
    --bg: #f0f2f5;
    --text: #2c3e50;
    --text-muted: #7f8c8d;
    --white: #ffffff;
    --card-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
.site-header {
    background: var(--white);
    padding: 1rem 0 0.5rem 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.logo {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--accent);
    display: flex;
    align-items: center;
}

.logo img {
    max-height: 80px;
    /* Limite de altura aumentado */
    width: auto;
    display: block;
}

.custom-logo-link {
    display: block;
}

.social-header {
    display: flex;
    gap: 10px;
}

.social-btn {
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    color: white;
    text-decoration: none;
    transition: transform 0.2s, opacity 0.2s;
}

.social-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.social-btn.telegram {
    background: #0088cc;
}

.social-btn.whatsapp {
    background: #25d366;
}

.social-btn.instagram {
    background: #E1306C;
}

/* Header Search */
.header-search {
    flex: 1;
    max-width: 500px;
    margin: 0 2rem;
}

.search-form {
    display: flex;
    background: #f1f3f4;
    border-radius: 8px;
    overflow: hidden;
    transition: background 0.2s;
    border: 1px solid transparent;
}

.search-form:focus-within {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 1px 6px rgba(32,33,36,0.1);
}

.search-field {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    color: var(--text);
}

.search-submit {
    background: transparent;
    border: none;
    padding: 0 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: var(--text-muted);
}

.search-submit svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.search-submit:hover {
    color: var(--primary);
}

.header-nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 0.5rem;
    border-top: 1px solid #eee;
    padding: 1rem 0;
}

.header-nav a {
    text-decoration: none;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    transition: color 0.2s;
}

.header-nav a:hover {
    color: var(--primary);
}

/* Search Bar */
.search-bar {
    display: flex;
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    margin-bottom: 2rem;
    overflow: hidden;
}

.search-bar input {
    flex: 1;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    outline: none;
}

.search-bar button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0 2rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.search-bar button:hover {
    background: var(--primary-hover);
}

/* Feed */
.feed-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

.offers-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

/* Offer Card */
.offer-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    display: flex;
    padding: 1.5rem;
    transition: transform 0.2s;
    overflow: hidden;
    /* Garante que nada vaze do card */
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.offer-card:hover {
    border-left: 4px solid var(--primary);
}

.offer-image {
    flex: 0 0 220px;
    width: 220px;
    height: 220px;
    background: #ffffff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 2rem;
    padding: 10px;
    overflow: hidden;
    border: 1px solid #f0f0f0;
}

.offer-image a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.offer-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Força a imagem a caber inteira no quadrado sem cortar */
}

.offer-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.offer-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    line-height: 1.3;
}

.offer-title a {
    color: var(--text);
    text-decoration: none;
}

.offer-price-container {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 1rem;
}

.price-old {
    font-size: 1.1rem;
    color: var(--text-muted);
    text-decoration: line-through;
    font-weight: 400;
}

.price-current {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}

.offer-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.offer-actions {
    margin-top: auto;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}

.offer-actions-main {
    flex: 0 0 auto;
}

.offer-btn {
    background: var(--primary);
    color: white !important;
    padding: 0.8rem 1.8rem;
    border-radius: 6px;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.95rem;
    box-shadow: 0 4px 10px rgba(39, 174, 96, 0.2);
    transition: all 0.2s;
    display: inline-block;
    text-align: center;
    max-width: 250px; /* Aligned with Gatry style */
}

.link-soon {
    color: #999;
    font-size: 12px;
}

.offer-share-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #eee;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-muted);
    padding: 0;
}

.share-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.share-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: #f0fff4;
}

.share-btn.whatsapp:hover {
    color: #25d366;
    border-color: #25d366;
    background: #eafff0;
}

.share-btn.copy-link.success {
    color: var(--primary);
    border-color: var(--primary);
    background: #f0fff4;
}

.time-ago {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    flex: 0 0 auto;
    width: 100%;
    text-align: right;
    margin-top: 5px;
}

/* Responsividade */
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        gap: 1.2rem;
        padding: 15px 15px; /* Added horizontal padding */
    }
    
    .header-search {
        order: 3;
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0 5px; /* Extra safety padding */
    }

    .social-header {
        order: 2;
        padding: 0 5px; /* Extra safety padding */
    }

    .logo {
        order: 1;
    }

    .logo {
        justify-content: center;
        padding: 5px 0;
    }

    .logo img {
        max-height: 55px;
        width: auto;
    }

    .social-header {
        justify-content: center;
        width: 100%;
        margin-top: 0;
        gap: 8px;
    }

    .social-btn {
        flex: 1;
        text-align: center;
        padding: 8px 5px;
        font-size: 0.75rem;
        border-radius: 6px;
    }

    /* Reduzir altura da busca no mobile */
    .search-field {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .search-submit {
        padding: 0 0.8rem;
    }

    .offer-card {
        flex-direction: column;
        padding: 1rem;
    }

    .offer-image {
        width: 100%;
        height: 200px;
        margin-right: 0;
        margin-bottom: 1.5rem;
    }

    .offer-title {
        font-size: 1.1rem;
    }

    .offer-price {
        font-size: 1.7rem;
    }

    .offer-actions {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        align-items: center;
        justify-content: space-between;
    }

    .offer-actions-main {
        flex: 1;
        min-width: 0;
    }

    .offer-btn {
        display: block;
        text-align: center;
        padding: 0.8rem 5px;
        font-size: 0.8rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        width: 100%;
        max-width: none;
    }

    .offer-share-actions {
        flex: 0 0 auto;
        display: flex;
        gap: 6px;
    }

    .share-btn {
        width: 32px;
        height: 32px;
    }

    .time-ago {
        width: 100%;
        text-align: right;
        margin-top: 5px;
    }
}

/* Load More Button */
.load-more-container {
    padding: 20px 0;
    text-align: center;
}

.gatry-load-more {
    display: inline-block;
    padding: 12px 40px;
    background: #fff;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.gatry-load-more:hover {
    background: #fdfdfd;
    border-color: #ccc;
    color: #333;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}