/* wwwroot/css/GBL/site.css */

/* ── FONTE ─────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:wght@300;400;500&display=swap');

body {
    font-family: 'DM Sans', sans-serif;
    background: #0e0e0f;
    color: #e8e4dc;
}

/* ── HEADER ────────────────────── */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 0rem;
    padding-bottom: 0.75rem;
    position: relative;
}

    .page-header::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: calc(-50vw + 50%); /* ← estica para fora do container */
        right: calc(-50vw + 50%);
        height: 1px;
        background: #222;
    }

.page-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 3rem;
    letter-spacing: 3px;
    color: #fff;
    line-height: 1;
    margin: 0 0 2px 0;
    padding: 0;
}

    .page-title span {
        color: #c9a84c;
    }

.page-count {
    font-size: 13px;
    color: #666;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 0;
    padding: 0;
    line-height: 1;
}

/* ── BUSCA ─────────────────────── */
.search-form {
    display: flex;
    gap: 8px;
    margin-bottom: 2rem;
}

.search-input {
    flex: 1;
    background: #161618;
    border: 1px solid #2a2a2c;
    color: #e8e4dc;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
}

    .search-input:focus {
        border-color: #c9a84c;
    }

.btn-search {
    background: #c9a84c;
    color: #0e0e0f;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
}

.btn-clear {
    background: transparent;
    color: #666;
    border: 1px solid #2a2a2c;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 13px;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.btn-primary {
    background: transparent;
    color: #c9a84c;
    border: 1px solid #c9a84c;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 13px;
    text-decoration: none;
}

.btn-browse {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 16px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 7px;
    border: 1px solid #333;
    background: #1a1a1a;
    color: #999;
    cursor: pointer;
    font-family: 'DM Mono', monospace;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
    height: 100%; /* ocupa a mesma altura do span ao lado */
}

.btn-icon-placeholder {
    display: inline-flex;
    width: var(--btn-icon-size, 2rem);
    height: var(--btn-icon-size, 2rem);
    pointer-events: none;
    visibility: hidden;
}

/* ── GRID ──────────────────────── */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

/* ── CARD ──────────────────────── */
.card {
    background: #161618;
    border: 2px solid transparent;
    border-radius: 12px;
    overflow: visible;
    transition: border-color 0.2s, transform 0.2s;
    position: relative;
}

    .card:hover {
        border-color: #c9a84c44;
        transform: translateY(-2px);
    }

.card-header-strip {
    height: 3px;
}

.strip-active {
    background: #c9a84c;
}

.strip-inactive {
    background: #444;
}

.strip-default {
    background: #333;
}

.card-body {
    padding: 16px;
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.card-itemCode {
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #c9a84c;
    background: #c9a84c15;
    padding: 3px 8px;
    border-radius: 4px;
}

.card-modelo {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.4rem;
    letter-spacing: 1.5px;
    color: #fff;
    margin: 0 0 2px;
    line-height: 1.1;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-brands {
    font-size: 12px;
    color: #666;
    margin-bottom: 12px;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
    min-height: 24px;
}

.tag {
    font-size: 11px;
    background: #1e1e20;
    border: 1px solid #2a2a2c;
    color: #999;
    padding: 3px 8px;
    border-radius: 20px;
}

.tag-colors {
    border-color: #c9a84c44;
    color: #c9a84c;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #1e1e20;
}

.card-valor {
    font-size: 15px;
    font-weight: 500;
    color: #e8e4dc;
}

    .card-valor small {
        font-size: 11px;
        color: #666;
        margin-left: 4px;
    }

.card-actions {
    display: flex;
    gap: 6px;
}

.card-image {
    margin-bottom: 14px;
    border-radius: 8px;
    overflow: hidden;
}

    .card-image img {
        width: 100%;
        height: auto;
        display: block;
        border-radius: 8px;
    }

.card-ranking {
    display: flex;
    align-items: center;
    gap: 6px;
}

.user-stars {
    color: gold;
    font-size: 0.75rem;
    font-weight: 600;
}

.rating-separator {
    width: 2px;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.2);
}

.community-stars {
    color: #E8A33D;
    font-size: 0.8rem;
    opacity: 0.85;
}

.card-community-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

    .card-community-rating .community-stars {
        color: #666;
        font-size: 12px;
        letter-spacing: 1px;
    }

    .card-community-rating .community-label {
        font-size: 10px;
        color: #555;
        text-transform: uppercase;
        letter-spacing: 1px;
    }


/* ── BUTTON ──────────────────────── */

.btn-icon {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: 1px solid #2a2a2c;
    background: transparent;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    text-decoration: none;
    line-height: 30px;
    text-align: center;
}

    .btn-icon:hover {
        background: #1e1e20;
        color: #e8e4dc;
        border-color: #444;
    }

.btn-icon-del:hover {
    color: #e24b4a;
    border-color: #e24b4a44;
    background: #e24b4a11;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex: 1;
    min-height: calc(100vh - 60px - 120px);
    gap: 8px;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 8px;
}

.empty-state h3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    letter-spacing: 2px;
    color: #fff;
    margin: 0;
}

.empty-state p {
    font-size: 13px;
    color: #666;
    letter-spacing: 1px;
    margin: 0;
}

.global-alert {
    position: fixed;
    top: 90px;
    right: 20px;
    min-width: 300px;
    max-width: 400px;
    padding: 14px 18px;
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,.15);
    z-index: 9999;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideIn .25s ease;
}

    .global-alert.success {
        background: #22c55e;
    }

    .global-alert.error {
        background: #ef4444;
    }

    .global-alert.warning {
        background: #f59e0b;
    }

    .global-alert.info {
        background: #3b82f6;
    }

.close-alert {
    margin-left: 15px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
}

@keyframes slideIn {
    from {
        transform: translateX(120%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.global-alert {
    transition: opacity .2s ease, transform .2s ease;
}

    .global-alert.hide {
        opacity: 0;
        transform: translateX(20px);
    }

/* ── Botão IA ───────────────────────────────────── */
.navbar-ai-btn {
    background: #c9a84c15;
    border-color: #c9a84c44;
    color: #c9a84c;
    position: relative;
}

    .navbar-ai-btn:hover {
        background: #c9a84c22;
        border-color: #c9a84c;
        color: #c9a84c;
    }

    /* pulso sutil para chamar atenção */
    .navbar-ai-btn::after {
        content: '';
        position: absolute;
        inset: -2px;
        border-radius: 50%;
        border: 1px solid #c9a84c44;
        animation: ai-pulse 2.5s ease-in-out infinite;
    }

@keyframes ai-pulse {
    0%, 100% {
        opacity: 0.4;
        transform: scale(1);
    }

    50% {
        opacity: 0;
        transform: scale(1.25);
    }
}

/* badge Qtd de Compras */
.purchase-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.purchase-badge {
    position: absolute;
    top: -21px;                     /* mais alto */
    left: 50%;                      /* centraliza horizontalmente */
    transform: translateX(-50%);
    right: auto;                    /* remove o right anterior */
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background-color: #22c55e;      /* verde */
    color: #000000;                 /* branco */
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    z-index: 10;
}

.collection-badge {
    position: absolute;
    top: -10px;
    right: 16px;
    padding: 3px 12px;
    background-color: #333;
    color: white;
    font-size: 0.6rem;
    font-weight: 500;
    border-radius: 16px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
}
