/* ===== RESET & BASE ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
    background: #f5f5f8; /* Fundo claro */
    color: #222;
    min-height: 100vh;
}

a {
    color: #d60000;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* ===== TOPBAR ===== */
.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #ffffff;
    border-bottom: 1px solid #e2e2e2;
    padding: 0.7rem 0;
}

.topbar-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 1rem;

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.logo-img {
    width: 80px;
    height: 40px;
    object-fit: contain;
    background: white;
}

.brand-text strong {
    font-size: 1.1rem;
    font-weight: 700;
}

.brand-text small {
    color: #777;
    font-size: 0.8rem;
}

/* ===== NAVIGATION ===== */
.topnav {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.topnav a {
    padding: 0.45rem 0.8rem;
    border-radius: 6px;
    font-weight: 600;
    color: #d60000;
}

.topnav a:hover {
    background: #ffe3e3;
}

.topnav-user {
    font-size: 0.9rem;
    color: #444;
}

.btn-outline {
    border: 1px solid #d60000;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    color: #d60000 !important;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1180px;
    margin: 1.8rem auto;
    padding: 0 1rem;
}

/* ===== GRID MARKETPLACE ===== */
.grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.2rem;
}

.card {
    width: 260px;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e7e7e7;
    box-shadow: 0px 3px 12px rgba(0,0,0,0.07);

    display: flex;
    flex-direction: column;
}

/* Foto quadrada */
.card-img-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
    position: relative;
    overflow: hidden;
    background: #ddd;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Slider - setinhas transparentes */
.gallery-prev,
.gallery-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    width: auto;
    height: auto;
    cursor: pointer;
    font-size: 26px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 0 5px rgba(0,0,0,0.7);
}

.gallery-prev { left: 10px; }
.gallery-next { right: 10px; }

.gallery-prev:hover,
.gallery-next:hover {
    transform: translateY(-50%) scale(1.1);
}

/* ===== CARD INFORMATION ===== */
.card-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.badge {
    display: inline-block;
    background: #d60000;
    color: white;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    margin-bottom: 0.4rem;
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
}

.card-meta {
    font-size: 0.83rem;
    color: #555;
    margin-top: 0.5rem;
    line-height: 1.3rem;
}

.card-price {
    margin-top: 0.75rem;
    margin-bottom: 0.4rem;
    font-weight: 800;
    font-size: 1.1rem;
    color: #111;
}

/* ===== BUTTONS ===== */
.btn {
    border: none;
    border-radius: 8px;
    padding: 0.6rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
}

.btn-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;

    background: #25d366;
    color: #ffffff;
    width: 100%;

    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.35);
    border: none;

    margin-top: auto; /* cola o botão no fundo do card */
}

.btn-whatsapp::before {
    content: "💬";
    margin-right: 0.4rem;
    font-size: 1rem;
}

.btn-whatsapp:hover {
    filter: brightness(1.05);
    box-shadow: 0 6px 14px rgba(37, 211, 102, 0.5);
}

.btn-primary {
    background: #d60000;
    color: white;
}

.btn-sm {
    padding: 0.4rem 0.6rem;
}

/* ===== FORMS ===== */
.form-card {
    max-width: 480px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #ddd;
    box-shadow: 0px 3px 12px rgba(0,0,0,0.06);
    padding: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.8rem;
}

.form-group label {
    font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
    margin-top: 0.3rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 0.55rem;
    font-size: 0.95rem;
}

.form-group small {
    font-size: 0.75rem;
    color: #777;
}

.alert {
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.alert-error {
    background: #ffe5e5;
    border: 1px solid #f55;
    color: #900;
}

.alert-success {
    background: #e5ffe9;
    border: 1px solid #37c269;
    color: #1f6f34;
}

/* ===== TABLE (ADMIN) ===== */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.table th, .table td {
    padding: 0.6rem;
    border-bottom: 1px solid #e3e3e3;
}

.table th {
    background: #fafafa;
    font-weight: 700;
    color: #444;
}

/* ===== FOOTER ===== */
.footer {
    text-align: center;
    padding: 1rem;
    color: #666;
    font-size: 0.85rem;
    margin-top: 2rem;
}

/* ===== LIGHTBOX / ZOOM ===== */
.lightbox {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.lightbox.open {
    display: flex;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.7);
}

.lightbox-content {
    position: relative;
    z-index: 51;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.6);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 32px;
    font-weight: 700;
    cursor: pointer;
    text-shadow: 0 0 6px rgba(0,0,0,0.8);
}

.lightbox-close {
    top: 10px;
    right: 18px;
}

.lightbox-prev {
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
}

/* ===== MOBILE ===== */
@media (max-width: 600px) {

    .topnav {
        gap: 0.6rem;
    }

    .card {
        width: 45%;
        min-width: 160px;
    }
}

/* ===== DASHBOARD CARDS & FILTROS ===== */

.dashboard-header {
    margin-bottom: 1.5rem;
}

.dashboard-header h1 {
    font-size: 1.6rem;
    margin-bottom: 0.2rem;
}

.dashboard-header p {
    font-size: 0.9rem;
    color: #777;
}

/* cards de estatística */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e3e3e3;
    padding: 0.9rem 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.stat-label {
    font-size: 0.8rem;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stat-value {
    font-size: 1.4rem;
    font-weight: 800;
    margin-top: 0.15rem;
    color: #111;
}

.stat-sub {
    font-size: 0.75rem;
    color: #999;
    margin-top: 0.2rem;
}

/* filtros do ranking */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin: 1rem 0 0.75rem;
}

.filters label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #555;
}

.filters select {
    border-radius: 999px;
    border: 1px solid #ccc;
    padding: 0.35rem 0.8rem;
    font-size: 0.85rem;
    background: #fff;
}

