/* =====================================================
   AÚNIKA GUIA — Frontend CSS
   ===================================================== */
:root {
    --aunika-primary:   #1a1a2e;
    --aunika-accent:    #e07b00;
    --aunika-wa:        #25d366;
    --aunika-wa-dark:   #128c7e;
    --aunika-radius:    12px;
    --aunika-shadow:    0 2px 12px rgba(0,0,0,.08);
}

.aunika-wrap { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: #333; }

/* ── Hero / Busca ── */
.aunika-hero {
    background: var(--aunika-primary);
    padding: 32px 20px;
    border-radius: var(--aunika-radius);
    margin-bottom: 24px;
}
.aunika-search-box {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 860px;
    margin: 0 auto;
}
.aunika-input-wrap {
    flex: 2;
    min-width: 240px;
    position: relative;
}
.aunika-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    pointer-events: none;
}
#aunika-input {
    width: 100%;
    padding: 13px 14px 13px 44px;
    font-size: 16px;
    border: none;
    border-radius: 10px;
    outline: none;
    box-sizing: border-box;
}
.aunika-search-box select {
    flex: 1;
    min-width: 160px;
    padding: 13px 14px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    background: rgba(255,255,255,.15);
    color: #fff;
    outline: none;
    cursor: pointer;
}
.aunika-search-box select option { color: #333; background: #fff; }
#aunika-btn-buscar {
    background: var(--aunika-accent);
    color: #fff;
    border: none;
    padding: 13px 28px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
    white-space: nowrap;
}
#aunika-btn-buscar:hover { background: #c46900; }

/* Autocomplete */
.aunika-autocomplete {
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,.15);
    z-index: 999;
    overflow: hidden;
}
.aunika-ac-item {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #f0f0f0;
    transition: background .15s;
}
.aunika-ac-item:hover { background: #f5f7fa; }
.aunika-ac-item:last-child { border-bottom: none; }

/* Status bar */
.aunika-status {
    color: #666;
    font-size: 13px;
    margin-bottom: 12px;
    padding: 6px 4px;
}

/* ── Grid ── */
.aunika-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
}

/* ── Card ── */
.aunika-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: var(--aunika-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s, transform .2s;
    position: relative;
}
.aunika-card:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,.12);
    transform: translateY(-3px);
}
.aunika-card--destaque {
    border: 2px solid var(--aunika-accent);
    box-shadow: 0 4px 20px rgba(224,123,0,.15);
}
.aunika-badge {
    position: absolute;
    top: 10px; right: 10px;
    background: var(--aunika-accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    letter-spacing: .3px;
    z-index: 2;
}

/* Imagem */
.aunika-card-img {
    width: 100%;
    height: 150px;
    background-size: cover;
    background-position: center;
    background-color: #f0f0f0;
}
.aunika-card-img--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: #ccc;
}

/* Corpo */
.aunika-card-body { padding: 14px 16px; flex: 1; }
.aunika-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 6px; }
.aunika-card-nome { margin: 0; font-size: 16px; font-weight: 700; color: var(--aunika-primary); line-height: 1.3; }
.aunika-card-meta { color: #888; font-size: 12px; margin: 2px 0 0; }
.aunika-card-desc {
    font-size: 13px; color: #555; margin: 6px 0 8px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.aunika-info { font-size: 13px; color: #666; margin: 4px 0; }
.aunika-info--main { }

/* Engrenagem */
.aunika-btn-engrenagem {
    background: none; border: none; font-size: 18px; cursor: pointer;
    opacity: .4; transition: opacity .2s; padding: 2px; flex-shrink: 0;
}
.aunika-btn-engrenagem:hover { opacity: 1; }

/* Oferta relâmpago */
.aunika-oferta {
    background: linear-gradient(135deg, #ff4e00, #ec9f05);
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 700;
    gap: 8px;
    flex-wrap: wrap;
}
.aunika-countdown { font-size: 11px; opacity: .9; white-space: nowrap; }

/* Botões de ação */
.aunika-card-btns {
    padding: 10px 14px 14px;
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    border-top: 1px solid #f0f0f0;
}
.aunika-btn {
    flex: 1;
    min-width: 80px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    text-decoration: none !important;
    transition: background .2s, transform .1s;
    display: inline-block;
    white-space: nowrap;
    cursor: pointer;
}
.aunika-btn:hover { transform: scale(1.03); }
.aunika-btn--wa   { background: var(--aunika-wa); color: #fff !important; }
.aunika-btn--wa:hover { background: var(--aunika-wa-dark); }
.aunika-btn--site { background: #e8f0fe; color: #2271b1 !important; }
.aunika-btn--site:hover { background: #d0e2fc; }
.aunika-btn--tel  { background: #f0f0f0; color: #333 !important; }
.aunika-btn--tel:hover { background: #e0e0e0; }
.aunika-btn--ig   { background: #fce8f3; color: #be185d !important; }
.aunika-btn--ig:hover { background: #fbcfe8; }

/* ── Modal ── */
.aunika-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 99999;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    animation: aunikaFadeIn .15s ease;
}
@keyframes aunikaFadeIn { from{opacity:0} to{opacity:1} }
.aunika-modal {
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    width: 100%; max-width: 460px;
    box-shadow: 0 24px 64px rgba(0,0,0,.2);
    animation: aunikaSlideUp .2s ease;
}
@keyframes aunikaSlideUp { from{transform:translateY(16px);opacity:0} to{transform:translateY(0);opacity:1} }
.aunika-modal h3 { margin: 0 0 6px; font-size: 18px; color: var(--aunika-primary); }
.aunika-modal p  { font-size: 13px; color: #666; margin-bottom: 16px; }
.aunika-modal-input {
    width: 100%; padding: 10px 14px; border: 1px solid #ddd;
    border-radius: 8px; font-size: 14px; margin-bottom: 10px; box-sizing: border-box;
}
.aunika-modal-input:focus { outline: none; border-color: var(--aunika-primary); }
.aunika-modal textarea.aunika-modal-input { resize: vertical; }
.aunika-modal-btns { display: flex; gap: 10px; margin-top: 4px; }
.aunika-modal-ok {
    flex: 1; background: var(--aunika-primary); color: #fff;
    border: none; padding: 12px; border-radius: 8px;
    font-size: 15px; font-weight: 700; cursor: pointer;
}
.aunika-modal-cancel {
    background: #f0f0f0; border: none; padding: 12px 18px;
    border-radius: 8px; font-size: 14px; cursor: pointer; color: #555;
}
.aunika-modal-feedback { margin-top: 10px; font-size: 13px; color: #00a32a; }

/* ── Widget WA fixo ── */
.aunika-widget-wa {
    position: fixed; bottom: 28px; right: 24px; z-index: 9998;
}
#aunika-widget-toggle {
    background: var(--aunika-wa);
    color: #fff;
    border: none;
    padding: 12px 18px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 20px rgba(37,211,102,.4);
    transition: background .2s, transform .2s;
}
#aunika-widget-toggle:hover { background: var(--aunika-wa-dark); transform: scale(1.04); }
#aunika-widget-toggle svg { flex-shrink: 0; }
.aunika-widget-form {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    width: 300px;
    box-shadow: 0 16px 48px rgba(0,0,0,.18);
    margin-bottom: 12px;
    animation: aunikaSlideUp .2s ease;
}
.aunika-widget-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 8px;
}
.aunika-widget-header button { background: none; border: none; cursor: pointer; color: #999; font-size: 18px; padding: 0; }
.aunika-widget-form p { font-size: 13px; color: #666; margin-bottom: 12px; }
.aunika-widget-input {
    width: 100%; padding: 9px 12px; border: 1px solid #e0e0e0;
    border-radius: 8px; font-size: 13px; margin-bottom: 8px; box-sizing: border-box;
}
.aunika-widget-btn {
    width: 100%; background: var(--aunika-wa); color: #fff;
    border: none; padding: 11px; border-radius: 8px; font-size: 14px;
    font-weight: 700; cursor: pointer;
}

/* Loading */
.aunika-loading { text-align: center; padding: 32px; color: #888; font-size: 14px; }
.aunika-spinner {
    display: inline-block; width: 24px; height: 24px;
    border: 3px solid #e0e0e0; border-top-color: var(--aunika-primary);
    border-radius: 50%; animation: aunikaSpin .7s linear infinite;
    vertical-align: middle; margin-right: 8px;
}
@keyframes aunikaSpin { to{transform:rotate(360deg)} }
.aunika-ver-mais-wrap { text-align: center; margin-top: 24px; }
#aunika-ver-mais {
    background: var(--aunika-primary); color: #fff;
    border: none; padding: 12px 32px; border-radius: 8px;
    font-size: 15px; cursor: pointer; transition: background .2s;
}
#aunika-ver-mais:hover { background: #16213e; }

/* Vazio */
.aunika-vazio { text-align: center; padding: 48px 20px; color: #999; }
.aunika-vazio p { font-size: 15px; margin-bottom: 8px; }
.aunika-link-sugestao { color: #2271b1; }

/* Responsivo */
@media (max-width: 640px) {
    .aunika-hero { padding: 20px 14px; }
    .aunika-search-box { flex-direction: column; }
    .aunika-search-box select, #aunika-btn-buscar { width: 100%; }
    .aunika-grid { grid-template-columns: 1fr; }
    .aunika-card-btns { flex-direction: column; }
    .aunika-btn { min-width: unset; }
    .aunika-widget-form { width: 260px; }
}
