/* ===== RESET E VARIÁVEIS ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

:root {
    --primary: #6366f1;
    /* Indigo Premium */
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    --primary-dark: #4338ca;
    --primary-soft: rgba(99, 102, 241, 0.1);
    --primary-hover: rgba(99, 102, 241, 0.2);
    --secondary: #475569;
    --background: #f1f5f9;
    --surface: #ffffff;
    --card-bg: #ffffff;
    --text: #0f172a;
    --text-light: #64748b;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --nav-bg: #eef2ff;
    --sticky-filter-top: 72px;
    --filter-carpet-height: 120px;
    --whatsapp: #25D366;
    --whatsapp-dark: #128C7E;
}

.dark-mode {
    --primary: #818cf8;
    --primary-gradient: linear-gradient(135deg, #818cf8 0%, #6366f1 100%);
    --primary-dark: #4f46e5;
    --primary-soft: rgba(129, 140, 248, 0.15);
    --primary-hover: rgba(129, 140, 248, 0.25);
    --secondary: #94a3b8;
    --background: #0f172a;
    --card-bg: #1e293b;
    --text: #f8fafc;
    --text-light: #94a3b8;
    --border: #334155;
    --shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    --nav-bg: #0f172a;
}

body {
    background: var(--background);
    background-image:
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.03) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(30, 64, 175, 0.02) 0px, transparent 50%);
    color: var(--text);
    transition: background 0.3s, color 0.3s;
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* ===== UTILITÁRIOS ===== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    background: var(--primary-soft);
    color: var(--primary);
    border: none;
    padding: 10px 20px;
    border-radius: 40px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn:hover {
    background: var(--primary-hover);
    transform: scale(1.02);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

/* ===== NAVEGAÇÃO (NOVO DESIGN) ===== */
.nav .container {
    max-width: 100%;
    padding: 0 40px;
}

.nav {
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1100;
    box-shadow: 0 4px 20px -5px rgba(99, 102, 241, 0.15);
    border-bottom: 2px solid var(--primary);
}

/* Barra Superior (Top Bar) Refinada - Mais sutil */
.top-bar {
    background: #064e3b;
    /* Verde escuro */
    color: white;
    padding: 6px 0;
    /* Reduzido de 10px */
    font-size: 0.82rem;
    /* Reduzido de 0.9rem */
    font-weight: 500;
    text-align: center;
    position: relative;
    z-index: 1301;
    isolation: isolate;
}

@media (max-width: 1000px) {
    :root {
        --sticky-filter-top: 130px;
        --filter-carpet-height: 140px;
    }
}

.top-bar .container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.top-bar a.whatsapp-btn {
    background: #22c55e;
    color: white;
    padding: 4px 14px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.top-bar a.whatsapp-btn:hover {
    background: #16a34a;
    transform: scale(1.05);
}

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

    .top-bar .container {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        padding: 0 12px;
    }

    .top-bar .container span {
        font-size: 0.76rem;
        line-height: 1.3;
    }

    .top-bar .container span:nth-child(2) {
        display: none;
    }

    .top-bar a.whatsapp-btn {
        width: 100%;
        justify-content: center;
        padding: 9px 12px;
        min-height: 40px;
        z-index: 2;
        position: relative;
        pointer-events: auto;
    }
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.nav-brand {
    flex-shrink: 0;
}

.brand-box {
    background: #1e293b;
    /* Slate Profundo para elegância */
    color: white !important;
    padding: 10px 24px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 1.1rem;
    white-space: nowrap;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.brand-box span {
    color: white !important;
}

.brand-box i {
    color: var(--primary);
    /* Ícone em Indigo */
    filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.3));
}

.brand-box:hover {
    transform: translateY(-2px);
    background: #0f172a;
}

.nav-menu {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

/* Hamburguer Menu (Toggle) */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.nav-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--text);
    border-radius: 10px;
    transition: all .3s linear;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -8px);
}

.nav-item {
    cursor: pointer;
    font-weight: 600;
    padding: 5px 0;
    border-bottom: 3px solid transparent;
    transition: 0.2s;
    font-size: 0.95rem;
    white-space: nowrap;
}

.nav-item:hover {
    color: var(--primary);
    transform: translateY(-1px);
}

.nav-item.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.nav-search {
    flex: 1;
    max-width: 500px;
    margin: 0 20px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
    margin-left: 0;
}

@media (min-width: 1001px) {
    .nav-content {
        justify-content: center;
    }

    .nav-menu {
        display: contents;
    }

    .nav-links {
        order: 2;
    }

    .nav-search {
        order: 3;
    }

    .nav-actions {
        order: 5;
        margin-left: 0;
    }

    .nav-mobile-controls {
        order: 4;
        margin-left: 0;
        display: flex;
        align-items: center;
        gap: 15px;
    }
}

/* Toggle Switch Tema */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-switch {
    display: inline-block;
    height: 28px;
    position: relative;
    width: 54px;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: var(--border);
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
    border-radius: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5px;
    border: 1px solid var(--border);
}

.slider:before {
    background-color: #fff;
    bottom: 3px;
    content: "";
    height: 20px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 20px;
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked+.slider {
    background-color: var(--primary);
    border-color: var(--primary);
}

input:checked+.slider:before {
    transform: translateX(24px);
}

.slider .icon {
    font-size: 14px;
    user-select: none;
    z-index: 1;
}

.slider .sun {
    color: #ffb100;
}

.slider .moon {
    color: #f8fafc;
}


.btn-icon {
    background: var(--card-bg);
    border: 1px solid var(--border);
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.3rem;
    color: var(--text);
    box-shadow: var(--shadow);
}

.btn-icon:hover {
    background: var(--primary-soft);
    border-color: var(--primary);
    transform: scale(1.05);
}

.btn-primary-small {
    background: var(--primary-gradient);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 24px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 15px -4px rgba(99, 102, 241, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 20px -6px rgba(99, 102, 241, 0.4);
    filter: brightness(1.1);
}

.btn-outline-small {
    background: transparent;
    border: 1px solid var(--border);
    padding: 8px 18px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-outline-small:hover {
    background: var(--primary-soft);
    border-color: var(--primary);
}

.user-dropdown {
    position: relative;
    display: none;
    align-items: center;
}

.user-profile-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.user-profile-trigger:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.user-profile-trigger img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--primary);
}

.user-profile-trigger span {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
}

.user-profile-trigger .chevron {
    font-size: 0.7rem;
    opacity: 0.5;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    min-width: 160px;
    box-shadow: var(--shadow-lg);
    display: none;
    flex-direction: column;
    padding: 8px 0;
    z-index: 1001;
    animation: dropdownSlide 0.3s ease;
}

.dropdown-menu.active {
    display: flex;
}

.dropdown-item {
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dropdown-item:hover {
    background: var(--primary-soft);
    color: var(--primary);
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-box {
    flex: 1;
    min-width: 250px;
    display: flex;
    align-items: center;
    background: var(--background);
    border-radius: 40px;
    padding: 5px 15px;
    border: 1px solid var(--border);
    position: relative;
}

.search-box input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 10px 0;
    outline: none;
    color: var(--text);
}

.search-box button {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
}

/* Sugestões de Busca (Dropdown) */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-top: 8px;
    box-shadow: var(--shadow);
    max-height: 250px;
    overflow-y: auto;
    z-index: 200;
    display: none;
}

.search-suggestions.active {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

.search-suggestion-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    transition: background 0.2s;
}

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

.search-suggestion-item:hover {
    background: var(--primary-soft);
    color: var(--primary);
}

.search-suggestion-item span {
    color: var(--text-light);
    font-size: 0.9em;
}

/* ===== FILTROS INTEGRADOS (ESTILO CARD - Imagem 3) ===== */
.filters-integrated {
    background: var(--card-bg);
    padding: 12px 20px;
    border-radius: 16px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    position: -webkit-sticky;
    position: sticky;
    top: var(--sticky-filter-top);
    z-index: 1050;
    /* Belows mobile menu overlay to remain accessible */
    isolation: isolate;
}

.filters-integrated::before {
    content: "";
    position: absolute;
    left: -24px;
    right: -24px;
    top: calc(-1 * var(--filter-carpet-height));
    bottom: 0;
    background: var(--background);
    z-index: -1;
    pointer-events: none;
}

@media (max-width: 1000px) {
    .filters-integrated {
        top: var(--sticky-filter-top);
        padding: 10px 12px;
        min-height: 56px;
        flex-direction: row;
        align-items: center;
        width: 100%;
        box-sizing: border-box;
    }

    .filters-integrated::before {
        top: calc(-1 * var(--filter-carpet-height));
    }

}

.categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.category-tag {
    background: var(--background);
    /* Invertido para destacar do card */
    padding: 7px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-tag:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-soft);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.category-tag.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 8px 15px -4px rgba(99, 102, 241, 0.4);
}

/* ===== POSTS GRID ===== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin: 30px 0;
}

@media (max-width: 1000px) {
    .nav .container {
        padding: 0 20px;
    }

    .nav-content {
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 10px;
    }

    .nav-brand {
        order: 1;
    }

    .nav-mobile-controls {
        display: flex;
        order: 2;
        align-items: center;
        gap: 10px;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-search {
        order: 3;
        width: 100%;
        max-width: none;
        margin: 6px 0 0 0;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--nav-bg);
        flex-direction: column;
        padding: 10px 14px 14px 14px;
        gap: 0;
        border-bottom: 2px solid var(--primary);
        box-shadow: var(--shadow-lg);
        z-index: 999;
        order: 4;
    }

    .nav-menu.active {
        display: flex;
        animation: fadeIn 0.3s ease;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        width: 100%;
        background: var(--background);
        border: 1px solid var(--border);
        border-radius: 12px;
        overflow: hidden;
        margin-bottom: 10px;
        box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
    }

    .nav-item {
        width: 100%;
        text-align: left;
        padding: 11px 14px;
        border-bottom: 1px solid var(--border);
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 0.95rem;
    }

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

    .nav-actions {
        display: flex;
        flex-direction: column;
        gap: 0;
        padding: 12px;
        background: var(--background);
        border: 1px solid var(--border);
        border-radius: 12px;
        width: 100%;
        align-items: stretch;
        margin: 0;
        box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
    }

    #user-area {
        width: 100%;
        display: flex;
        flex-direction: column;
    }

    .user-dropdown {
        width: 100%;
        flex-direction: column;
    }

    .user-profile-trigger {
        width: 100%;
        justify-content: flex-start;
        padding: 10px 12px;
        font-size: 0.95rem;
        background: var(--card-bg);
    }

    .user-profile-trigger .chevron {
        margin-left: auto;
    }

    .dropdown-menu {
        position: relative;
        top: 0;
        right: auto;
        flex-direction: column;
        width: 100%;
        box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.03);
        border: 1px solid var(--border);
        background: var(--card-bg);
        margin-top: 8px;
        border-radius: 12px;
        padding: 6px;
    }

    .dropdown-item {
        border-radius: 8px;
        margin-bottom: 3px;
        padding: 9px 12px;
        font-size: 0.92rem;
    }

    .dropdown-item:last-child {
        margin-bottom: 0;
    }

    .nav-actions #login-btn {
        width: 100%;
        justify-content: center;
        padding: 10px 12px;
        font-size: 0.95rem;
    }
}

.card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: relative;
}

.card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-soft);
}

.card-image-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    background: #ffffff;
    /* fundo branco para limpar bordas indesejadas */
    border-bottom: 1px solid var(--border);
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Mantém a imagem inteira visível dentro do quadrado, ideal como tem fundos brancos */
    padding: 10px;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.card:hover .card-image {
    transform: scale(1.08);
}

.card-content {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

/* Badge de categoria sobreposto na imagem */
.card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary);
    color: white;
    font-size: 0.6rem;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.04em;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
    pointer-events: none;
}

.card-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.35;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.45rem;
    cursor: pointer;
    color: var(--text);
    transition: color 0.2s;
}

.card-title:hover {
    color: var(--primary);
}

.card-title a {
    color: inherit;
    text-decoration: none;
}

/* Bloco de preços */
.card-price-block {
    display: flex;
    flex-direction: column;
    gap: 1px;
    margin: 2px 0;
}

.card-price-old {
    font-size: 0.72rem;
    color: #e53935;
    text-decoration: line-through;
    opacity: 0.85;
}

.card-price-new {
    font-size: 1.35rem;
    font-weight: 800;
    color: #1b7f3a;
    line-height: 1.15;
}

/* Rodapé: data + botão like */
.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.card-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.card-btn-primary {
    flex: 1;
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.card-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.card-btn-share {
    background: var(--primary-soft);
    color: var(--primary);
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.card-btn-share:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.card-date {
    font-size: 0.7rem;
    color: var(--text-light);
    white-space: nowrap;
}

.like-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    color: var(--text-light);
    transition: color 0.2s;
    white-space: nowrap;
}

.like-btn:hover {
    color: #e53935;
}

.like-btn.liked {
    color: #c62828;
    font-weight: 600;
}

.like-count {
    font-weight: 700;
}

/* ===== MOBILE REFINEMENTS ===== */
@media (max-width: 600px) {
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .card {
        flex-direction: row;
        height: 170px;
        /* Increased height to fit action buttons */
        transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    }

    .card:hover {
        transform: translateY(-3px) scale(1.005);
        box-shadow: 0 10px 22px -10px rgba(0, 0, 0, 0.35);
    }

    .card:active {
        transform: scale(0.992);
    }

    .card-image-wrap {
        width: 120px;
        height: 100%;
        flex-shrink: 0;
        border-bottom: none;
        border-right: 1px solid var(--border);
        background: transparent;
    }

    .card-image {
        padding: 0;
        object-fit: cover;
    }

    .card-content {
        padding: 10px;
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        min-width: 0;
        /* Prevents overflow */
    }

    .card-title {
        height: auto;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        font-size: 0.85rem;
        margin-bottom: 4px;
    }

    .card-price-block {
        margin: 0;
    }

    .card-price-new {
        font-size: 1.15rem;
    }

    .card-footer {
        padding-top: 5px;
        margin-top: 0;
    }

    .qr-card {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .top-bar {
        display: block;
    }

    .nav {
        padding: 8px 0;
    }

    .brand-box {
        padding: 8px 16px;
        font-size: 0.95rem;
    }
}

/* Ações: botão principal + compartilhar */
.card-actions {
    display: flex;
    gap: 8px;
    margin-top: 6px;
    align-items: center;
}

.card-btn-primary {
    flex: 1;
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 9px 0;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    box-shadow: 0 4px 12px -2px rgba(99, 102, 241, 0.35);
}

.card-btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px -2px rgba(99, 102, 241, 0.45);
}

.card-btn-share {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-light);
}

.card-btn-share:hover {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.card-btn-share svg {
    transition: transform 0.2s ease;
}

.card-btn-share:hover svg {
    transform: scale(1.1);
}


/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 12000;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 20px;
    max-width: 800px;
    width: 100%;
    max-height: 85vh;
    padding: 0;
    position: relative;
    color: var(--text);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
}

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

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    border-radius: 20px 20px 0 0;
    flex-shrink: 0;
}

.modal-header-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close {
    background: var(--background);
    border: 1px solid var(--border);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: rotate(90deg);
}

#modalBody {
    overflow-y: auto;
    overflow-x: hidden;
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

#modalBody::-webkit-scrollbar {
    width: 8px;
}

#modalBody::-webkit-scrollbar-track {
    background: transparent;
}

#modalBody::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

#modalBody::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

/* O conteúdo do post será inserido exatamente como vem do Blogger */
.post-content {
    margin: 0;
    background: var(--background);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin-bottom: 15px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

#modalBody .post-content img.modal-image-disabled {
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

#modalBody .post-content a.modal-image-link-disabled {
    pointer-events: none;
    cursor: default;
}

#modalOverlay .post-content {
    overflow-wrap: anywhere;
    word-break: break-word;
}

#modalOverlay .post-content iframe,
#modalOverlay .post-content video,
#modalOverlay .post-content embed,
#modalOverlay .post-content object {
    width: 100%;
    max-width: 100%;
    height: auto;
    border: 0;
    display: block;
    margin: 0 auto 15px auto;
}

#modalOverlay .post-content iframe {
    aspect-ratio: 16 / 9;
    min-height: 220px;
}

#modalOverlay .post-content table {
    width: 100%;
    max-width: 100%;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

#modalOverlay .post-content pre,
#modalOverlay .post-content code {
    white-space: pre-wrap;
    word-break: break-word;
}

@media (max-width: 768px) {
    #modalOverlay {
        align-items: flex-end;
        padding: 8px;
    }

    #modalOverlay .modal-content {
        width: 100%;
        max-width: 100%;
        max-height: 92vh;
        border-radius: 16px;
    }

    #modalOverlay .modal-header {
        padding: 14px 16px;
        border-radius: 16px 16px 0 0;
    }

    #modalOverlay .modal-header-title {
        font-size: 1rem;
        line-height: 1.3;
    }

    #modalOverlay #modalBody {
        padding: 14px;
        gap: 16px;
    }

    #modalOverlay .post-content {
        padding: 14px;
        border-radius: 10px;
    }

    #modalOverlay .post-content iframe {
        min-height: 180px;
    }

    #modalOverlay .modal-close {
        width: 32px;
        height: 32px;
        font-size: 1.25rem;
    }

    #modalOverlay .post-content .shopee-link,
    #modalOverlay .post-content .btn,
    #modalOverlay .post-content button {
        padding: 8px 12px;
        font-size: 0.9rem;
        border-radius: 8px;
        min-height: 38px;
        line-height: 1.2;
    }

    #modalOverlay .post-content .promo-table-shopee td,
    #modalOverlay .post-content .promo-table-shopee th {
        padding: 10px 12px;
        font-size: 0.86rem;
    }
}

/* Estilos para o HTML da postagem do Blogger (Classes dinâmicas) */
.promo-box {
    width: 100%;
    margin: 0 auto;
}

.promo-table-shopee {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 15px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.promo-table-shopee th {
    background: var(--primary-gradient);
    color: white;
    padding: 16px;
    font-size: 1.1rem;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.promo-table-shopee td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-size: 0.95rem;
    background-color: var(--card-bg);
}

.promo-table-shopee tr:last-child td {
    border-bottom: none;
}

.promo-label {
    font-weight: 700;
    color: var(--text-light);
    width: 35%;
    background-color: rgba(0, 0, 0, 0.02);
}

.old-price,
.price-old {
    text-decoration: line-through;
    color: #ef4444;
    margin-right: 8px;
    font-size: 0.95rem;
}

.new-price,
.price-new {
    color: #10b981;
    font-weight: 800;
    font-size: 1.3rem;
}

.shopee-link {
    display: inline-block;
    background-color: var(--primary-soft);
    color: var(--primary) !important;
    font-weight: 800;
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 8px;
    transition: all 0.2s;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.shopee-link:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.alert-text {
    font-size: 0.9rem;
    color: #f59e0b;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Comments Section Modernization */
.modal-comments {
    border-top: 1px dashed var(--border);
    padding-top: 25px;
}

.modal-comments h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    font-weight: 700;
}

/* ===== RODAPÉ FLUTUANTE (GAVETA) ===== */
.footer-floating-btn {
    position: fixed;
    bottom: 25px;
    left: 25px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-floating-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.5);
    filter: brightness(1.1);
}

@media (max-width: 768px) {
    .footer-floating-btn {
        left: -6px;
        right: auto;
        bottom: 25px;
        width: 34px;
        height: 66px;
        padding: 0;
        border-radius: 0 10px 10px 0;
        background: rgba(99, 102, 241, 0.86);
        border: 1px solid rgba(255, 255, 255, 0.2);
        justify-content: center;
        gap: 0;
        font-size: 0;
        box-shadow: 0 4px 12px rgba(30, 41, 59, 0.28);
    }

    .footer-floating-btn span {
        font-size: 1rem;
        line-height: 1;
    }

    .footer-floating-btn:hover {
        transform: translateX(-2px);
    }
}

.footer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1002;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

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

.footer-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    border-radius: 24px 24px 0 0;
    z-index: 1003;
    padding: 40px 20px;
    text-align: center;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
}

.footer-drawer.active {
    transform: translateY(0);
}

.drawer-handle {
    width: 40px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: -20px auto 25px;
}

.comment {
    background: var(--card-bg);
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 15px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.comment strong {
    color: var(--primary);
    display: block;
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.comment-form {
    margin-top: 25px;
    background: var(--background);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.comment-form h4 {
    margin-bottom: 12px;
    font-size: 1.05rem;
    font-weight: 600;
}

.comment-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card-bg);
    color: var(--text);
    resize: vertical;
    min-height: 100px;
    margin-bottom: 15px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.1);
}

.comment-form .btn {
    width: 100%;
    justify-content: center;
}

/* ===== WHATSAPP FLOAT ===== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--whatsapp);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.3);
    cursor: pointer;
    transition: 0.2s;
    z-index: 99;
    text-decoration: none;
}


@media (max-width: 768px) {
    .whatsapp-float {
        display: flex;
        width: 54px;
        height: 54px;
        font-size: 1.8rem;
        right: 16px;
        bottom: 16px;
    }
}

/* ===== LOADING SKELETON ===== */
.skeleton-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.skeleton-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--border);
    animation: pulse 1.5s infinite ease-in-out;
}

.skeleton-content {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.skeleton-line {
    height: 14px;
    background: var(--border);
    border-radius: 4px;
    animation: pulse 1.5s infinite ease-in-out;
}

.skeleton-line.tag {
    width: 30%;
    height: 18px;
    border-radius: 10px;
}

.skeleton-line.title-1 {
    width: 90%;
}

.skeleton-line.title-2 {
    width: 70%;
}

.skeleton-line.price {
    width: 50%;
    height: 24px;
    margin-top: 5px;
}

.skeleton-line.btn {
    width: 100%;
    height: 32px;
    border-radius: 8px;
    margin-top: 10px;
}

@keyframes pulse {
    0% {
        opacity: 0.6;
    }

    50% {
        opacity: 0.3;
    }

    100% {
        opacity: 0.6;
    }
}

/* ===== FOOTER ===== */
.footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    padding: 40px 0;
    margin-top: 50px;
    text-align: center;
}

/* ===== PÁGINA DEDICADA DA OFERTA ===== */
.offer-page {
    width: 100%;
    max-width: 900px;
    margin: 30px auto;
    padding: 0 16px 60px;
    box-sizing: border-box;
    overflow-x: hidden;
}

.offer-page-back {
    background: var(--primary-soft);
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 10px 22px;
    border-radius: 40px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 28px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.offer-page-back:hover {
    background: var(--primary);
    color: white;
    transform: translateX(-3px);
}

.offer-page-card {
    background: var(--card-bg);
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-width: 100%;
    box-sizing: border-box;
}

.offer-page-card--single {
    grid-template-columns: 1fr;
}

@media (max-width: 860px) {
    .offer-page-card {
        grid-template-columns: 1fr;
    }
}

.offer-page-image-wrap {
    background: #fff;
    border-right: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    min-height: 320px;
}

.offer-page-image {
    max-width: 100%;
    max-height: 360px;
    object-fit: contain;
    border-radius: 12px;
}

.offer-page-body {
    padding: 36px 40px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.offer-page-tag {
    background: var(--primary);
    color: white;
    font-size: 0.65rem;
    padding: 3px 12px;
    border-radius: 20px;
    align-self: flex-start;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.offer-page-title {
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1.3;
    color: var(--text);
    margin: 0;
}

.offer-page-prices {
    display: flex;
    align-items: baseline;
    gap: 14px;
    flex-wrap: wrap;
}

.offer-page-old-price {
    font-size: 1rem;
    color: #d11;
    text-decoration: line-through;
    opacity: 0.8;
}

.dark-mode .card-price-old,
.dark-mode .old-price,
.dark-mode .price-old,
.dark-mode .offer-page-old-price {
    color: #ff8a8a;
    opacity: 1;
}

.offer-page-new-price {
    font-size: 2.4rem;
    font-weight: 800;
    color: #1b7f3a;
    line-height: 1;
}

.offer-page-content {
    border-top: 1px solid var(--border);
    padding-top: 20px;
    margin-top: 4px;
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.7;
}

.offer-page-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.offer-page-btn-primary {
    background: var(--primary-gradient);
    color: white;
    text-decoration: none;
    padding: 13px 28px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 20px -6px rgba(99, 102, 241, 0.4);
}

.offer-page-btn-primary:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
    box-shadow: 0 12px 24px -6px rgba(99, 102, 241, 0.5);
}

.offer-page-btn-copy {
    background: var(--background);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 13px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.offer-page-btn-copy:hover {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary);
}

.offer-page-meta {
    font-size: 0.82rem;
    color: var(--text-light);
    margin-top: auto;
}

/* ===== LAYOUT COM SIDEBAR ===== */
.layout-container {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 30px;
    margin-top: 12px;
    align-items: flex-start;
    /* Essencial para o sticky funcionar */
}

@media (max-width: 1024px) {
    .layout-container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
        /* Esconder sidebar em telas pequenas ou mover para baixo */
    }
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: var(--sticky-filter-top);
    z-index: 100;
}

/* ===== QR CODE CARD (Refinado) ===== */
.qr-card {
    background: var(--card-bg);
    /* Adaptável ao modo dark/light */
    border-radius: 20px;
    padding: 24px;
    color: var(--text);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.qr-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text);
}

.qr-card h3 span {
    color: var(--primary);
    font-weight: 600;
}

.qr-card .subtitle {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 20px;
    line-height: 1.4;
}

.qr-card .step {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.qr-card .step-number {
    background: var(--primary-soft);
    color: var(--primary);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    font-size: 0.85rem;
}

.qr-card .step-text {
    font-size: 0.9rem;
    font-weight: 600;
}

.qr-card .qr-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.qr-card .steps {
    flex: 1;
}

.qr-card .qr-code-wrapper {
    background: white;
    padding: 6px;
    border-radius: 12px;
    width: 100px;
    height: 100px;
    border: 1px solid var(--border);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.qr-card .qr-code-wrapper img {
    max-width: 100%;
    height: auto;
    display: block;
}

.qr-card .promo-btn {
    background: var(--primary-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    margin-top: 15px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.qr-card .promo-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

/* ===== TOAST DE FEEDBACK ===== */
#toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: #1e293b;
    color: #f8fafc;
    padding: 13px 26px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
    pointer-events: none;
    white-space: nowrap;
}

#toast.active {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===== REFINO VISUAL: SITE DE OFERTAS (SEM ALTERAR ESTRUTURA/LÓGICA) ===== */
:root {
    --primary: #ff5a1f;
    --primary-gradient: linear-gradient(135deg, #ff7a00 0%, #ff3d00 100%);
    --primary-dark: #c83f07;
    --primary-soft: rgba(255, 90, 31, 0.13);
    --primary-hover: rgba(255, 90, 31, 0.22);
    --background: #fff7f3;
    --card-bg: #ffffff;
    --text: #2c1a14;
    --text-light: #7d665b;
    --border: #f1d6c7;
    --nav-bg: rgba(255, 248, 242, 0.92);
    --shadow-sm: 0 2px 8px rgba(102, 49, 23, 0.08);
    --shadow: 0 8px 24px rgba(102, 49, 23, 0.13);
    --shadow-lg: 0 16px 36px rgba(102, 49, 23, 0.18);
}

.dark-mode {
    --primary: #ff9957;
    --primary-gradient: linear-gradient(135deg, #ff9957 0%, #ff7043 100%);
    --primary-dark: #ff7a52;
    --primary-soft: rgba(255, 153, 87, 0.17);
    --primary-hover: rgba(255, 153, 87, 0.3);
    --background: #17110d;
    --card-bg: #271a14;
    --text: #fff0e7;
    --text-light: #d4b5a5;
    --border: #573a2c;
    --nav-bg: rgba(28, 20, 16, 0.94);
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.28);
    --shadow: 0 10px 26px rgba(0, 0, 0, 0.36);
    --shadow-lg: 0 18px 40px rgba(0, 0, 0, 0.5);
}

body {
    background-image:
        radial-gradient(at 0% 0%, rgba(255, 122, 0, 0.09) 0px, transparent 55%),
        radial-gradient(at 100% 0%, rgba(255, 61, 0, 0.08) 0px, transparent 50%);
}

.top-bar {
    background: linear-gradient(90deg, #9f1c11 0%, #ce3c1b 50%, #ff5a1f 100%);
    box-shadow: 0 2px 14px rgba(159, 28, 17, 0.24);
}

.top-bar a.whatsapp-btn {
    background: #1fbd5a;
}

.top-bar a.whatsapp-btn:hover {
    background: #16a34a;
}

.nav {
    border-bottom: 1px solid rgba(255, 90, 31, 0.38);
    box-shadow: 0 10px 26px -16px rgba(255, 90, 31, 0.45);
}

.brand-box {
    background: linear-gradient(135deg, #241711 0%, #392118 100%);
    border: 1px solid rgba(255, 153, 87, 0.25);
}

.btn-primary-small,
.qr-card .promo-btn,
.footer-floating-btn,
.offer-page-btn-primary {
    background: var(--primary-gradient);
    box-shadow: 0 10px 22px -10px rgba(255, 90, 31, 0.6);
}

.btn-primary-small:hover,
.qr-card .promo-btn:hover,
.footer-floating-btn:hover,
.offer-page-btn-primary:hover {
    box-shadow: 0 14px 28px -10px rgba(255, 90, 31, 0.7);
}

.search-box,
.filters-integrated,
.qr-card,
.post-content,
.modal-content {
    border-color: var(--border);
    box-shadow: var(--shadow-sm);
}

.category-tag.active {
    box-shadow: 0 9px 18px -8px rgba(255, 90, 31, 0.62);
}

.posts-grid {
    gap: 18px;
}

.card {
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
    border-color: var(--border);
}

.card:hover {
    transform: translateY(-7px) scale(1.012);
    box-shadow: var(--shadow);
    border-color: rgba(255, 90, 31, 0.34);
}

.card-image-wrap {
    background: linear-gradient(180deg, #fff 0%, #fff6f2 100%);
}

.card-image-wrap::before,
.card-image-wrap::after {
    position: absolute;
    z-index: 2;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
}

.card-image-wrap::before {
    content: "🏷️";
    left: 10px;
    bottom: 10px;
    width: 26px;
    height: 26px;
    background: rgba(0, 0, 0, 0.52);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.card-image-wrap::after {
    content: "🔥";
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: rgba(255, 90, 31, 0.16);
    border: 1px solid rgba(255, 90, 31, 0.35);
}

.card-content {
    gap: 8px;
}

.card-title {
    font-weight: 700;
}

.card-price-block {
    gap: 3px;
    margin: 3px 0;
}

.card-price-old {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(229, 57, 53, 0.11);
    color: #b03630;
    text-decoration-color: rgba(176, 54, 48, 0.9);
    text-decoration-thickness: 1.8px;
    font-size: 0.72rem;
    font-weight: 700;
}

.card-price-old::before {
    content: "💰";
    font-size: 0.7rem;
}

.card-price-new {
    color: #ff3d00;
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.1;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}

.dark-mode .card-price-new,
.dark-mode .offer-page-new-price,
.dark-mode .new-price,
.dark-mode .price-new {
    color: #ffb18a;
    text-shadow: none;
}

.dark-mode .card-price-old,
.dark-mode .old-price,
.dark-mode .price-old,
.dark-mode .offer-page-old-price {
    background: rgba(229, 57, 53, 0.2);
    color: #ffb3ad;
}

.card-footer {
    border-top: 1px dashed var(--border);
    padding-top: 8px;
}

.offer-page-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 7px 16px;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: 0.2s;
    margin-left: auto;
}

.offer-page-share-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-soft);
}

/* Conteúdo legado na página individual */
.offer-page-legacy-content {
    font-size: 0.92rem;
    line-height: 1.7;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    overflow-x: hidden;
}

.offer-page-legacy-content p {
    max-width: 100%;
    overflow-x: hidden;
}

.offer-page-legacy-content img,
.offer-page-legacy-content iframe,
.offer-page-legacy-content video,
.offer-page-description img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
}

.offer-page-legacy-content table {
    width: 100% !important;
    max-width: 100% !important;
    display: block;
    overflow-x: auto;
}

/* Minimizar filtros no mobile */
.category-toggle {
    display: none;
    background: var(--primary-soft);
    color: var(--primary);
    padding: 7px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 700;
    border: 1.5px solid var(--primary);
    transition: all 0.2s;
    user-select: none;
}

.like-btn {
    padding: 5px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--background);
}

.card-actions {
    margin-top: 8px;
}

.card-btn-primary {
    background: var(--primary-gradient);
    border-radius: 12px;
    min-height: 40px;
    font-weight: 800;
    box-shadow: 0 10px 20px -10px rgba(255, 90, 31, 0.7);
}

.card-btn-primary:hover {
    box-shadow: 0 15px 24px -10px rgba(255, 90, 31, 0.75);
}

.card-btn-share {
    background: #fff6f2;
}

.dark-mode .card-btn-share {
    background: #2d1d17;
}

.modal-header-title {
    color: var(--primary);
}

.offer-page-tag {
    background: var(--primary-gradient);
}

.offer-page-new-price {
    color: #ff3d00;
}

.slider {
    background-color: rgba(255, 90, 31, 0.12);
    border-color: rgba(255, 90, 31, 0.25);
}

input:checked+.slider {
    background-color: var(--primary);
    border-color: var(--primary-dark);
}

@media (max-width: 600px) {
    .card-image-wrap::before {
        left: 8px;
        bottom: 8px;
        width: 22px;
        height: 22px;
        font-size: 0.7rem;
    }

    .card-image-wrap::after {
        top: 8px;
        right: 8px;
        width: 24px;
        height: 24px;
        font-size: 0.78rem;
    }

    .card-price-new {
        font-size: 1.2rem;
    }
}

/* ===== AJUSTES FINOS MOBILE (botões e modal mais compacto) ===== */
@media (max-width: 600px) {
    .card {
        height: auto;
        min-height: 170px;
    }

    .card-content {
        justify-content: flex-start;
        gap: 5px;
    }

    .card-footer {
        padding-top: 4px;
    }

    .card-actions {
        margin-top: auto;
        gap: 6px;
    }

    .card-btn-primary {
        min-height: 34px;
        padding: 7px 0;
        font-size: 0.82rem;
        line-height: 1.1;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .card-btn-share {
        width: 34px;
        height: 34px;
    }
}

@media (max-width: 768px) {
    #modalOverlay {
        align-items: center;
        padding: 2px 6px;
    }

    #modalOverlay .modal-content {
        width: 92vw;
        max-width: 92vw;
        max-height: calc(100vh - 4px);
        max-height: calc(100dvh - 4px);
        border-radius: 14px;
    }

    #modalOverlay .modal-header {
        padding: 10px 12px;
        border-radius: 14px 14px 0 0;
    }

    #modalOverlay .modal-header-title {
        font-size: 0.95rem;
        line-height: 1.25;
    }

    #modalOverlay #modalBody {
        padding: 10px;
        gap: 12px;
    }

    #modalOverlay .post-content {
        padding: 10px;
        border-radius: 8px;
    }

    #modalOverlay .post-content img {
        margin-bottom: 10px;
        border-radius: 8px;
    }

    #modalOverlay .modal-close {
        width: 30px;
        height: 30px;
        font-size: 1.1rem;
    }

    #modalOverlay .post-content .shopee-link,
    #modalOverlay .post-content .btn,
    #modalOverlay .post-content button,
    #modalOverlay .post-content .promo-table-shopee a {
        padding: 6px 10px;
        font-size: 0.82rem;
        border-radius: 7px;
        min-height: 34px;
        line-height: 1.1;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        width: 100%;
    }

    #modalOverlay .post-content .promo-table-shopee td,
    #modalOverlay .post-content .promo-table-shopee th {
        padding: 8px 10px;
        font-size: 0.8rem;
    }
}

/* ===== MODAL DESKTOP HORIZONTAL ===== */
@media (min-width: 992px) {
    #modalOverlay .modal-content {
        max-width: 1100px;
        width: min(95vw, 1100px);
        max-height: 84vh;
        height: auto;
    }

    #modalOverlay #modalBody {
        padding: 14px 16px;
        gap: 12px;
    }

    #modalOverlay .post-content {
        display: grid;
        grid-template-columns: minmax(280px, 380px) minmax(460px, 560px);
        gap: 14px 18px;
        align-items: stretch;
        justify-content: center;
        width: 100%;
        margin: 0;
    }

    #modalOverlay .post-content>* {
        grid-column: 2;
        min-width: 0;
        align-self: start;
    }

    /* Quando o HTML vier encapsulado em .promo-box, ele ocupa toda a largura do grid pai */
    #modalOverlay .post-content>.promo-box:first-child {
        grid-column: 1 / -1;
        grid-row: auto;
        position: static;
        display: grid;
        grid-template-columns: minmax(280px, 380px) minmax(460px, 560px);
        gap: 14px 18px;
        align-items: stretch;
        justify-content: center;
        width: 100%;
        margin: 0;
    }

    #modalOverlay .post-content>.promo-box:first-child>* {
        grid-column: 2;
        min-width: 0;
        align-self: start;
    }

    #modalOverlay .post-content>.promo-box:first-child>br {
        display: none;
    }

    #modalOverlay .post-content>.promo-box:first-child> :first-child {
        grid-column: 1;
        grid-row: auto;
        position: static;
        margin: 0 !important;
        padding: 0 !important;
    }

    #modalOverlay .post-content>.promo-box:first-child>img:first-child,
    #modalOverlay .post-content>.promo-box:first-child> :first-child img {
        width: 100%;
        max-width: 100%;
        height: auto;
        object-fit: contain;
        margin: 0;
    }

    #modalOverlay .post-content>.promo-box:first-child .promo-table-shopee {
        grid-column: 2;
        grid-row: 1;
        height: auto;
        margin-top: 14px !important;
        align-self: start;
    }

    #modalOverlay .post-content> :first-child {
        grid-column: 1;
        grid-row: auto;
        position: static;
        margin: 0 !important;
        padding: 0 !important;
    }

    #modalOverlay .post-content>.promo-table-shopee {
        grid-column: 2;
        grid-row: 1;
        margin-top: 14px !important;
        align-self: start;
    }

    #modalOverlay .post-content>img:first-child,
    #modalOverlay .post-content> :first-child img {
        width: 100%;
        max-width: 100%;
        height: auto;
        object-fit: contain;
        margin: 0;
    }
}

/* =====================================================
   NOVO FORMATO DE POSTS — BADGES, MODAL, PÁGINA
   ===================================================== */

/* ---- Cards: badges de desconto e cupom ---- */
.card-image-wrap {
    position: relative;
}

.badge-discount {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ef4444;
    color: white;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 8px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    z-index: 2;
}

.badge-coupon {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: #16a34a;
    color: white;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 8px;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.4);
    z-index: 2;
}

.card-coupon-hint {
    font-size: 0.8rem;
    color: #16a34a;
    font-weight: 600;
    padding: 4px 0 2px;
}

.dark-mode .card-coupon-hint {
    color: #4ade80;
}

/* ---- Preços legíveis ---- */
.price-de {
    color: var(--text-light);
    font-size: 0.85rem;
    text-decoration: line-through;
}

.price-por {
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 800;
}

/* =====================================================
   MODAL ESTRUTURADO (NOVO FORMATO)
   ===================================================== */

.modal-offer-wrap {
    display: flex;
    flex-direction: column;
    gap: 0;
}

@media (min-width: 768px) {
    .modal-offer-wrap {
        flex-direction: row;
        gap: 0;
        align-items: stretch;
    }
}

.modal-offer-img-wrap {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background);
    border-radius: 0;
    overflow: hidden;
    min-height: 200px;
}

@media (min-width: 768px) {
    .modal-offer-img-wrap {
        width: 340px;
        max-height: 500px;
        border-radius: 0;
    }
}

.modal-offer-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-height: 340px;
    display: block;
}

.modal-offer-body {
    flex: 1;
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
}

.modal-offer-tag {
    display: inline-block;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-offer-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text);
    margin: 0;
}

\n

/* Preços no modal */
.modal-price-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.modal-price-de {
    color: var(--text-light);
    font-size: 0.9rem;
}

.modal-price-por {
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.1;
}

/* Caixa de cupom */
.modal-coupon-box {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 2px dashed #16a34a;
    border-radius: 14px;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dark-mode .modal-coupon-box {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.1), rgba(22, 163, 74, 0.05));
    border-color: #22c55e;
}

.modal-coupon-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #15803d;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dark-mode .modal-coupon-label {
    color: #4ade80;
}

.modal-coupon-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-coupon-code {
    flex: 1;
    background: white;
    border: 1.5px solid #16a34a;
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #15803d;
    text-align: center;
    font-family: monospace;
}

.dark-mode .modal-coupon-code {
    background: #1e293b;
    color: #4ade80;
    border-color: #22c55e;
}

.modal-coupon-copy {
    background: #16a34a;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 8px 18px;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.modal-coupon-copy:hover {
    background: #15803d;
    transform: scale(1.04);
}

/* Descrição */
.modal-description {
    font-size: 0.93rem;
    color: var(--text-light);
    line-height: 1.7;
    background: var(--background);
    border-radius: 10px;
    padding: 12px 16px;
    white-space: pre-wrap;
}

/* Botões de ação do modal */
.modal-offer-btns {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
}

.modal-btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--primary-gradient);
    color: white;
    text-decoration: none;
    padding: 14px 24px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: 0.5px;
    box-shadow: 0 6px 20px -4px rgba(99, 102, 241, 0.45);
    transition: all 0.25s;
    border: none;
    cursor: pointer;
}

.modal-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -6px rgba(99, 102, 241, 0.55);
    filter: brightness(1.08);
}

.modal-btn-rescue {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #f0fdf4;
    color: #15803d;
    text-decoration: none;
    padding: 13px 24px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.95rem;
    border: 2px solid #16a34a;
    transition: all 0.25s;
    cursor: pointer;
}

.modal-btn-rescue:hover {
    background: #16a34a;
    color: white;
    transform: translateY(-2px);
}

.dark-mode .modal-btn-rescue {
    background: rgba(22, 163, 74, 0.1);
    color: #4ade80;
}

.dark-mode .modal-btn-rescue:hover {
    background: #16a34a;
    color: white;
}

/* Rodapé do modal */
.modal-offer-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 0.82rem;
    color: var(--text-light);
    padding-top: 8px;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.modal-btn-share {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 5px 12px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: 0.2s;
    margin-left: auto;
}

.modal-btn-share:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Conteúdo legado no modal */
.modal-legacy-content {
    font-size: 0.9rem;
    color: var(--text);
    line-height: 1.7;
}

/* =====================================================
   PÁGINA INDIVIDUAL DA OFERTA — NOVO LAYOUT
   ===================================================== */

.offer-page {
    max-width: 900px;
    margin: 30px auto;
    padding: 0 16px 60px;
}

.offer-page-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    color: var(--text);
    transition: all 0.2s;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.offer-page-back:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-soft);
}

.offer-page-card {
    background: var(--card-bg);
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

@media (min-width: 700px) {
    .offer-page-card {
        flex-direction: row;
        align-items: stretch;
    }
}

.offer-page-img-wrap {
    background: var(--background);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
}

@media (min-width: 700px) {
    .offer-page-img-wrap {
        width: 340px;
        flex-shrink: 0;
        max-height: 600px;
    }
}

.offer-page-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-height: 380px;
    display: block;
}

.offer-page-body-wrap {
    flex: 1;
    padding: 28px 30px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    /* Ensure text breaks inside body wrap */
}

@media (max-width: 700px) {
    .offer-page-body-wrap {
        padding: 20px 18px;
    }
}

.offer-page-tag {
    display: inline-block;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.offer-page-title {
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1.35;
    color: var(--text);
    margin: 0;
}

@media (max-width: 700px) {
    .offer-page-title {
        font-size: 1.15rem;
    }
}

/* Bloco de preços */
.offer-page-price-block {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.offer-page-old-price {
    font-size: 0.95rem;
    color: var(--text-light);
}

.offer-page-new-price {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 12px;
    line-height: 1.1;
}

@media (max-width: 700px) {
    .offer-page-new-price {
        font-size: 1.7rem;
    }
}

/* Cupom */
.offer-page-coupon-box {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 2px dashed #16a34a;
    border-radius: 14px;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dark-mode .offer-page-coupon-box {
    background: rgba(22, 163, 74, 0.08);
    border-color: #22c55e;
}

.offer-page-coupon-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #15803d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dark-mode .offer-page-coupon-label {
    color: #4ade80;
}

.offer-page-coupon-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.offer-page-coupon-code {
    flex: 1;
    background: white;
    border: 1.5px solid #16a34a;
    border-radius: 10px;
    padding: 9px 16px;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: #15803d;
    text-align: center;
    font-family: monospace;
}

.dark-mode .offer-page-coupon-code {
    background: #1e293b;
    color: #4ade80;
    border-color: #22c55e;
}

.offer-page-coupon-copy {
    background: #16a34a;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 9px 18px;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.offer-page-coupon-copy:hover {
    background: #15803d;
    transform: scale(1.04);
}

/* Descrição */
.offer-page-description {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.75;
    background: var(--background);
    border-radius: 10px;
    padding: 14px 18px;
}

/* Botões */
.offer-page-btns {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 4px;
}

.offer-page-btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--primary-gradient);
    color: white;
    text-decoration: none;
    padding: 16px 28px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: 0.5px;
    box-shadow: 0 8px 24px -6px rgba(99, 102, 241, 0.5);
    transition: all 0.25s;
    cursor: pointer;
    border: none;
}

.offer-page-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px -6px rgba(99, 102, 241, 0.6);
    filter: brightness(1.08);
}

.offer-page-btn-rescue {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #f0fdf4;
    color: #15803d;
    text-decoration: none;
    padding: 14px 28px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.98rem;
    border: 2px solid #16a34a;
    transition: all 0.25s;
    cursor: pointer;
}

.offer-page-btn-rescue:hover {
    background: #16a34a;
    color: white;
    transform: translateY(-2px);
}

.dark-mode .offer-page-btn-rescue {
    background: rgba(22, 163, 74, 0.1);
    color: #4ade80;
}

.dark-mode .offer-page-btn-rescue:hover {
    background: #16a34a;
    color: white;
}

/* Meta e compartilhar */
.offer-page-meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.84rem;
    color: var(--text-light);
    padding-top: 12px;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.offer-page-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 7px 16px;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-light);
    display: none;
    background: var(--primary-soft);
    color: var(--primary);
    padding: 7px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 700;
    border: 1.5px solid var(--primary);
    transition: all 0.2s;
    user-select: none;
}

@media (max-width: 600px) {
    .filters-integrated {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .categories {
        width: 100%;
    }

    .category-toggle {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        margin-top: 5px;
        width: 100%;
        justify-content: center;
    }

    .categories-list.collapsed {
        max-height: 48px;
        overflow: hidden;
    }

    .categories:not(.collapsed) {
        max-height: 500px;
        transition: max-height 0.3s ease-in;
    }

    .categories-list.collapsed .category-tag {
        display: none;
    }

    .categories-list.collapsed .category-tag:nth-child(-n+4) {
        display: inline-flex;
    }
}

.categories-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}


/* ==========================================================================
   MOBILE APP-LIKE EXPERIENCE — Native Smartphone Feel
   Only applies to screens ≤ 768px
   ========================================================================== */

/* ---- GLOBAL MOBILE TOUCH OPTIMIZATIONS ---- */
@media (max-width: 768px) {
    * {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
    }

    html {
        scroll-behavior: smooth;
        overscroll-behavior-y: contain;
        overflow-x: hidden;
    }

    body {
        padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px));
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
        overflow-x: hidden;
        max-width: 100vw;
    }
}

/* ---- BOTTOM NAVIGATION BAR ---- */
.bottom-nav {
    display: none;
}

@media (max-width: 768px) {
    .bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 9000;
        display: flex;
        align-items: stretch;
        justify-content: space-around;
        height: calc(64px + env(safe-area-inset-bottom, 0px));
        padding-bottom: env(safe-area-inset-bottom, 0px);
        background: rgba(255, 248, 242, 0.88);
        backdrop-filter: saturate(180%) blur(20px);
        -webkit-backdrop-filter: saturate(180%) blur(20px);
        border-top: 1px solid rgba(255, 90, 31, 0.12);
        box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.08);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .dark-mode .bottom-nav {
        background: rgba(23, 17, 13, 0.92);
        border-top-color: rgba(255, 153, 87, 0.15);
        box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.25);
    }

    .bottom-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        padding: 6px 0 2px;
        cursor: pointer;
        color: var(--text-light);
        transition: color 0.2s ease, transform 0.15s ease;
        position: relative;
        -webkit-user-select: none;
        user-select: none;
    }

    .bottom-nav-item span {
        font-size: 0.65rem;
        font-weight: 600;
        letter-spacing: 0.02em;
        transition: color 0.2s ease;
    }

    .bottom-nav-item svg {
        transition: transform 0.2s ease, stroke 0.2s ease;
        stroke-width: 1.8;
    }

    .bottom-nav-item.active {
        color: var(--primary);
    }

    .bottom-nav-item.active svg {
        stroke: var(--primary);
        transform: scale(1.12);
        stroke-width: 2.2;
    }

    .bottom-nav-item.active span {
        color: var(--primary);
        font-weight: 700;
    }

    /* Active indicator dot */
    .bottom-nav-item.active::before {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 20px;
        height: 3px;
        background: var(--primary-gradient);
        border-radius: 0 0 4px 4px;
        animation: navIndicatorIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    @keyframes navIndicatorIn {
        from {
            width: 0;
            opacity: 0;
        }

        to {
            width: 20px;
            opacity: 1;
        }
    }

    /* Tap feedback */
    .bottom-nav-item:active {
        transform: scale(0.88);
    }

    .bottom-nav-item:active svg {
        transform: scale(0.9);
    }

    /* Ripple effect for bottom nav */
    .bottom-nav-item::after {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: 12px;
        background: radial-gradient(circle, var(--primary-soft) 0%, transparent 70%);
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
    }

    .bottom-nav-item:active::after {
        opacity: 1;
    }
}

/* ---- HIDE HAMBURGER + DESKTOP NAV ON MOBILE ---- */
@media (max-width: 768px) {

    .nav-toggle,
    .nav-menu,
    .nav-actions,
    .nav-links {
        display: none !important;
    }

    .nav-mobile-controls {
        display: flex !important;
        gap: 10px;
        align-items: center;
    }

    /* Only show theme switch in nav-mobile-controls */
    .nav-mobile-controls .nav-toggle {
        display: none !important;
    }

    /* Compact top nav */
    .nav {
        padding: 8px 0;
        border-bottom-width: 1px;
    }

    .nav-content {
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 8px;
    }

    .brand-box {
        padding: 7px 14px;
        font-size: 0.88rem;
        border-radius: 10px;
    }

    /* Search bar in nav — hidden on mobile, replaced by bottom nav search */
    .nav-search {
        display: none !important;
    }
}

/* ---- MOBILE SEARCH OVERLAY ---- */
.mobile-search-overlay {
    display: none;
}

@media (max-width: 768px) {
    .mobile-search-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 9500;
        background: var(--background);
        display: none;
        flex-direction: column;
        opacity: 0;
        transform: translateY(-20px);
        transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .mobile-search-overlay.active {
        display: flex;
        opacity: 1;
        transform: translateY(0);
    }

    .mobile-search-bar {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 12px 14px;
        padding-top: calc(12px + env(safe-area-inset-top, 0px));
        background: var(--card-bg);
        border-bottom: 1px solid var(--border);
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
        position: relative;
    }

    .mobile-search-back {
        background: none;
        border: none;
        padding: 8px;
        color: var(--text);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        transition: background 0.2s;
        flex-shrink: 0;
    }

    .mobile-search-back:active {
        background: var(--primary-soft);
    }

    .mobile-search-bar input {
        flex: 1;
        background: var(--background);
        border: 1.5px solid var(--border);
        border-radius: 12px;
        padding: 12px 16px;
        font-size: 1rem;
        color: var(--text);
        outline: none;
        font-family: inherit;
        transition: border-color 0.2s;
    }

    .mobile-search-bar input:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px var(--primary-soft);
    }

    .mobile-search-bar .search-suggestions {
        position: absolute;
        top: 100%;
        left: 14px;
        right: 14px;
        margin-top: 4px;
        border-radius: 14px;
        max-height: 60vh;
    }
}

/* ---- PULL TO REFRESH ---- */
.pull-to-refresh {
    display: none;
}

@media (max-width: 768px) {
    .pull-to-refresh {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 8000;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 16px;
        background: var(--primary-gradient);
        color: white;
        transform: translateY(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        pointer-events: none;
    }

    .pull-to-refresh.active {
        transform: translateY(0);
    }

    .pull-to-refresh.refreshing .pull-spinner {
        animation: spinRefresh 0.8s linear infinite;
    }

    .pull-spinner {
        width: 24px;
        height: 24px;
        border: 3px solid rgba(255, 255, 255, 0.3);
        border-top-color: white;
        border-radius: 50%;
    }

    .pull-text {
        font-size: 0.78rem;
        font-weight: 600;
        opacity: 0.9;
    }

    @keyframes spinRefresh {
        to {
            transform: rotate(360deg);
        }
    }
}

/* ---- CATEGORIES: HORIZONTAL SCROLL SNAP (Mobile) ---- */
@media (max-width: 768px) {
    .filters-integrated {
        padding: 0;
        margin-left: -14px;
        margin-right: -14px;
        width: auto;
        background: var(--background) !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
        position: relative !important;
        top: auto !important;
        z-index: 1050;
        flex-direction: column;
        gap: 0;
        padding-bottom: 6px;
        border-bottom: 1px solid var(--border) !important;
        min-height: auto !important;
        isolation: auto;
        overflow-x: hidden;
    }

    .filters-integrated::before {
        display: none !important;
        content: none !important;
    }

    #categoriesContainer {
        width: 100%;
        overflow: visible;
    }

    .categories-list {
        display: flex;
        flex-wrap: nowrap !important;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 8px;
        padding: 10px 14px;
        scrollbar-width: none;
        width: 100%;
        box-sizing: border-box;
    }

    .categories-list::-webkit-scrollbar {
        display: none;
    }

    .categories-list.collapsed {
        max-height: none;
        overflow-x: auto;
    }

    .categories-list.collapsed .category-tag {
        display: inline-flex !important;
    }

    .category-toggle {
        display: none !important;
    }

    .category-tag {
        scroll-snap-align: start;
        flex-shrink: 0;
        padding: 8px 16px;
        border-radius: 20px;
        font-size: 0.82rem;
        font-weight: 600;
        white-space: nowrap;
        border: 1.5px solid var(--border);
        transition: all 0.2s ease, transform 0.1s ease;
    }

    .category-tag:active {
        transform: scale(0.95) !important;
    }

    .category-tag.active {
        transform: none;
        box-shadow: 0 4px 14px -4px rgba(255, 90, 31, 0.5);
    }
}

/* ---- CARDS: APP-LIKE ANIMATIONS & TOUCH (Mobile) ---- */
@media (max-width: 768px) {
    .main-content {
        max-width: 100%;
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
        padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    }

    .posts-grid {
        gap: 10px;
        margin: 12px 0;
        padding: 0;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
        grid-template-columns: 1fr !important;
    }

    .card {
        animation: cardSlideIn 0.4s ease both;
        transform-origin: center center;
        border-radius: 16px;
        overflow: hidden;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }

    .card-content {
        min-width: 0;
        overflow: hidden;
    }

    .card-title {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .card:nth-child(1) {
        animation-delay: 0s;
    }

    .card:nth-child(2) {
        animation-delay: 0.04s;
    }

    .card:nth-child(3) {
        animation-delay: 0.08s;
    }

    .card:nth-child(4) {
        animation-delay: 0.12s;
    }

    .card:nth-child(5) {
        animation-delay: 0.16s;
    }

    .card:nth-child(6) {
        animation-delay: 0.2s;
    }

    .card:nth-child(7) {
        animation-delay: 0.24s;
    }

    .card:nth-child(8) {
        animation-delay: 0.28s;
    }

    @keyframes cardSlideIn {
        from {
            opacity: 0;
            transform: translateY(20px) scale(0.97);
        }

        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }

    /* Touch feedback for cards — faster, native feel */
    .card:hover {
        transform: none;
        box-shadow: var(--shadow-sm);
        border-color: var(--border);
    }

    .card:active {
        transform: scale(0.985) !important;
        transition: transform 0.1s ease !important;
    }

    /* Card image wrap - remove pseudo elements on mobile for cleaner look */
    .card-image-wrap::before,
    .card-image-wrap::after {
        display: none;
    }

    /* Discount & coupon badges - more compact on mobile */
    .badge-discount {
        top: 6px;
        left: 6px;
        font-size: 0.7rem;
        padding: 2px 7px;
        border-radius: 6px;
    }

    .badge-coupon {
        top: 6px;
        right: auto;
        left: 6px;
        bottom: auto;
        font-size: 0.66rem;
        padding: 2px 7px;
        border-radius: 6px;
        margin-top: 22px;
    }
}

/* ---- MODAL: FULLSCREEN APP-LIKE (Mobile) ---- */
@media (max-width: 768px) {
    #modalOverlay {
        padding: 0;
        align-items: stretch;
    }

    #modalOverlay .modal-content {
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        max-height: 100dvh;
        border-radius: 0;
        transform: translateY(100%);
        transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    }

    #modalOverlay.active .modal-content {
        transform: translateY(0);
    }

    #modalOverlay .modal-header {
        padding: 12px 14px;
        padding-top: calc(12px + env(safe-area-inset-top, 0px));
        border-radius: 0;
        position: sticky;
        top: 0;
        z-index: 10;
        background: var(--card-bg);
        border-bottom: 1px solid var(--border);
        min-height: 48px;
    }

    #modalOverlay .modal-header-title {
        font-size: 0.92rem;
        flex: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    #modalOverlay .modal-close {
        width: 34px;
        height: 34px;
        font-size: 1.1rem;
        background: var(--background);
        border: 1px solid var(--border);
        flex-shrink: 0;
    }

    #modalOverlay #modalBody {
        padding: 14px;
        gap: 14px;
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Modal drag handle indicator */
    #modalOverlay .modal-content::before {
        content: '';
        display: block;
        width: 36px;
        height: 4px;
        background: var(--border);
        border-radius: 2px;
        margin: 8px auto 0;
        opacity: 0.6;
    }

    /* Modal offer layout: stack on mobile */
    .modal-offer-wrap {
        flex-direction: column !important;
    }

    .modal-offer-img-wrap {
        width: 100% !important;
        max-height: 260px;
        border-radius: 12px;
        overflow: hidden;
    }

    .modal-offer-img-wrap img {
        max-height: 260px;
    }

    .modal-offer-body {
        padding: 16px 2px 0;
    }

    .modal-offer-title {
        font-size: 1.05rem;
    }

    .modal-price-por {
        font-size: 1.6rem;
    }

    .modal-coupon-box {
        border-radius: 12px;
        padding: 12px 14px;
    }

    .modal-coupon-row {
        flex-direction: column;
        gap: 8px;
    }

    .modal-coupon-copy {
        width: 100%;
        text-align: center;
        padding: 10px 14px;
    }

    .modal-btn-primary {
        padding: 14px 20px;
        border-radius: 12px;
        font-size: 0.95rem;
        min-height: 48px;
    }

    .modal-btn-rescue {
        padding: 13px 20px;
        border-radius: 12px;
        font-size: 0.9rem;
        min-height: 48px;
    }

    .modal-description {
        border-radius: 10px;
        padding: 12px 14px;
        font-size: 0.88rem;
    }

    .modal-offer-meta {
        gap: 8px;
        font-size: 0.78rem;
        padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    }

    /* Hide modal body legacy table grid on mobile */
    #modalOverlay .post-content {
        display: block !important;
        grid-template-columns: unset !important;
    }
}

/* ---- TOAST REPOSITIONED ABOVE BOTTOM NAV ---- */
@media (max-width: 768px) {
    #toast {
        bottom: calc(80px + env(safe-area-inset-bottom, 0px));
        font-size: 0.88rem;
        padding: 11px 20px;
        border-radius: 14px;
        max-width: 86vw;
        white-space: normal;
        text-align: center;
    }
}

/* ---- WHATSAPP FLOAT: ABOVE BOTTOM NAV ---- */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: calc(78px + env(safe-area-inset-bottom, 0px));
        right: 14px;
        width: 50px;
        height: 50px;
        font-size: 1.6rem;
        box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
    }

    .whatsapp-float:active {
        transform: scale(0.9);
    }
}

/* ---- FOOTER FLOATING BTN: ABOVE BOTTOM NAV ---- */
@media (max-width: 768px) {
    .footer-floating-btn {
        bottom: calc(78px + env(safe-area-inset-bottom, 0px));
    }
}

/* ---- TOP BAR: MORE COMPACT ON MOBILE ---- */
@media (max-width: 768px) {
    .top-bar {
        padding: 6px 0;
        font-size: 0.75rem;
    }

    .top-bar .container {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    .top-bar .container span:nth-child(2) {
        display: none;
    }

    .top-bar a.whatsapp-btn {
        width: auto;
        padding: 5px 14px;
        font-size: 0.75rem;
        min-height: auto;
    }
}

/* ---- CONTAINER MOBILE PADDING ---- */
@media (max-width: 768px) {

    html,
    body {
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: auto;
    }

    .container {
        padding: 0 14px;
    }

    main.container {
        padding-top: 4px;
    }

    .layout-container {
        margin-top: 4px;
        gap: 0;
    }
}

/* ---- LOGIN MODAL APP-LIKE ---- */
@media (max-width: 768px) {
    #loginPromptModal .modal-content {
        max-width: 92vw !important;
        border-radius: 20px !important;
    }
}

/* ---- SKELETON CARDS MOBILE ---- */
@media (max-width: 768px) {
    .skeleton-card {
        flex-direction: row;
        height: 160px;
        border-radius: 16px;
    }

    .skeleton-img {
        width: 120px;
        aspect-ratio: auto;
        height: 100%;
        flex-shrink: 0;
    }
}

/* ---- ANIMATIONS & KEYFRAMES ---- */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ---- SMOOTH PAGE TRANSITIONS ---- */
@media (max-width: 768px) {
    .offer-page {
        animation: mobilePageIn 0.35s cubic-bezier(0.32, 0.72, 0, 1);
        max-height: calc(100vh - 8px);
        max-height: calc(100dvh - 8px);
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
        padding-bottom: calc(140px + env(safe-area-inset-bottom, 0px)) !important;
    }

    @keyframes mobilePageIn {
        from {
            opacity: 0;
            transform: translateX(30px);
        }

        to {
            opacity: 1;
            transform: translateX(0);
        }
    }

    .offer-page-card {
        border-radius: 16px;
        overflow: hidden;
    }

    .offer-page-back {
        border-radius: 10px;
        padding: 10px 16px;
        font-size: 0.88rem;
    }
}

/* ---- MOBILE: HIDE SCROLLBARS GLOBALLY ---- */
@media (max-width: 768px) {
    ::-webkit-scrollbar {
        width: 0;
        height: 0;
        display: none;
    }

    * {
        scrollbar-width: none;
    }
}

/* ---- BOTTOM NAV SCROLL HIDE ON SCROLL DOWN ---- */
.bottom-nav.hidden {
    transform: translateY(100%);
}

/* ---- LOADING STATE SHIMMER ---- */
@media (max-width: 768px) {
    .loading {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 40px 20px;
        font-size: 0.95rem;
        color: var(--text-light);
        grid-column: 1 / -1;
    }
}