:root {
    --brand: #ffc107;
    --brand-600: #ffb300;
    --bg: #ffffff;
    --text: #212121;
    --muted: #666;
    --card: #ffffff;
    --border: #eee;
    --success: #2e7d32;
    --danger: #c62828;
    --shadow: 0 6px 20px rgba(0,0,0,.08);
    --radius: 18px;
    --radius-sm: 12px;
    --maxw: 1200px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
    background: var(--bg);
    color: var(--text);
    font: 400 16px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, "Helvetica Neue", Arial;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
    max-width: var(--maxw);
    margin-inline: auto;
    padding: 16px;
}

/* Header */
header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    backdrop-filter: saturate(180%) blur(8px);
}

.topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.logo-badge {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: var(--brand);
    display: grid;
    place-items: center;
    box-shadow: var(--shadow);
}

.brand {
    display: flex;
    flex-direction: column;
}

.brand .name { font-size: 18px; letter-spacing: .2px; }
.brand .city { font-size: 12px; color: var(--muted); }

.searchbar {
    display: flex;
    gap: 8px;
    padding: 8px 16px;
}

.searchbar input {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 12px 14px 12px 42px;
    background: #fff url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2224%22 height=%2224%22 fill=%22none%22 stroke=%22%23666%22 stroke-width=%221.5%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2211%22 cy=%2211%22 r=%227%22/%3E%3Cpath d=%22M21 21l-4.3-4.3%22/%3E%3C/svg%3E') no-repeat 12px center;
    background-size: 20px;
}

.searchbar button {
    border: none;
    background: var(--brand);
    color: #000;
    font-weight: 700;
    border-radius: 999px;
    padding: 12px 16px;
    box-shadow: var(--shadow);
}

/* Category chips */
.chips {
    display: flex;
    gap: 8px;
    overflow: auto;
    padding: 0 16px 10px;
}

.chip {
    flex: 0 0 auto;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 600;
    cursor: pointer;
}

.chip.active, .chip:hover {
    border-color: var(--brand);
    box-shadow: 0 0 0 2px rgba(255,193,7,.25);
}

/* Grids & cards */
.grid {
    display: grid;
    gap: 12px;
    padding: 12px 16px;
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 640px) {
    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
    .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-media {
    height: 140px;
    background: #fff7d1;
    display: grid;
    place-items: center;
    position: relative;
}

.card-body { padding: 12px; }
.title { font-weight: 800; }
.meta { font-size: 13px; color: var(--muted); }

.pill {
    display: inline-block;
    background: #fff3bf;
    border: 1px solid #ffe083;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 12px;
    margin-right: 6px;
}

.actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.btn {
    flex: 1;
    border: none;
    border-radius: 12px;
    padding: 10px 12px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
}

.btn.primary { background: var(--brand); }
.btn.outline { background: #fff; border: 1px solid var(--border); }

/* Tabs / Bottom nav */
nav.bottom {
    position: sticky;
    bottom: 0;
    background: #fff;
    border-top: 1px solid var(--border);
    z-index: 50;
}

.tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 6px;
}

.tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 12px;
    font-size: 12px;
    color: #000;
    cursor: pointer;
}

.tab.active { background: #fff7d1; border: 1px solid #ffe083; }

/* Sections */
section[hidden] { display: none; }

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
}

.section-title h2 { margin: 6px 0; }
.subtle { color: var(--muted); font-size: 14px; }

/* Forms */
form { display: grid; gap: 10px; }
label { font-weight: 700; }

input, select, textarea {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    width: 100%;
}

textarea { min-height: 100px; resize: vertical; }

.notice {
    background: #fff7d1;
    border: 1px dashed #ffe083;
    border-radius: 12px;
    padding: 12px;
    margin: 10px 0;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    display: none;
    align-items: flex-end;
    z-index: 200;
}

.modal.open { display: flex; }

.sheet {
    background: #fff;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    width: 100%;
    max-height: 80vh;
    overflow: auto;
    box-shadow: var(--shadow);
    padding: 16px;
}

.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.gallery img {
    width: 100px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #ddd;
    cursor: pointer;
}

/* Utility */
.row { display: flex; gap: 8px; align-items: center; }
.space { height: 10px; }
.center { text-align: center; }
.mt-1 { margin-top: 6px; }
.mt-2 { margin-top: 12px; }
.mt-3 { margin-top: 18px; }
.mt-4 { margin-top: 24px; }

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 500;
}

.lightbox.open { display: flex; }
.lightbox img { max-width: 90%; max-height: 90%; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,.6); }

.lb-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,.5);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 18px;
    line-height: 40px;
    text-align: center;
}

.lb-btn.prev { left: 20px; }
.lb-btn.next { right: 20px; }

/* Contact section styles */
.contact-section { padding: 28px 16px; background: #fff; color: #111; font-family: Arial, Helvetica, sans-serif; }
.contact-container { max-width: 900px; margin: 0 auto; background: #fff; border-radius: 12px; padding: 22px; box-shadow: 0 6px 18px rgba(16,24,40,0.06); }
.contact-container h2 { margin: 0 0 6px; font-size: 1.4rem; color: #111; }
.contact-sub { margin: 0 0 16px; color: #333; }

.contact-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    background: #FFD600;
    color: #111;
    font-weight: 600;
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}

.contact-list a:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 18px rgba(16,24,40,0.12);
    background: #FFC107;
}

.icon { width: 28px; height: 28px; flex: 0 0 28px; fill: #111; }

/* WhatsApp float button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 20px;
    right: 20px;
    background: #25D366;
    color: #fff;
    border-radius: 50%;
    text-align: center;
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .2s ease;
}

.whatsapp-float:hover { transform: scale(1.1); }
.wicon { width: 34px; height: 34px; fill: #fff; }

@media (max-width: 420px) {
    .contact-container { padding: 16px; }
    .icon { width: 22px; height: 22px; }
    .whatsapp-float { width: 52px; height: 52px; }
    .wicon { width: 28px; height: 28px; }
}

.loading { opacity: 0.6; pointer-events: none; }
.error { background: #ffebee; color: #c62828; padding: 10px; border-radius: 8px; margin: 10px 0; }

/* Estilos para preview de imagens */
.image-preview {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.preview-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--border);
}

.gallery-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
}

.gallery-preview-item {
    position: relative;
    width: 80px;
    height: 80px;
}

.gallery-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.remove-image {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Melhorar aparência do card com imagem */
.card-media {
    height: 140px;
    background: #fff7d1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-media .pills-overlay {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}



.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin: 10px 0;
}

.gallery-thumb {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--border);
    cursor: pointer;
    transition: transform 0.2s;
}

.gallery-thumb:hover {
    transform: scale(1.05);
}

/* Galeria de Imagens no Modal */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin: 15px 0;
}

.gallery-thumb {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.gallery-thumb:hover {
    border-color: #ffc107;
    transform: scale(1.05);
}

/* Lightbox melhorado */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.lightbox.open {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

.lightbox-counter {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 14px;
}

.lightbox-caption {
    color: white;
    text-align: center;
    margin-top: 10px;
    font-size: 16px;
}

.lb-btn {
    position: absolute;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    padding: 15px;
    cursor: pointer;
    font-size: 20px;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lb-btn.prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.lb-btn.next {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.lb-btn.close {
    top: 20px;
    right: 20px;
}