@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@900&display=swap');

/* ==========================================
   BUSCACERTA - DESIGN SYSTEM & THEME
   ========================================== */

/* Desativa transições durante a troca de tema (evita flash colorido das logos
   e o "piscar" do fundo ao passar para o dark). O próprio <html> entra na
   regra: sem ele o body continuaria interpolando a cor de fundo. */
html.theme-toggle,
html.theme-toggle *,
html.theme-toggle *::before,
html.theme-toggle *::after {
    transition: none !important;
}

/* Mantém canvas, scrollbar e controles nativos na mesma cor do tema escolhido. */
:root[data-theme="dark"] {
    color-scheme: dark;
}

:root[data-theme="light"] {
    color-scheme: light;
}

:root[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: rgba(30, 41, 59, 0.8);
    --bg-card-hover: #334155;
    --bg-input: #0f172a;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: #334155;
    --border-focus: #3b82f6;

    --accent-blue: #3b82f6;
    --accent-blue-light: #60a5fa;
    --accent-indigo: #6366f1;
    --accent-emerald: #16a34a;
    --accent-amber: #f59e0b;
    --accent-rose: #f43f5e;
    --bg-btn-secondary: #334155;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
}

:root[data-theme="light"] {
    --bg-primary: #f1f5f9;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-card-hover: #f8fafc;
    --bg-input: #f8fafc;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --border-focus: #2563eb;

    --accent-blue: #2563eb;
    --accent-blue-light: #3b82f6;
    --accent-indigo: #4f46e5;
    --accent-emerald: #16a34a;
    --accent-amber: #d97706;
    --accent-rose: #e11d48;
    --bg-btn-secondary: #cbd5e1;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 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);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

html {
    font-size: 16px;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-y: auto;
}

.app-container {
    max-width: 1600px;
    margin: 0.5rem auto 0;
    padding: 0 0.75rem 0.75rem;
    display: flex;
    flex-direction: column;
}

/* Top Header (unified) - full width */
.top-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(180deg,
            #2757da 0%,
            #1f4bcc 45%,
            #1a40b0 100%);
    padding: 0.6rem 0 0.4rem;
    margin: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    flex-shrink: 0;
    height: auto;
}

.top-header.scrolled .top-categories {
    display: none;
}

.top-header.scrolled {
    padding-top: 0.3rem;
    height: auto;
}

.top-header.scrolled .top-header-inner {
    margin-bottom: 0;
    height: auto;
    min-height: 50px;
    padding: 0.1rem 0.8rem 0.05rem 0.6rem;
}

.top-header.scrolled .brand-logo,
.top-header.scrolled .brand-logo a {
    height: 50px;
    margin-top: 0;
    margin-bottom: 0;
}

.top-header.scrolled .logo-img {
    height: 50px;
}

.top-header.scrolled .filter-form .form-control {
    padding: 0.35rem 0;
    font-size: 0.8rem;
}

.top-header.scrolled .filter-form-inputs {
    height: 38px;
    padding: 0 0 0 0.6rem;
}

.top-header.scrolled #btnSearch {
    width: 38px;
    height: 38px;
    min-width: 38px;
    font-size: 0.95rem;
    margin-left: 0.2rem;
}

.top-header.scrolled .header-actions {
    gap: 0.35rem;
}

.top-header.scrolled .btn-fav-header,
.top-header.scrolled .btn-cupons-header,
.top-header.scrolled .btn-install-header,
.top-header.scrolled .btn-share-header {
    width: 32px;
    height: 32px;
    min-width: 32px;
    font-size: 0.9rem;
}

.top-header.scrolled .theme-toggle-switch {
    width: 52px;
    height: 34px;
    min-width: 52px;
}

.top-header.scrolled .toggle-knob {
    width: 28px;
    height: 28px;
}

.top-header.scrolled .theme-toggle-switch input:checked+.toggle-slider .toggle-knob {
    transform: translateX(-24px);
}

.top-header-inner,
.top-categories {
    max-width: 1600px;
    margin: 0 auto;
}

.top-categories {
    padding-left: 1.25rem;
    padding-right: 1.5rem;
}

.top-header-inner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    padding: 0.25rem 1rem 0.15rem 0.8rem;
    height: 56px;
}

.brand-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    min-width: 0;
    height: 50px;
    overflow: visible;
    margin-left: 0.8rem;
    margin-top: 0.8rem;
    margin-bottom: 0.8rem;
}

.brand-logo a {
    display: flex;
    align-items: center;
    gap: 0.1rem;
    text-decoration: none;
    height: 50px;
    padding-left: 0;
}

.logo-img {
    display: block;
    height: 50px;
    width: auto;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 6px rgba(0, 8, 40, 0.35));
}

.logo-icon {
    font-size: 1.1rem;
    color: #10b981;
    background: #fff;
    padding: 0.45rem;
}

.logo-text h1 {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
    margin: 0;
}

.logo-text span {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.top-categories {
    display: flex;
    gap: 0.25rem;
    overflow-x: auto;
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 0;
    margin-bottom: calc(0.7rem + 2px);
    -ms-overflow-style: none;
    scrollbar-width: none;
}

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

/* Header actions + Theme Toggle (template style) */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
    margin-left: 0.2rem;
}

.theme-toggle-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 34px;
    min-width: 60px;
    border-radius: 999px;
    background: rgba(100, 100, 100, 0.7);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    user-select: none;
    flex-shrink: 0;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.current-location {
    display: none;
}

.theme-toggle-switch input {
    display: none;
}

.toggle-slider {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 0 4px;
    position: relative;
}

.toggle-slider i {
    font-size: 0.7rem;
    z-index: 1;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.theme-toggle-switch .toggle-icon-moon {
    color: #fff;
    font-size: 0.7rem;
    left: 8px;
}

.theme-toggle-switch .toggle-icon-sun {
    color: #f59e0b;
    font-size: 0.7rem;
    right: 8px;
    opacity: 0;
}

.toggle-knob {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 28px;
    height: 28px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.25s ease;
    z-index: 2;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-knob i {
    display: none;
}

.theme-toggle-switch input:checked+.toggle-slider .toggle-knob {
    transform: translateX(-26px);
}

[data-theme="dark"] .theme-toggle-switch {
    background: rgba(100, 100, 100, 0.7);
    border-color: rgba(255, 255, 255, 0.4);
}

[data-theme="dark"] .theme-toggle-switch .toggle-icon-moon {
    opacity: 0;
}

[data-theme="dark"] .theme-toggle-switch .toggle-icon-sun {
    opacity: 1;
    color: #ffffff;
}

[data-theme="light"] .theme-toggle-switch .toggle-icon-sun {
    opacity: 0;
}

[data-theme="light"] .theme-toggle-switch .toggle-icon-moon {
    display: inline-block;
}

[data-theme="dark"] .top-header {
    background: linear-gradient(180deg, #020617 0%, var(--bg-primary) 100%);
}

[data-theme="dark"] .top-header .logo-icon {
    color: #38bdf8;
}

/* Category buttons */

.cat-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.2rem 0.4rem;
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.45);
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
    flex-shrink: 0;
    flex-grow: 1;
    line-height: 1.2;
    height: 36px;
    min-height: 36px;
    min-width: 60px;
    box-sizing: border-box;
}

.cat-icon-btn i {
    font-size: 12px;
    color: #ffffff;
}

/* Equal width for all category buttons */

/* --- Category Colors --- */

.cat-supermercado {
    --cat-color: #3b82f6;
}

.cat-padaria {
    --cat-color: #d97706;
}

.cat-farmacia {
    --cat-color: #0891b2;
}

.cat-academia {
    --cat-color: #ef4444;
}

.cat-vestuario {
    --cat-color: #8b5cf6;
}

.cat-eletronico {
    --cat-color: #1cb53e;
}

.cat-perfumaria {
    --cat-color: #ec4899;
}

.cat-petshop {
    --cat-color: #ec4899;
}

.cat-papelaria {
    --cat-color: #f59e0b;
}

.cat-floricultura {
    --cat-color: #1cb53e;
}

.cat-joalheria {
    --cat-color: #eab308;
}

.cat-autopecas {
    --cat-color: #0d9488;
}

.cat-construcao {
    --cat-color: #ea580c;
}

.cat-outro {
    --cat-color: #6b7280;
}

.cat-icon-btn:not(.active) i {
    color: #ffffff;
    transition: color 0.18s ease;
}

.cat-icon-btn:not(.active):hover {
    background: var(--cat-color);
    color: #fff;
    border-color: var(--cat-color);
}

.cat-icon-btn:not(.active):hover i {
    color: #fff;
}

.cat-icon-btn.active {
    background: var(--cat-color);
    border-color: var(--cat-color);
    color: #fff;
}

.cat-icon-btn.active i {
    color: #fff;
}

[data-theme="dark"] .cat-icon-btn {
    background: transparent;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.35);
}

[data-theme="dark"] .cat-icon-btn:not(.active):hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

[data-theme="dark"] .cat-icon-btn.active {
    background: var(--cat-color);
    border-color: var(--cat-color);
    color: #fff;
}

[data-theme="dark"] .sort-label {
    color: #fff;
}

[data-theme="dark"] .sort-select {
    background: var(--bg-input);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .filter-form-inputs {
    background: #1e293b;
    border: 2px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .city-search-wrap {
    background: transparent;
}

[data-theme="dark"] .city-pin-icon {
    color: #e2e8f0;
}

[data-theme="dark"] .search-divider {
    background: #334155;
}

[data-theme="dark"] .filter-form .form-control,
[data-theme="dark"] .filter-form .city-search-wrap input {
    background: transparent;
    color: #f8fafc;
}

[data-theme="dark"] .filter-form .form-control:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #1e293b inset !important;
    -webkit-text-fill-color: #f8fafc !important;
    caret-color: #f8fafc;
}

[data-theme="dark"] .filter-form .form-control:focus {
    background: transparent;
    color: #f8fafc;
}

[data-theme="dark"] .filter-form .form-control::placeholder,
[data-theme="dark"] .filter-form .city-search-wrap input::placeholder {
    color: #94a3b8;
}

[data-theme="light"] .cat-icon-btn {
    box-shadow: none;
}

[data-theme="light"] .theme-toggle-btn {
    box-shadow: 0 6px 14px rgba(30, 58, 138, 0.18);
}

[data-theme="light"] .btn-primary {
    box-shadow: 0 6px 14px rgba(30, 58, 138, 0.18);
}

[data-theme="light"] .btn-secondary {
    box-shadow: 0 6px 14px rgba(30, 58, 138, 0.18);
}

/* Search Progress Bar */
.search-progress {
    height: 3px;
    width: 100%;
    margin: 4px 0 -10px 0;
    padding: 0;
    background: transparent;
    overflow: hidden;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.search-progress.active {
    opacity: 1;
}

.search-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #17a235, #2fc85a);
    border-radius: 0 2px 2px 0;
    box-shadow: 0 0 8px #17a235;
    transition: width 0.35s ease;
}

.filter-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    max-width: none;
    margin-left: auto;
    justify-content: flex-end;
}

.filter-form-inputs {
    display: flex;
    align-items: center;
    max-width: none;
    width: 50%;
    height: 40px;
    min-width: 0;
    background: #ffffff;
    border-radius: 999px;
    padding: 0 0 0 0.9rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    gap: 0;
}

.filter-form .form-group {
    min-width: 0;
}

/* The search field is the only flexible child, so it must absorb all leftover
   width. Capping it (e.g. max-width) leaves slack that defaults to the right
   end of the flex line, pushing #btnSearch inward off the pill's right edge
   at wide viewports / reduced browser zoom. */
.filter-form .search-field {
    flex: 1;
    min-width: 0;
}

.filter-form .city-field {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

.search-divider {
    width: 1px;
    height: 18px;
    background: #e2e8f0;
    flex-shrink: 0;
    margin: 0 0.5rem;
}

.filter-form .form-group-unit {
    flex: 0.7;
    min-width: 120px;
}

.form-group label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
}

.form-control {
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 0.9rem 0;
    border-radius: 0;
    font-size: 1rem;
    outline: none;
    width: 100%;
    min-width: 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-form .form-control {
    color: #1e293b;
    font-weight: 500;
    padding: 0.5rem 0;
    font-size: 0.8rem;
}

.filter-form .search-field .form-control::placeholder {
    color: #64748b;
    opacity: 1;
}

.filter-form .city-search-wrap input {
    color: #1e293b;
    font-weight: 600;
}

.filter-form .form-control:focus {
    box-shadow: none;
}

.city-search-wrap {
    position: relative;
    width: auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: transparent;
    border-radius: 999px;
    padding: 0 0.4rem;
}

.city-pin-icon {
    color: #0f172a;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.city-search-wrap input {
    background: transparent;
    border: none;
    color: #1e293b;
    padding: 0.1rem 0;
    border-radius: 0;
    font-size: 0.7rem;
    font-weight: 600;
    outline: none;
    width: 130px;
    min-width: 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.city-search-wrap input:focus {
    box-shadow: none;
}

.city-search-wrap input::placeholder {
    color: #2b317d;
    opacity: 1;
}

.city-search-wrap.loading input {
    color: transparent;
    pointer-events: none;
}

.city-search-wrap.loading input::placeholder {
    color: transparent;
}

.city-search-wrap.loading::after {
    content: 'Carregando Cidades...';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    padding: 0 0;
    font-size: 1rem;
    color: #98a2b6;
    opacity: 0.8;
    pointer-events: none;
    border-radius: 0;
    overflow: hidden;
    background: transparent;
    border: none;
}

.city-search-wrap.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    border: 2px solid var(--border-color, #bfdbfe);
    border-top-color: var(--accent-blue, #3b82f6);
    border-radius: 50%;
    animation: city-spin 0.7s linear infinite;
    z-index: 1;
    pointer-events: none;
}

@keyframes city-spin {
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

[data-theme="dark"] .city-search-wrap.loading::after {
    background-color: transparent;
    border-color: transparent;
}

.city-clear-btn {
    position: absolute;
    top: 50%;
    right: 0.4rem;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: none;
    background: transparent;
    color: var(--text-secondary, #94a3b8);
    border-radius: 50%;
    font-size: 0.65rem;
    line-height: 16px;
    text-align: center;
    cursor: pointer;
    padding: 0;
    display: none;
    z-index: 2;
    transition: color 0.15s ease;
}

.city-clear-btn:hover {
    color: var(--text-primary, #0f172a);
}

.city-search-wrap.city-focused .city-clear-btn {
    display: block;
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
    line-height: 20px;
    top: calc(50% - 1px);
}

.current-location {
    margin-top: 0.4rem;
    font-size: 0.7rem;
    color: var(--text-secondary, #64748b);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.current-location i {
    font-size: 0.65rem;
    color: var(--accent-blue, #3b82f6);
}

.city-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: var(--bg-primary, #fff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    max-height: 220px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    display: none;
}

.city-search-dropdown.open {
    display: block;
}

.city-search-option {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.city-search-option:hover,
.city-search-option.active {
    background-color: var(--accent-blue, #3b82f6);
    color: #fff;
}

.city-search-option.no-results {
    color: var(--text-secondary);
    cursor: default;
    font-style: italic;
}

.city-search-option.no-results:hover {
    background: none;
    color: var(--text-secondary);
}

.btn-search-round {
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.btn-search-round:hover {
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.45);
}

.btn-search-round:active {
    transform: translateY(0) scale(0.97);
}

.btn-search-round:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

[data-theme="light"] .btn-search-round {
    box-shadow: 0 4px 14px rgba(30, 58, 138, 0.25);
}

#btnSearch {
    width: 50px;
    height: 40px;
    min-width: 50px;
    background: #1cb53e;
    font-size: 1rem;
    line-height: 1;
    box-shadow: none;
    border-radius: 0 20px 20px 0;
    border: 2px solid #fff;
    border-left: none;
    margin-left: -2px;
}

#btnSearch:hover {
    background: #0ca532;
    box-shadow: none;
    transform: none;
}

[data-theme="dark"] #btnSearch {
    background: linear-gradient(135deg, #117a35, #0b5c26);
    border: none;
}

[data-theme="dark"] #btnSearch:hover {
    background: #0b5c26;
}

/* Base button styles (used by about, product, coupons pages) */
.btn-primary {
    background: var(--accent-blue-light);
    color: #ffffff;
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    white-space: nowrap;
    transition: transform 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: #fb923c;
    border: 1.5px solid transparent;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: #f97316;
    transform: translateY(-1px);
}

.btn-secondary:active {
    transform: translateY(0);
}

/* Favorite Buttons */
.btn-fav {
    background: none;
    border: 1.5px solid #cbd5e1;
    color: #94a3b8;
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
    transition: all 0.2s ease;
    padding: 0;
}

.btn-fav:hover {
    border-color: #ef4444;
    color: #ef4444;
    transform: scale(1.1);
}

.btn-fav.active {
    background: #fef2f2;
    border-color: #ef4444;
    color: #ef4444;
}

.btn-fav-header,
.btn-cupons-header,
.btn-instagram-header,
.btn-install-header,
.btn-share-header {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 50%;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.95rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
    border: none;
}

.btn-fav-header {
    background: #ff1a1a;
}

.btn-fav-header:hover {
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.22);
    color: #ffffff;
}

.btn-cupons-header {
    background: #ff7a00;
}

.btn-cupons-header:hover {
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.22);
    color: #ffffff;
}

.btn-instagram-header {
    background: #e1306c;
    font-size: 1.1rem;
}

.btn-instagram-header:hover {
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.22);
    color: #ffffff;
}

.btn-install-header {
    background: #dfb305;
    color: #ffffff;
}

.btn-install-header:hover {
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.22);
    color: #ffffff;
}

/* hidden precisa vencer o display:flex de .btn-search-round */
.btn-install-header[hidden] {
    display: none;
}

/* Botao de compartilhar: so interessa com o app instalado, entao comeca
   escondido e e o @media display-mode: standalone que troca ele pelo botao de
   instalar. display:none tambem precisa vencer o display:flex de
   .btn-search-round, por isso vem depois. */
.btn-share-header {
    display: none;
    background: #dfb305;
    color: #ffffff;
}

.btn-share-header:hover {
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.22);
    color: #ffffff;
}

/* Sem Web Share API o link vai para a area de transferencia: o icone de check
   junto com a cor e o aviso de que o link foi copiado. */
.btn-share-header.btn-share-copied {
    background: #0f172a;
}

.btn-fav-prod {
    width: 42px;
    height: 42px;
    min-width: 42px;
    font-size: 1.1rem;
    border-width: 2px;
}

[data-theme="dark"] .btn-fav {
    border-color: #475569;
    color: #64748b;
}

[data-theme="dark"] .btn-fav:hover,
[data-theme="dark"] .btn-fav.active {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
}

/* Metrics */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.6rem;
    flex-shrink: 0;
    margin-top: 0.5rem;
}

.metric-card {
    background: var(--bg-secondary);
    border: none;
    padding: 0.55rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.metric-icon {
    width: 34px;
    height: 34px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #fff;
    flex-shrink: 0;
}

.card-lowest .metric-icon {
    background: linear-gradient(135deg, #39cf5f, #22b848);
}

.card-avg .metric-icon {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.card-highest .metric-icon {
    background: linear-gradient(135deg, #f43f5e, #e11d48);
}

.card-count .metric-icon {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.metric-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.metric-title {
    font-size: 0.65rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.metric-value {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Best Deals Row */
.deals-section {
    background: var(--bg-secondary);
    border: none;
    padding: 0.75rem 1rem;
    margin-top: 0.5rem;
    flex-shrink: 0;
}

.deals-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.6rem;
}

.deals-header h2 {
    font-size: 0.9rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: none !important;
    color: var(--accent-blue);
}

.deals-header h2 i {
    color: var(--accent-blue);
    font-size: 0.8rem;
}

.deals-scroll-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

.deals-scroll-btn {
    flex-shrink: 0;
    width: 2.1rem;
    height: 2.1rem;
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    background: var(--bg-secondary);
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.deals-scroll-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    transform: scale(1.12);
    box-shadow: var(--shadow-lg);
}

.deals-scroll-prev {
    order: 0;
}

.deals-scroll-next {
    order: 2;
}

.deals-container {
    flex: 1 1 auto;
    min-width: 0;
    order: 1;
    display: flex;
    gap: 0.6rem;
    overflow-x: auto;
    padding-top: 5px;
    padding-bottom: 0.4rem;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.deals-container::-webkit-scrollbar {
    height: 6px;
}

.deals-container::-webkit-scrollbar-track {
    background: transparent;
}

.deals-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.deal-card {
    flex: 0 0 150px;
    width: 150px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    overflow: hidden;
    cursor: pointer;
    color: inherit;
    text-decoration: none;
    display: block;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.deal-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-blue);
}

.deal-img-wrapper {
    position: relative;
    width: 128px;
    height: 128px;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.deal-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    background: #fff;
}

.deal-card:hover .deal-img {
    transform: scale(1.06);
}

.deal-body {
    padding: 0.55rem 0.65rem 0.7rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    text-align: center;
    background: var(--bg-primary);
}

.deal-name {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(0.7rem * 1.3 * 2);
}

.deal-price {
    font-size: 0.75rem;
    font-weight: 900;
    color: var(--accent-emerald);
}

.deal-price .price-unit {
    font-size: 0.65rem;
    font-weight: 500;
    opacity: 0.7;
}

.deals-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1.5rem;
    border: 2px dashed var(--border-color);
    border-radius: 0.6rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
}

.deals-empty i {
    color: var(--text-muted);
}

.deals-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}

.deals-loading .spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Bottom Grid: Listings + Map */
.bottom-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 0.65rem;
    min-height: 688px;
    height: 688px;
    margin-top: 0.5rem;
}

/* Listings Card */
.listings-card {
    background: var(--bg-secondary);
    border: none;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    flex-shrink: 0;
}

.card-header h2 {
    font-size: 0.9rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: none !important;
    color: var(--accent-blue) !important;
}

.card-header h2 i {
    color: var(--accent-blue);
}

.sort-wrapper {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.sort-label {
    font-size: 0.7rem;
    color: #555;
    white-space: nowrap;
    font-weight: 600;
}

.sort-select {
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
    border-radius: 0.25rem;
    border: 1px solid var(--border-color);
    background: #f0f0f0;
    color: #333;
    cursor: pointer;
    height: 1.5rem;
    line-height: 1;
    outline: none;
}

.sort-select:focus {
    border-color: #666;
}

.listings-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    padding-right: 0.25rem;
}

.listings-container::-webkit-scrollbar {
    width: 5px;
}

.listings-container::-webkit-scrollbar-track {
    background: transparent;
}

.listings-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 2rem 1rem;
    border: 2px dashed var(--border-color);
    border-radius: 0.6rem;
    background: var(--bg-input);
}

.empty-icon {
    font-size: 2rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.empty-state h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    transition: none !important;
}

[data-theme="light"] .empty-state h3 {
    color: #0f172a !important;
}

[data-theme="dark"] .empty-state h3 {
    color: #f8fafc !important;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 0.8rem;
    max-width: 350px;
    margin: 0 auto;
}

/* Establishment Card */
.establishment-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0.6rem;
    overflow: hidden;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.establishment-card:hover {
    border-color: var(--accent-blue);
    box-shadow: var(--shadow-md);
}

.establishment-card.selected {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 2px var(--accent-blue);
}

.establishment-header {
    padding: 0.6rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    gap: 0.5rem;
}

.establishment-header-left {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1;
    min-width: 0;
}

.product-title {
    font-size: 0.75rem;
    color: var(--text-primary);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-title-link {
    display: inline-block;
    max-width: 100%;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.product-title-link:hover {
    color: var(--accent-blue);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.product-details-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.4rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

.product-details-link:hover {
    color: var(--accent-blue-light);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.establishment-header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.price-box {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.price-val {
    font-size: 1rem;
    font-weight: 900;
    color: var(--accent-emerald);
    white-space: nowrap;
}

.price-val .price-unit {
    font-size: 0.7rem;
    font-weight: 500;
    opacity: 0.7;
}

.payment-tag {
    font-size: 0.6rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.toggle-icon {
    font-size: 0.75rem;
    color: var(--text-secondary);
    transition: transform 0.2s ease;
}

.establishment-card.open .toggle-icon {
    transform: rotate(180deg);
}

/* Dropdown Details */
.establishment-details {
    display: none;
    padding: 0.75rem;
    border-top: 1px dashed var(--border-color);
    background: var(--bg-secondary);
    animation: fadeIn 0.3s ease;
}

.establishment-card.open .establishment-details {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

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

.details-grid {
    display: grid;
    grid-template-columns: 141px 1fr;
    gap: 0.75rem;
}

.product-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 0.4rem;
    border: 1px solid var(--border-color);
    background: #fff;
}

.product-img-wrapper {
    position: relative;
    width: 100%;
    height: 120px;
    border-radius: 0.4rem;
    overflow: hidden;
    background: #fff;
}

.product-img-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    border-radius: 0.4rem;
    border: 1px solid var(--border-color);
    z-index: 1;
}

.product-img-loader .spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.details-info {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.info-row {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    font-size: 0.75rem;
}

.info-row i {
    color: var(--accent-blue);
    width: 14px;
    margin-top: 2px;
    flex-shrink: 0;
}

.info-label {
    font-weight: 700;
    color: var(--text-secondary);
    min-width: 80px;
    flex-shrink: 0;
}

.info-val {
    color: var(--text-primary);
    flex: 1;
    min-width: 0;
}

.clickable-address {
    cursor: pointer;
    color: var(--accent-blue);
    text-decoration: underline dotted;
    transition: color 0.2s ease;
}

.clickable-address:hover {
    color: var(--accent-indigo);
}

.source-tag {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    background: var(--bg-card-hover);
    border: 1px solid var(--border-color);
    border-radius: 0.3rem;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--accent-indigo);
}

.btn-show-map {
    align-self: flex-start;
    background: var(--bg-card-hover);
    border: 1px solid var(--border-color);
    color: var(--accent-blue);
    padding: 0.35rem 0.7rem;
    border-radius: 0.35rem;
    font-weight: 700;
    font-size: 0.7rem;
    cursor: pointer;
    margin-top: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-show-map:hover {
    background: var(--accent-blue);
    color: #fff;
}

.btn-buy-ml {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.6rem;
    padding: 0.45rem 0.8rem;
    background: #fff059;
    color: #111;
    border-radius: 0.4rem;
    border: none;
    font-size: 0.72rem;
    font-weight: 800;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: background 0.2s ease, transform 0.2s ease;
}

.btn-buy-ml:hover {
    background: #ffe524;
    color: #111;
    transform: translateY(-1px);
}

.btn-buy-amazon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.6rem;
    padding: 0.45rem 0.8rem;
    background: #f90;
    color: #111;
    border-radius: 0.4rem;
    border: none;
    font-size: 0.72rem;
    font-weight: 800;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: background 0.2s ease, transform 0.2s ease;
}

.btn-buy-amazon:hover {
    background: #fb8332;
    color: #111;
    transform: translateY(-1px);
}

.btn-buy-amazon-popup {
    display: flex;
    width: 100%;
}

/* O CSS padrão do Leaflet (`.leaflet-popup-content a`) pinta links de azul
   no tooltip do mapa; forçar fonte preta no botão de compra do popup. */
.custom-popup .map-popup .btn-buy-amazon-popup,
.custom-popup .map-popup .btn-buy-amazon-popup:hover {
    color: #111;
}

.btn-buy-ml-popup {
    display: flex;
    width: 100%;
}

/* O CSS padrão do Leaflet (`.leaflet-popup-content a`) pinta links de azul
   no tooltip do mapa; forçar fonte preta no botão de compra do popup. */
.custom-popup .map-popup .btn-buy-ml-popup,
.custom-popup .map-popup .btn-buy-ml-popup:hover {
    color: #111;
}

.btn-buy-magalu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.6rem;
    padding: 0.45rem 0.8rem;
    background: #0086ff;
    color: #fff;
    border-radius: 0.4rem;
    border: none;
    font-size: 0.72rem;
    font-weight: 800;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: background 0.2s ease, transform 0.2s ease;
}

.btn-buy-magalu:hover {
    background: #0064c8;
    color: #fff;
    transform: translateY(-1px);
}

.btn-buy-magalu-popup {
    display: flex;
    width: 100%;
}

/* O CSS padrão do Leaflet (`.leaflet-popup-content a`) pinta links de azul
   no tooltip do mapa; forçar fonte branca no botão de compra do popup. */
.custom-popup .map-popup .btn-buy-magalu-popup,
.custom-popup .map-popup .btn-buy-magalu-popup:hover {
    color: #fff;
}

.btn-buy-ldm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.6rem;
    padding: 0.45rem 0.8rem;
    background: #d32f2f;
    color: #fff;
    border-radius: 0.4rem;
    border: none;
    font-size: 0.72rem;
    font-weight: 800;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: background 0.2s ease, transform 0.2s ease;
}

.btn-buy-ldm:hover {
    background: #b71c1c;
    color: #fff;
    transform: translateY(-1px);
}

.btn-buy-ldm-popup {
    display: flex;
    width: 100%;
}

/* O CSS padrão do Leaflet (`.leaflet-popup-content a`) pinta links de azul
   no tooltip do mapa; forçar fonte branca no botão de compra do popup. */
.custom-popup .map-popup .btn-buy-ldm-popup,
.custom-popup .map-popup .btn-buy-ldm-popup:hover {
    color: #fff;
}

.btn-buy-cobasi {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.6rem;
    padding: 0.45rem 0.8rem;
    background: #00a651;
    color: #fff;
    border-radius: 0.4rem;
    border: none;
    font-size: 0.72rem;
    font-weight: 800;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: background 0.2s ease, transform 0.2s ease;
}

.btn-buy-cobasi:hover {
    background: #008f46;
    color: #fff;
    transform: translateY(-1px);
}

.btn-buy-cobasi-popup {
    display: flex;
    width: 100%;
}

/* O CSS padrão do Leaflet (`.leaflet-popup-content a`) pinta links de azul
   no tooltip do mapa; forçar fonte branca no botão de compra do popup. */
.custom-popup .map-popup .btn-buy-cobasi-popup,
.custom-popup .map-popup .btn-buy-cobasi-popup:hover {
    color: #fff;
}

.btn-buy-paguemenos {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.6rem;
    padding: 0.45rem 0.8rem;
    background: #00843d;
    color: #fff;
    border-radius: 0.4rem;
    border: none;
    font-size: 0.72rem;
    font-weight: 800;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: background 0.2s ease, transform 0.2s ease;
}

.btn-buy-paguemenos:hover {
    background: #006b32;
    color: #fff;
    transform: translateY(-1px);
}

.btn-buy-paguemenos-popup {
    display: flex;
    width: 100%;
}

/* O CSS padrão do Leaflet (`.leaflet-popup-content a`) pinta links de azul
   no tooltip do mapa; forçar fonte branca no botão de compra do popup. */
.custom-popup .map-popup .btn-buy-paguemenos-popup,
.custom-popup .map-popup .btn-buy-paguemenos-popup:hover {
    color: #fff;
}

.btn-buy-shopee {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.6rem;
    padding: 0.45rem 0.8rem;
    background: #ee4d2d;
    color: #fff;
    border-radius: 0.4rem;
    border: none;
    font-size: 0.72rem;
    font-weight: 800;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: background 0.2s ease, transform 0.2s ease;
}

.btn-buy-shopee:hover {
    background: #d73211;
    color: #fff;
    transform: translateY(-1px);
}

.btn-buy-shopee-popup {
    display: flex;
    width: 100%;
}

/* O CSS padrão do Leaflet (`.leaflet-popup-content a`) pinta links de azul
   no tooltip do mapa; forçar fonte branca no botão de compra do popup. */
.custom-popup .map-popup .btn-buy-shopee-popup,
.custom-popup .map-popup .btn-buy-shopee-popup:hover {
    color: #fff;
}

.btn-buy-aliexpress {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.6rem;
    padding: 0.45rem 0.8rem;
    background: #ff4747;
    color: #fff;
    border-radius: 0.4rem;
    border: none;
    font-size: 0.72rem;
    font-weight: 800;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: background 0.2s ease, transform 0.2s ease;
}

.btn-buy-aliexpress:hover {
    background: #e62e04;
    color: #fff;
    transform: translateY(-1px);
}

.btn-buy-aliexpress-popup {
    display: flex;
    width: 100%;
}

.custom-popup .map-popup .btn-buy-aliexpress-popup,
.custom-popup .map-popup .btn-buy-aliexpress-popup:hover {
    color: #fff;
}

.btn-buy-netshoes {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.6rem;
    padding: 0.45rem 0.8rem;
    background: #7c3aed;
    color: #fff;
    border-radius: 0.4rem;
    border: none;
    font-size: 0.72rem;
    font-weight: 800;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: background 0.2s ease, transform 0.2s ease;
}

.btn-buy-netshoes:hover {
    background: #6d28d9;
    color: #fff;
    transform: translateY(-1px);
}

.btn-buy-netshoes-popup {
    display: flex;
    width: 100%;
}

/* O CSS padrão do Leaflet (`.leaflet-popup-content a`) pinta links de azul
   no tooltip do mapa; forçar fonte branca no botão de compra do popup. */
.custom-popup .map-popup .btn-buy-netshoes-popup,
.custom-popup .map-popup .btn-buy-netshoes-popup:hover {
    color: #fff;
}

.btn-buy-natura {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.6rem;
    padding: 0.45rem 0.8rem;
    background: #16a34a;
    color: #fff;
    border-radius: 0.4rem;
    border: none;
    font-size: 0.72rem;
    font-weight: 800;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: background 0.2s ease, transform 0.2s ease;
}

.btn-buy-natura:hover {
    background: #15803d;
    color: #fff;
    transform: translateY(-1px);
}

.btn-buy-natura-popup {
    display: flex;
    width: 100%;
}

/* O CSS padrão do Leaflet (`.leaflet-popup-content a`) pinta links de azul
   no tooltip do mapa; forçar fonte branca no botão de compra do popup. */
.custom-popup .map-popup .btn-buy-natura-popup,
.custom-popup .map-popup .btn-buy-natura-popup:hover {
    color: #fff;
}

.btn-buy-avon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.6rem;
    padding: 0.45rem 0.8rem;
    background: #db2777;
    color: #fff;
    border-radius: 0.4rem;
    border: none;
    font-size: 0.72rem;
    font-weight: 800;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: background 0.2s ease, transform 0.2s ease;
}

.btn-buy-avon:hover {
    background: #be185d;
    color: #fff;
    transform: translateY(-1px);
}

.btn-buy-avon-popup {
    display: flex;
    width: 100%;
}

/* O CSS padrão do Leaflet (`.leaflet-popup-content a`) pinta links de azul
   no tooltip do mapa; forçar fonte branca no botão de compra do popup. */
.custom-popup .map-popup .btn-buy-avon-popup,
.custom-popup .map-popup .btn-buy-avon-popup:hover {
    color: #fff;
}

/* Map Card */
.map-card {
    background: var(--bg-secondary);
    border: none;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.map-card .card-header {
    margin-bottom: 0.5rem;
}

.map-container {
    flex: 1;
    min-height: 350px;
    width: 100%;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    overflow: hidden;
    z-index: 1;
}

/* CARTO basemaps now require an API key (renders "API KEY REQUIRED" tiles),
   so the map uses free OpenStreetMap tiles. The dark theme reuses the same
   OSM tiles but inverts their colors via CSS to keep a dark map look. */
.dark-map-tiles {
    filter: invert(1) hue-rotate(180deg) brightness(0.95) contrast(0.9);
}

/* ── Custom Map Markers ── */
.custom-marker-wrapper {
    background: transparent !important;
    border: none !important;
}

.custom-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.35));
    transition: transform 0.2s ease;
}

.custom-marker:hover {
    transform: scale(1.15) translateY(-3px);
}

.pin-head {
    width: 32px;
    height: 32px;
    background: var(--pin-color);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2.5px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.pin-head i {
    transform: rotate(45deg);
    color: #fff;
    font-size: 0.7rem;
}

.pin-tail {
    width: 2px;
    height: 6px;
    background: var(--pin-color);
    margin-top: -1px;
    border-radius: 0 0 2px 2px;
}

/* ── Custom Popup ── */
.custom-popup .leaflet-popup-content-wrapper {
    border-radius: 0.75rem;
    padding: 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    background: var(--bg-secondary, #1e293b);
}

.custom-popup .leaflet-popup-content {
    margin: 0;
    min-width: 220px;
}

.custom-popup .leaflet-popup-tip {
    background: var(--bg-secondary, #1e293b);
    box-shadow: none;
}

.map-popup {
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.popup-header {
    padding: 0.6rem 0.75rem;
    background: var(--bg-primary, #0f172a);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.popup-store {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-primary, #f8fafc);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

.popup-price {
    font-size: 0.85rem;
    font-weight: 800;
    color: #10b981;
    white-space: nowrap;
}

.popup-body {
    padding: 0.5rem 0.75rem 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.popup-product {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-primary, #f8fafc);
}

.popup-address {
    font-size: 0.65rem;
    color: var(--text-secondary, #94a3b8);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.popup-address i {
    color: var(--accent-blue, #3b82f6);
    font-size: 0.6rem;
}

/* ── Category Badge on Cards ── */
.cat-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
}

.cat-badge i {
    color: #fff;
    font-size: 0.55rem;
}

.establishment-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-blue);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Responsive */
@media (max-width: 1024px) {
    .bottom-grid {
        grid-template-columns: 1fr;
        height: auto;
        min-height: auto;
    }

    .top-header-inner {
        flex-wrap: nowrap;
    }

    .filter-form {
        flex-wrap: nowrap;
        justify-content: flex-end;
    }

    .filter-form-inputs {
        flex: 1 1 240px;
        min-width: 0;
        width: auto;
        max-width: 520px;
    }

    .filter-form .city-field {
        flex: 0 1 auto;
        min-width: 0;
    }

    .filter-form .city-search-wrap {
        flex-shrink: 1;
        min-width: 0;
    }

    .filter-form .city-search-wrap input {
        width: 100px;
        max-width: 100px;
        min-width: 0;
        flex: 0 0 100px;
    }

    .header-actions {
        flex-shrink: 0;
    }
}

@media (max-width: 640px) {
    .bottom-grid {
        grid-template-columns: 1fr;
        height: auto;
        min-height: auto;
    }

    /* Mobile header - two-row layout:
       Row 1: logo (left) + action buttons (right)
       Row 2: full-width search bar */
    .top-header-inner {
        flex-wrap: wrap;
        gap: 0.75rem;
        padding: 0.45rem 0.6rem 0.4rem;
        height: auto;
        min-height: 40px;
    }

    .filter-form {
        display: contents;
    }

    .brand-logo {
        order: 1;
        margin: 0 0 0 0.4rem;
        height: 38px;
        flex-shrink: 0;
    }

    .brand-logo a {
        height: 38px;
    }

    .logo-img {
        height: 38px;
    }

    .header-actions {
        order: 2;
        width: auto;
        margin-left: auto;
        justify-content: flex-end;
        gap: 0.35rem;
    }

    .header-actions .btn-fav-header,
    .header-actions .btn-cupons-header,
    .header-actions .btn-instagram-header,
    .header-actions .btn-install-header,
    .header-actions .btn-share-header {
        width: 30px;
        height: 30px;
        min-width: 30px;
        font-size: 1.05rem;
    }

    .header-actions .theme-toggle-switch {
        width: 46px;
        height: 30px;
        min-width: 46px;
    }

    .header-actions .toggle-knob {
        width: 21px;
        height: 21px;
        top: 4.5px;
        right: 2.5px;
    }

    .header-actions .theme-toggle-switch input:checked+.toggle-slider .toggle-knob {
        transform: translateX(-20px);
    }

    .filter-form-inputs {
        order: 3;
        flex: 1 1 100%;
        width: 100%;
        max-width: 100%;
        height: 40px;
        min-height: 40px;
        padding: 0 0 0 0.9rem;
        flex-wrap: nowrap;
    }

    .filter-form-inputs #btnSearch {
        width: 46px;
        min-width: 46px;
        height: 40px;
        border-radius: 0 20px 20px 0;
        border: 2px solid #fff;
        border-left: none;
        margin-left: -2px;
    }

    [data-theme="dark"] .filter-form-inputs #btnSearch,
    [data-theme="dark"] .top-header.scrolled .filter-form-inputs #btnSearch {
        border: none;
    }

    .search-divider {
        display: none;
    }

    .city-search-wrap {
        padding: 0.3rem 0.5rem;
    }

    .city-search-wrap input {
        width: 90px;
        font-size: 0.78rem;
    }

    .top-categories {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

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

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

    .listings-card {
        order: 1;
        height: 440px;
        overflow-y: auto;
    }

    .map-card {
        order: 2;
        min-height: 420px;
    }

    .map-container {
        min-height: 350px;
    }

    /* Mobile header - scrolled: keeps the same visual, only hides categories */
    .top-header.scrolled {
        height: auto;
        padding-top: 0.6rem;
    }

    .top-header.scrolled .top-header-inner {
        flex-wrap: wrap;
        gap: 0.75rem;
        padding: 0.45rem 0.6rem 0.4rem;
        height: auto;
        min-height: 40px;
        margin-bottom: 0.5rem;
    }

    .top-header.scrolled .brand-logo,
    .top-header.scrolled .brand-logo a,
    .top-header.scrolled .logo-img {
        height: 38px;
    }

    .top-header.scrolled .header-actions .btn-fav-header,
    .top-header.scrolled .header-actions .btn-cupons-header,
    .top-header.scrolled .header-actions .btn-instagram-header,
    .top-header.scrolled .header-actions .btn-install-header,
    .top-header.scrolled .header-actions .btn-share-header {
        width: 30px;
        height: 30px;
        min-width: 30px;
        font-size: 1.05rem;
    }

    .top-header.scrolled .filter-form-inputs {
        order: 3;
        flex: 1 1 100%;
        width: 100%;
        max-width: 100%;
        height: 40px;
        min-height: 40px;
        padding: 0 0 0 0.9rem;
        flex-wrap: nowrap;
    }

    .top-header.scrolled .filter-form-inputs #btnSearch {
        width: 46px;
        min-width: 46px;
        height: 40px;
        border-radius: 0 20px 20px 0;
        border: 2px solid #fff;
        border-left: none;
        margin-left: -2px;
    }

    .top-header.scrolled .filter-form .form-control {
        font-size: 0.8rem;
        padding: 0.5rem 0;
    }

    .top-header.scrolled .theme-toggle-switch {
        width: 46px;
        height: 30px;
        min-width: 46px;
    }

    .top-header.scrolled .toggle-knob {
        width: 21px;
        height: 21px;
        top: 4.5px;
        right: 2.5px;
    }

    .top-header.scrolled .theme-toggle-switch input:checked+.toggle-slider .toggle-knob {
        transform: translateX(-20px);
    }
}

.app-footer {
    background: linear-gradient(180deg, #f8fafc, #94a3b8);
    border: none;
    padding: 1.5rem 1.5rem;
    margin: 0;
    flex-shrink: 0;
    text-align: center;
}

.app-footer .footer-disclaimer,
.app-footer .footer-copyright {
    color: #334155;
}

[data-theme="dark"] .app-footer {
    background: linear-gradient(180deg, #475569, #0f172a);
}

[data-theme="dark"] .app-footer .footer-disclaimer,
[data-theme="dark"] .app-footer .footer-copyright {
    color: #cbd5e1;
}

.marketplace-logos {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin: 2rem 0 3rem 0;
}

.marketplace-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.mp-img {
    height: 48px;
    max-height: 48px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
    transition: filter 0.35s ease, opacity 0.35s ease, transform 0.35s ease;
    filter: grayscale(1) brightness(1.1);
    opacity: 0.55;
}

.mp-img[alt="Shein"],
.mp-img[alt="Mercado Livre"] {
    filter: grayscale(1) brightness(1.6) drop-shadow(0 0 0.8px #fff) drop-shadow(0 0 0.4px #fff);
    opacity: 0.7;
}

.mp-img[alt="Mercado Livre"] {
    max-width: 191px;
}

.mp-img[alt="Carrefour"] {
    margin: -2px 0;
}

.mp-img[alt="Carrefour"],
.mp-img[alt="Atacadão"],
.mp-img[alt="Loja do Mecânico"] {
    filter: grayscale(1) brightness(0.7);
    opacity: 0.7;
}

.mp-img[alt="Magazine Luiza"] {
    filter: grayscale(1) brightness(0.9);
    opacity: 0.7;
}

.mp-img[alt="Shopee"] {
    content: url("/static/img/logos_png/shopee_light.png");
    filter: none;
    opacity: 0.55;
}

.mp-img[alt="Cobasi"] {
    content: url("/static/img/logos_png/cobasi_light.png");
    filter: none;
    opacity: 0.55;
}

.mp-img[alt="Natura"] {
    filter: grayscale(1) brightness(0.85);
    opacity: 0.7;
}

.mp-img[alt="Natura"]:hover {
    filter: grayscale(0) brightness(1);
    opacity: 1;
    transform: scale(1.15);
}

.mp-img:hover {
    filter: grayscale(0) brightness(1);
    opacity: 1;
    transform: scale(1.15);
}

.mp-img[alt="Shein"]:hover {
    filter: brightness(0) drop-shadow(0 0 0.8px #fff) drop-shadow(0 0 0.4px #fff);
    opacity: 0.8;
    transform: scale(1.15);
}

.mp-img[alt="Mercado Livre"]:hover {
    filter: grayscale(0) brightness(1) drop-shadow(0 0 0.8px #fff) drop-shadow(0 0 0.4px #fff);
    opacity: 1;
    transform: scale(1.15);
}

.mp-img[alt="Magazine Luiza"]:hover,
.mp-img[alt="Carrefour"]:hover,
.mp-img[alt="Atacadão"]:hover,
.mp-img[alt="Loja do Mecânico"]:hover {
    filter: grayscale(0) brightness(1);
    opacity: 1;
    transform: scale(1.15);
}

.mp-img[alt="Shopee"]:hover {
    content: url("/static/img/logos_png/shopee.png");
    filter: grayscale(0) brightness(1);
    opacity: 1;
    transform: scale(1.15);
}

.mp-img[alt="Cobasi"]:hover {
    content: url("/static/img/logos_png/cobasi.png");
    filter: grayscale(0) brightness(1);
    opacity: 1;
    transform: scale(1.15);
}

[data-theme="dark"] .mp-img {
    filter: brightness(0) invert(1) brightness(0.7);
    opacity: 0.9;
}

[data-theme="dark"] .mp-img[alt="Kabum"] {
    filter: grayscale(1) brightness(1.6) contrast(0.7);
    opacity: 0.9;
}

[data-theme="dark"] .mp-img[alt="Mercado Livre"] {
    content: url("/static/img/logos_png/mercado_livre_dark.png");
    filter: none;
    opacity: 0.9;
}

[data-theme="dark"] .mp-img:hover,
[data-theme="dark"] .mp-img[alt="Shein"]:hover,
[data-theme="dark"] .mp-img[alt="Kabum"]:hover,
[data-theme="dark"] .mp-img[alt="Magazine Luiza"]:hover,
[data-theme="dark"] .mp-img[alt="Carrefour"]:hover,
[data-theme="dark"] .mp-img[alt="Atacadão"]:hover,
[data-theme="dark"] .mp-img[alt="Loja do Mecânico"]:hover {
    filter: grayscale(0) brightness(1);
    opacity: 1;
    transform: scale(1.15);
}

[data-theme="dark"] .mp-img[alt="Mercado Livre"]:hover {
    content: url("/static/img/logos_png/mercado_livre.png");
    filter: none;
    opacity: 1;
    transform: scale(1.15);
}

[data-theme="dark"] .mp-img[alt="Shopee"]:hover {
    content: url("/static/img/logos_png/shopee.png");
    filter: none;
    opacity: 1;
    transform: scale(1.15);
}

[data-theme="dark"] .mp-img[alt="Cobasi"]:hover {
    content: url("/static/img/logos_png/cobasi.png");
    filter: none;
    opacity: 1;
    transform: scale(1.15);
}

[data-theme="dark"] .mp-img[alt="Farmácia Pague Menos"] {
    content: url("/static/img/logos_png/pague_menos_dark.png");
    filter: none;
    opacity: 0.9;
}

[data-theme="dark"] .mp-img[alt="Farmácia Pague Menos"]:hover {
    content: url("/static/img/logos_png/pague_menos.png");
    filter: none;
    opacity: 1;
    transform: scale(1.15);
}

.footer-disclaimer {
    font-size: 0.7rem;
    color: #f8fafc;
    line-height: 1.5;
    max-width: 680px;
    margin: 0 auto 0.4rem;
}

.footer-copyright {
    font-size: 0.65rem;
    color: #f8fafc;
    padding-top: 0.5rem;
    margin-top: 0.3rem;
    font-weight: 500;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin: 0.5rem 0 1.25rem 0;
}

.footer-links a {
    color: #334155;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.25s ease, border-bottom-color 0.25s ease;
}

.footer-links a:hover {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.footer-links-sep {
    color: #94a3b8;
    font-size: 0.8rem;
}

[data-theme="dark"] .footer-links a {
    color: #cbd5e1;
}

[data-theme="dark"] .footer-links a:hover {
    color: #60a5fa;
    border-bottom-color: #60a5fa;
}

.header-home-link {
    text-decoration: none;
    font-size: 0.85rem;
    padding: 0.5rem 0.9rem;
}

/* ==========================================
   SEO CONTENT (server-rendered text block)
   ========================================== */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.seo-content {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 2rem 1.5rem 2.5rem;
}

.seo-content-inner {
    max-width: 960px;
    margin: 0 auto;
}

.seo-content h2 {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.seo-content h3 {
    font-size: 1.05rem;
    margin: 1.4rem 0 0.5rem;
    color: var(--text-primary);
}

.seo-content p,
.seo-content li {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
}

.seo-content ul,
.seo-content ol {
    padding-left: 1.4rem;
    margin: 0.5rem 0 1rem;
}

.seo-category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.2rem;
    list-style: none;
    padding-left: 0 !important;
    margin: 0.5rem 0 1rem !important;
}

.seo-category-list a {
    color: var(--accent-blue);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.seo-category-list a:hover {
    border-bottom-color: var(--accent-blue);
    text-decoration: none;
}

.seo-content strong {
    color: var(--text-primary);
}

[data-theme="dark"] .seo-content {
    background: var(--bg-secondary);
}

/* ==========================================
   SOBRE PAGE (About page layout)
   ========================================== */
.about-main {
    min-height: 60vh;
}

/* --- Hero --- */
.about-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #a5d8fc 0%, #cfe8fd 52%, #e3f2fd 100%);
    padding: 4rem 1.5rem 3.5rem;
    text-align: center;
}

.about-hero-compact {
    padding: 2.2rem 1.5rem 1.8rem;
}

.about-hero-compact h1 {
    margin-top: 0.4rem;
    margin-bottom: 0.4rem;
}

.about-hero-deco {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    filter: blur(2px);
    pointer-events: none;
}

.about-hero-deco-1 {
    width: 340px;
    height: 340px;
    top: -140px;
    left: -100px;
}

.about-hero-deco-2 {
    width: 280px;
    height: 280px;
    bottom: -120px;
    right: -80px;
}

.about-hero-inner {
    position: relative;
    max-width: 860px;
    margin: 0 auto;
}

.about-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(255, 255, 255, 0.7);
    color: #1d4ed8;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(30, 58, 138, 0.12);
    backdrop-filter: blur(6px);
}

.about-hero h1 {
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1.15;
    color: #0f172a;
    margin: 1.2rem auto 0.8rem;
    max-width: 760px;
}

.about-hero-brand {
    background: linear-gradient(90deg, #2563eb, #7c3aed);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.about-hero-subtitle {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #334155;
    max-width: 660px;
    margin: 0 auto 1.6rem;
}

.about-hero-subtitle strong {
    color: #0f172a;
}

.about-hero-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.about-btn-lg {
    font-size: 1rem;
    font-weight: 700;
    padding: 0.85rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* --- Stats --- */
.about-stats {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2.8rem;
}

.about-stat {
    flex: 1 1 150px;
    max-width: 200px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    padding: 1.1rem 0.8rem;
    box-shadow: 0 8px 20px rgba(30, 58, 138, 0.10);
    backdrop-filter: blur(6px);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.about-stat-value {
    font-size: 1.7rem;
    font-weight: 800;
    color: #1d4ed8;
}

.about-stat-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
}

/* --- Sections --- */
.about-section {
    padding: 4rem 1.5rem 3.5rem;
    background: var(--bg-primary);
}

.about-section-alt {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.about-section-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.about-section-head {
    text-align: center;
    max-width: 620px;
    margin: 0 auto 2.5rem;
}

.about-eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-blue);
    margin-bottom: 0.5rem;
}

.about-section-head h2 {
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
}

.about-section-head p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* --- Category cards --- */
.about-cats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
}

.about-cat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.3rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1rem 0.6rem;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.about-cat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-focus);
}

.about-cat-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    color: #fff;
    background: var(--cat-color);
    margin-bottom: 0.25rem;
    box-shadow: 0 5px 12px color-mix(in srgb, var(--cat-color) 40%, transparent);
}

.about-cat-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
}

.about-cat-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent-blue);
}

.about-cat-link i {
    transition: transform 0.25s ease;
}

.about-cat-card:hover .about-cat-link i {
    transform: translateX(4px);
}

/* --- Steps --- */
.about-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
}

.about-step {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 2rem 1.3rem 1.5rem;
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.about-step:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.about-step-num {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--accent-blue);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}

.about-step-icon {
    font-size: 1.7rem;
    color: var(--accent-blue);
    margin: 0.4rem 0 0.9rem;
}

.about-step h3 {
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.about-step p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

/* --- Benefits --- */
.about-benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.2rem;
}

.about-benefit {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 1.8rem 1.5rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.about-benefit:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.about-benefit-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
    background: var(--cat-color);
    margin: 0 auto 1rem;
    box-shadow: 0 6px 14px color-mix(in srgb, var(--cat-color) 40%, transparent);
}

.about-benefit h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.about-benefit p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* --- CTA --- */
.about-cta {
    padding: 4rem 1.5rem;
    background: linear-gradient(135deg, #4ade80 0%, #16a34a 100%);
    text-align: center;
}

[data-theme="dark"] .about-cta {
    background: var(--bg-secondary);
}

.about-cta-inner {
    max-width: 640px;
    margin: 0 auto;
}

.about-cta h2 {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.6rem;
}

.about-cta p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.02rem;
    line-height: 1.6;
    margin-bottom: 1.6rem;
}

.about-cta-btn {
    background: #fff;
    color: #334155;
    border: none;
}

.about-cta-btn:hover {
    background: #f1f5f9;
    color: #1f2937;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .about-steps {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-cats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 640px) {
    .about-hero {
        padding: 2.6rem 1rem 2.4rem;
    }

    .about-hero-compact {
        padding: 1.6rem 1rem 1.2rem;
    }

    .about-hero h1 {
        font-size: 1.7rem;
    }

    .about-hero-subtitle {
        font-size: 0.95rem;
    }

    .about-steps {
        grid-template-columns: 1fr;
    }

    .about-section {
        padding: 3rem 1rem 2.5rem;
    }

    .about-section-head h2 {
        font-size: 1.5rem;
    }

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

    /* Rodapé no mobile: grade fixa de 3 colunas, as 15 logos fluem em linhas
       de 3 (as .marketplace-row deixam de ser containers). */
    .marketplace-logos {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        align-items: center;
        justify-items: center;
        width: 100%;
        margin: 1.25rem 0 3rem 0;
        gap: 1rem 0.4rem;
    }

    .marketplace-row {
        display: contents;
    }

    .marketplace-row a {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
    }

    .mp-img {
        width: auto;
        max-width: 100%;
        height: 30px;
        max-height: 30px;
        margin: 0;
    }

    .mp-img[alt="Carrefour"] {
        margin: 0;
    }
}

/* --- Dark theme overrides for the Sobre hero --- */
[data-theme="dark"] .about-hero {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
}

[data-theme="dark"] .about-hero-deco {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .about-hero h1 {
    color: var(--text-primary);
}

[data-theme="dark"] .about-hero-brand {
    background: linear-gradient(90deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

[data-theme="dark"] .about-hero-badge {
    background: var(--bg-card);
    color: var(--accent-blue-light);
    box-shadow: var(--shadow-md);
}

[data-theme="dark"] .about-hero-subtitle {
    color: var(--text-secondary);
}

[data-theme="dark"] .about-hero-subtitle strong {
    color: var(--text-primary);
}

[data-theme="dark"] .about-stat {
    background: var(--bg-card);
    border-color: var(--border-color);
    box-shadow: var(--shadow-md);
}

[data-theme="dark"] .about-stat-value {
    color: var(--accent-blue-light);
}

[data-theme="dark"] .about-stat-label {
    color: var(--text-secondary);
}

/* ==========================================
   FAQ PAGE (accordion)
   ========================================== */
.faq-list {
    max-width: 780px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.faq-item[open] {
    border-color: var(--border-focus);
    box-shadow: var(--shadow-md);
}

.faq-summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1.05rem 1.2rem;
    font-weight: 700;
    font-size: 0.98rem;
    color: var(--text-primary);
    user-select: none;
}

.faq-summary::-webkit-details-marker {
    display: none;
}

.faq-summary:hover {
    color: var(--accent-blue);
}

.faq-q-icon {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    color: #fff;
    background: var(--accent-blue);
}

.faq-q-text {
    flex: 1;
}

.faq-toggle {
    flex-shrink: 0;
    color: var(--text-muted);
    transition: transform 0.3s ease, color 0.3s ease;
}

.faq-item[open] .faq-toggle {
    transform: rotate(180deg);
    color: var(--accent-blue);
}

.faq-answer {
    padding: 0 1.2rem 1.2rem 4.1rem;
}

.faq-answer p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.94rem;
}

.faq-answer strong {
    color: var(--text-primary);
}

/* ==========================================
   PRODUCT DETAIL PAGE
   ========================================== */
.prod-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.25rem 1.5rem 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.prod-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.prod-breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.prod-breadcrumb a:hover {
    color: var(--accent-blue);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.prod-breadcrumb-current {
    color: var(--text-primary);
    font-weight: 600;
    max-width: 420px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.prod-breadcrumb-sep {
    color: var(--text-muted);
}

.prod-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

.prod-back-link:hover {
    color: var(--accent-blue-light);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.prod-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: minmax(260px, 380px) 1fr;
    gap: 1.75rem;
    box-shadow: var(--shadow-md);
}

.prod-gallery {
    position: relative;
}

.prod-gallery-inner {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 0.85rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prod-gallery-inner .product-img-loader {
    border: none;
    border-radius: 0.85rem;
}

.prod-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
}

.prod-cat-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: #fff;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    border-radius: 999px;
    z-index: 2;
}

.prod-info {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    min-width: 0;
}

.prod-storeline {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-blue);
}

.prod-name {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.3;
    color: var(--text-primary);
    margin: 0;
}

.prod-name-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.prod-name-row .btn-fav-prod {
    flex-shrink: 0;
}

.prod-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.prod-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.7rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 999px;
}

.prod-price-box {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.5rem;
    padding: 1rem 1.1rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(16, 185, 129, 0.04));
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: 0.85rem;
}

.prod-price-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.prod-price {
    font-size: 1.9rem;
    font-weight: 900;
    color: var(--accent-emerald);
    line-height: 1.2;
}

.prod-price small {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.prod-payment {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.prod-buy {
    margin-top: 0.5rem;
}

.prod-buy-btn {
    display: inline-flex;
    width: auto;
    font-size: 0.95rem;
    padding: 0.8rem 1.6rem;
    border-radius: 0.65rem;
    text-decoration: none;
    box-shadow: var(--shadow-md);
}

.prod-buy-btn:hover {
    color: #fff;
}

.prod-bottom-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 1rem;
    align-items: stretch;
}

.prod-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-sm);
}

.prod-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--accent-blue);
    margin-bottom: 1rem;
}

.prod-section-title i {
    color: var(--accent-blue);
}

.prod-desc-body {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.prod-desc-body p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.75;
    text-align: justify;
}

.prod-desc-body p strong {
    color: var(--text-primary);
}

.prod-store-card {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.prod-store-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.prod-store-icon {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: var(--accent-blue);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
}

.prod-store-name {
    display: block;
    font-weight: 700;
    font-size: 1rem;
    color: var(--accent-blue);
}

.prod-store-rating {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-amber);
    margin-top: 0.15rem;
}

.prod-store-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 0;
    margin: 0;
}

.prod-store-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    font-size: 0.86rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.prod-store-list li i {
    flex-shrink: 0;
    margin-top: 0.2rem;
    color: var(--accent-blue);
}

.prod-store-map {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--accent-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

.prod-store-map:hover {
    color: var(--accent-blue-light);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.prod-specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 0.6rem;
}

.prod-spec {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.7rem 0.9rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 0.6rem;
}

.prod-spec-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.prod-spec-value {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    word-break: break-word;
}

.prod-keywords {
    margin-top: 1rem;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.tag-cloud-item {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.25;
    text-decoration: none;
    color: var(--accent-blue);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    word-break: break-word;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.tag-cloud-item:hover {
    color: #fff;
    background: var(--accent-blue);
    border-color: var(--accent-blue);
}

@media (max-width: 900px) {
    .prod-card {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .prod-gallery-inner {
        max-width: 380px;
        margin: 0.6rem auto -0.3rem;
    }

    .prod-bottom-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .prod-main {
        padding: 1rem 0.75rem 2rem;
    }

    .prod-name {
        font-size: 1.25rem;
    }

    .prod-price {
        font-size: 1.6rem;
    }

    .prod-section {
        padding: 1rem;
    }

    .tag-cloud {
        gap: 0.4rem;
    }
}

/* ───────────────────────────── Cupons ───────────────────────────── */

.coupon-hero {
    background: linear-gradient(135deg, #2563eb 0%, #6366f1 50%, #8b5cf6 100%);
    color: #fff;
    padding: 3rem 1.5rem;
    text-align: center;
}

.coupon-hero-inner {
    max-width: 860px;
    margin: 0 auto;
}

.coupon-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 1rem;
}

.coupon-hero h1 {
    font-size: 2.1rem;
    font-weight: 800;
    margin: 0 0 0.75rem;
    line-height: 1.2;
}

.coupon-hero-subtitle {
    font-size: 1.02rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.92);
    margin: 0 auto 1.5rem;
    max-width: 620px;
}

.coupon-hero-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.coupon-btn-lg {
    padding: 0.8rem 1.6rem;
    font-size: 0.95rem;
    border-radius: 0.7rem;
}

.coupon-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.6rem;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 0.7rem;
    border: none;
    background: #10b981;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

.coupon-hero-btn:hover {
    background: #059669;
    transform: translateY(-1px);
}

.coupon-section {
    padding: 2.25rem 1.5rem 2.5rem;
}

.coupon-section-inner {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.alphabet-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    justify-content: center;
    padding: 0.15rem 0;
}

.alphabet-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.35rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.8rem;
    text-decoration: none;
}

.alphabet-link.disabled {
    opacity: 0.3;
    pointer-events: none;
}

.letter-group {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.letter-heading {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent);
    border-bottom: 2px solid var(--accent);
    padding: 0.2rem 1.5rem;
    margin-top: 0;
    scroll-margin-top: 5rem;
}

.coupon-store {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.4rem 1.5rem;
    box-shadow: var(--shadow-sm);
}

.coupon-store-head {
    margin-bottom: 1.1rem;
}

.coupon-store-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.coupon-store-logo,
.coupon-store-badge {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 0.75rem;
    background: #fff;
    border: 1px solid var(--border-color);
    padding: 0.5rem;
}

.coupon-store-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-indigo));
    padding: 0;
}

.coupon-store-title h2 {
    margin: 0 0 0.1rem;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
}

.coupon-store-title a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent-blue);
    text-decoration: none;
}

.coupon-store-title a:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.coupon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.85rem;
}

.coupon-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 1.1rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 0.85rem;
    border-top: 3px solid var(--accent-blue);
}

.coupon-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.coupon-discount {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--accent-blue);
}

.coupon-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    border: none;
    border-radius: 0.55rem;
    background: var(--accent-blue);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

.coupon-copy-btn:hover {
    background: var(--accent-indigo);
    transform: translateY(-1px);
}

.coupon-copy-btn.coupon-copied {
    background: var(--success, #16a34a);
}

.coupon-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: 0.5rem;
    padding: 0.4rem 0.6rem;
    text-align: center;
    user-select: all;
}

.coupon-desc {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.coupon-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 0.25rem;
}

.coupon-valid {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent-amber);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.coupon-source {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.coupon-empty {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.9rem 1rem;
    background: var(--bg-input);
    border: 1px dashed var(--border-color);
    border-radius: 0.75rem;
}

.coupon-empty p {
    margin: 0;
    font-size: 0.84rem;
    color: var(--text-secondary);
}

.coupon-empty p i {
    color: var(--accent-amber);
    margin-right: 0.3rem;
}

.coupon-empty-btn {
    padding: 0.4rem 0.9rem;
    font-size: 0.8rem;
    border-radius: 0.55rem;
}

.coupon-note {
    max-width: 1000px;
    margin: 1.5rem auto 0;
    padding: 0.9rem 1.1rem;
    background: var(--bg-card-hover);
    border: 1px solid var(--border-color);
    border-radius: 0.8rem;
    color: #fff;
    font-weight: 600;
}

.coupon-note p {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--text-muted);
    text-align: center;
}

.coupon-note p i {
    color: var(--accent-blue);
    margin-right: 0.3rem;
}

/* Cupom row inside listing cards (home) and store card (product page) */
.coupon-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.coupon-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.7rem;
    border-radius: 0.5rem;
    background: var(--accent-blue-light);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: transform 0.1s ease, opacity 0.2s ease;
}

.coupon-chip:hover {
    transform: translateY(-1px);
    opacity: 0.94;
}

.coupon-chip .coupon-chip-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: 0.04em;
}

.coupon-chip.coupon-copied {
    background: var(--success, #16a34a);
}

.coupon-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-blue);
    text-decoration: none;
}

.coupon-link:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Dark theme: themed store logos – JS swaps src to _dark variant */

@media (max-width: 640px) {
    .coupon-hero {
        padding: 2.25rem 1rem;
    }

    .coupon-hero h1 {
        font-size: 1.6rem;
    }

    .coupon-section {
        padding: 1.5rem 0.75rem 2rem;
    }

    .coupon-store {
        padding: 1.1rem 1rem;
    }

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


/* Oculta badge do Netlify (visível no preview) */
#netlify-badge,
.netlify-badge,
.nl-badge,
a[href*="netlify.com"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    position: absolute !important;
    left: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* ==========================================
   INSTALAR APP (PWA) - folha de instrucoes
   ========================================== */

.install-sheet-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: install-sheet-fade 0.2s ease;
}

.install-sheet {
    position: relative;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 1.5rem 1.25rem 1.25rem;
    max-width: 380px;
    width: 100%;
    text-align: left;
    animation: install-sheet-rise 0.22s ease;
}

.install-sheet h3 {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-emerald);
}

.install-sheet p {
    margin: 0 0 0.75rem;
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.install-steps {
    margin: 0 0 0.5rem;
    padding-left: 1.25rem;
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--text-primary);
}

.install-steps li {
    margin-bottom: 0.4rem;
}

.install-sheet-note {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

.install-sheet-close {
    position: absolute;
    top: 0.5rem;
    right: 0.6rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    border-radius: 8px;
}

.install-sheet-close:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

@keyframes install-sheet-fade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes install-sheet-rise {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

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

@media (max-width: 640px) {
    .install-sheet {
        max-width: 100%;
        padding: 1.25rem 1rem 1rem;
    }

    .install-sheet h3 {
        font-size: 0.98rem;
    }

    .install-sheet p,
    .install-steps {
        font-size: 0.85rem;
    }
}

/* App instalada: nao ha header de navegador, entao a app ganha o respiro
   que a barra de enderecas ocupava. */
@media (display-mode: standalone) {
    .top-header {
        padding-top: max(0.6rem, env(safe-area-inset-top));
    }

    /* A tela de carregamento e do app: so aqui ela existe. No site o
       display:none de base mantem a primeira pintura direto no conteudo. */
    .app-splash {
        display: flex;
    }

    /* Instalado nao ha mais o que instalar: o botao de instalar da lugar para o
       de compartilhar, que abre a janela nativa do sistema. A troca e feita
       aqui, e nao em JS, para o header nunca piscar os dois botoes. */
    .btn-install-header {
        display: none;
    }

    .btn-share-header {
        display: flex;
    }
}

/* ==========================================
   TELA DE CARREGAMENTO (SPLASH) - SO NO APP
   ========================================== */

/* Primeira pintura do app instalado. No site a splash nem aparece: o
   display:none de base e o @media display-mode: standalone, mais abaixo, que
   liga a tela. O site abre direto no conteudo, que e o que se espera de uma
   pagina normal. */
.app-splash {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    overflow: hidden;
    /* Azul da marca como padrao, igual o gradiente do cabecalho. */
    background: linear-gradient(180deg, #2757da 0%, #1f4bcc 45%, #1a40b0 100%);
    transition: opacity 0.28s ease;
}

/* Modo escuro escolhido dentro do app: a splash abre com a cor de fundo
   escura do tema, e nao mais com o azul. O <head> aplica o data-theme a
   partir do tema salvo antes da primeira renderizacao, entao ja entra escura
   na primeira pintura, sem flash azul. */
[data-theme="dark"] .app-splash {
    background: var(--bg-primary);
}

.app-splash-hide {
    opacity: 0;
    pointer-events: none;
}

/* O icone da marca e verde com check branco: os dois tons funcionam sobre o
   azul e sobre o fundo escuro, por isso ele nao precisa de painel nenhum. */
.app-splash-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.app-splash-icon {
    display: block;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    filter: drop-shadow(0 4px 16px rgba(0, 8, 40, 0.45));
}

/* Mesmo desenho do wordmark do logo.png: Plus Jakarta Sans 800, tracking
   fechado, "Busca" em branco e "Certa" no verde da marca. */
.app-splash-name {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 8, 40, 0.3);
}

.app-splash-name-alt {
    color: #53c601;
}




@media (max-width: 360px) {
    .app-splash-icon {
        width: 110px;
        height: 110px;
    }

    .app-splash-name {
        font-size: 2.2rem;
    }
}