/* ================================================
   LOJA CASH - TEMA MODERNO HERO DO WILL
   Atualizado para combinar com o tema do site
   ================================================ */

/* ===== VARIÁVEIS LOCAIS DA LOJA ===== */
.loja-page {
    --loja-primary: var(--primary, #ff6b35);
    --loja-primary-dark: var(--primary-dark, #e55a28);
    --loja-gold: #ffd700;
    --loja-gold-dark: #b8942d;
    --loja-success: #4ade80;
    --loja-danger: #ef4444;
}

/* ================================================
   CONTAINER PRINCIPAL
   ================================================ */
.loja-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Info */
.loja-header-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(145deg, #1a1a2e, #16162a);
    border-radius: 16px;
    border: 1px solid #2d2d3a;
    position: relative;
    overflow: hidden;
}

.loja-header-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--loja-primary), var(--loja-gold), var(--loja-primary));
}

.loja-header-info h2 {
    margin: 0;
    font-size: 1.8em;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
}

.loja-header-info h2 i {
    color: var(--loja-primary);
}

.saldo-box {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 215, 0, 0.1);
    padding: 12px 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.saldo-label {
    color: #8b8b9a;
    font-size: 0.9rem;
}

.saldo-valor {
    color: var(--loja-gold);
    font-weight: 700;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.saldo-valor i {
    animation: rotate-coin 3s linear infinite;
}

@keyframes rotate-coin {
    0%, 100% { transform: rotateY(0deg); }
    50% { transform: rotateY(180deg); }
}

.btn-add-cash {
    padding: 10px 20px;
    background: linear-gradient(90deg, var(--loja-success), #22c55e);
    border: none;
    border-radius: 8px;
    color: #000;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.btn-add-cash:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 222, 128, 0.3);
    color: #000;
}

/* ================================================
   BARRA DE PESQUISA
   ================================================ */
.loja-pesquisa {
    margin-bottom: 25px;
}

.form-pesquisa {
    display: flex;
    gap: 10px;
    max-width: 500px;
}

.input-pesquisa {
    flex: 1;
    padding: 12px 18px;
    background: linear-gradient(145deg, #1a1a2e, #16162a);
    border: 1px solid #2d2d3a;
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-pesquisa:focus {
    outline: none;
    border-color: var(--loja-primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
}

.input-pesquisa::placeholder {
    color: #6b6b7a;
}

/* ================================================
   FILTROS DE CATEGORIA
   ================================================ */
.loja-filtros {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(145deg, #1a1a2e, #16162a);
    border-radius: 14px;
    border: 1px solid #2d2d3a;
}

.loja-filtros .btn {
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.loja-filtros .btn-primario {
    background: linear-gradient(90deg, var(--loja-primary), var(--loja-primary-dark));
    border: none;
    color: #fff;
}

.loja-filtros .btn-secundario {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #2d2d3a;
    color: #a0a0b0;
}

.loja-filtros .btn-secundario:hover {
    background: rgba(255, 107, 53, 0.1);
    border-color: var(--loja-primary);
    color: var(--loja-primary);
}

/* ================================================
   SEÇÕES DA LOJA
   ================================================ */
.loja-secao {
    margin-bottom: 45px;
}

.secao-titulo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #2d2d3a;
    color: #fff;
    font-size: 1.3em;
}

.secao-titulo i {
    color: var(--loja-primary);
    font-size: 1.1em;
}

.secao-titulo.promocao i {
    color: var(--loja-danger);
}

.badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.65em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-vermelho {
    background: linear-gradient(90deg, var(--loja-danger), #dc2626);
    color: #fff;
    animation: pulse-badge 1.5s ease-in-out infinite;
}

.badge-ouro {
    background: linear-gradient(90deg, var(--loja-gold), var(--loja-gold-dark));
    color: #000;
}

.badge-verde {
    background: linear-gradient(90deg, var(--loja-success), #22c55e);
    color: #000;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ================================================
   GRID DE ITENS
   ================================================ */
.loja-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 22px;
}

/* ================================================
   CARD DE ITEM - ESTILO MODERNO
   ================================================ */
.item-card {
    background: linear-gradient(145deg, #1a1a2e, #16162a);
    border: 1px solid #2d2d3a;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.item-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--loja-primary), var(--loja-gold));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.item-card:hover {
    transform: translateY(-8px);
    border-color: var(--loja-primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(255, 107, 53, 0.15);
}

.item-card:hover::before {
    opacity: 1;
}

.item-card.promocao {
    border-color: var(--loja-danger);
}

.item-card.promocao::before {
    opacity: 1;
    background: linear-gradient(90deg, var(--loja-danger), #dc2626);
}

.item-card.novo {
    border-color: var(--loja-success);
}

.item-card.novo::before {
    opacity: 1;
    background: linear-gradient(90deg, var(--loja-success), #22c55e);
}

/* Raridades dos Itens */
.item-card.raridade-lendario {
    border-color: var(--loja-gold);
}

.item-card.raridade-lendario::before {
    opacity: 1;
    background: linear-gradient(90deg, var(--loja-gold), var(--loja-gold-dark), var(--loja-gold));
    background-size: 200% 100%;
    animation: shimmer 2s ease infinite;
}

.item-card.raridade-epico {
    border-color: #a855f7;
}

.item-card.raridade-epico::before {
    opacity: 1;
    background: linear-gradient(90deg, #a855f7, #9333ea);
}

.item-card.raridade-raro {
    border-color: #3b82f6;
}

.item-card.raridade-raro::before {
    opacity: 1;
    background: linear-gradient(90deg, #3b82f6, #2563eb);
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Limitado */
.item-card.limitado {
    border-color: #a855f7;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.2);
}

/* Badges do Item (container) */
.item-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    z-index: 10;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: space-between;
}

/* Badges individuais */
.item-badges .badge {
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.item-badges .badge-verde {
    background: linear-gradient(135deg, var(--loja-success), #22c55e);
    color: #000;
}

.item-badges .badge-vermelho {
    background: linear-gradient(135deg, var(--loja-danger), #dc2626);
    color: #fff;
    animation: pulse-badge 1.5s ease-in-out infinite;
}

.item-badges .badge-roxo {
    background: linear-gradient(135deg, #a855f7, #9333ea);
    color: #fff;
}

.item-badges .badge-azul {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
}

.item-badges .badge-ouro {
    background: linear-gradient(135deg, var(--loja-gold), var(--loja-gold-dark));
    color: #000;
}

/* Badges individuais (singular) para compatibilidade */
.item-badge {
    position: absolute;
    top: 12px;
    z-index: 10;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.item-badge.novo {
    right: 12px;
    background: linear-gradient(135deg, var(--loja-success), #22c55e);
    color: #000;
    box-shadow: 0 4px 12px rgba(74, 222, 128, 0.3);
}

.item-badge.desconto {
    left: 12px;
    background: linear-gradient(135deg, var(--loja-danger), #dc2626);
    color: #fff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    font-size: 0.75rem;
    font-weight: 800;
}

/* Imagem do Item */
.item-imagem {
    height: 160px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, transparent 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.item-imagem::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(transparent, #16162a);
    pointer-events: none;
}

.item-imagem img {
    max-width: 100%;
    max-height: 130px;
    object-fit: contain;
    transition: transform 0.4s ease;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4));
}

.item-card:hover .item-imagem img {
    transform: scale(1.1) translateY(-5px);
}

.item-sem-img {
    font-size: 3.5rem;
    color: #4a4a5a;
}

/* Info do Item */
.item-info {
    padding: 18px;
    padding-bottom: 12px;
}

.item-nome {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 8px 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-descricao {
    font-size: 0.8rem;
    color: #8b8b9a;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.item-quantidade {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--loja-gold);
    z-index: 5;
}

/* Footer do Item */
.item-footer {
    padding: 0 18px 18px;
}

.item-preco {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.preco-original {
    font-size: 0.9rem;
    color: #6b6b7a;
    text-decoration: line-through;
}

.preco-atual {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--loja-gold);
    display: flex;
    align-items: center;
    gap: 6px;
}

.preco-atual i {
    font-size: 1rem;
}

/* Botão Comprar */
.btn-comprar-item,
.btn-comprar,
.item-footer .btn-primario {
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(90deg, var(--loja-primary), var(--loja-primary-dark));
    border: none;
    border-radius: 10px;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.btn-comprar-item::before,
.btn-comprar::before,
.item-footer .btn-primario::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.btn-comprar-item:hover,
.btn-comprar:hover,
.item-footer .btn-primario:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.35);
    color: #fff;
}

.btn-comprar-item:hover::before,
.btn-comprar:hover::before,
.item-footer .btn-primario:hover::before {
    left: 100%;
}

.btn-comprar-item:disabled,
.btn-comprar:disabled,
.item-footer .btn:disabled {
    background: #3a3a4a;
    color: #6b6b7a;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-comprar-item:disabled::before,
.btn-comprar:disabled::before {
    display: none;
}

/* Estoque Restante */
.item-estoque {
    display: block;
    margin-top: 8px;
    padding: 6px 10px;
    background: rgba(239, 68, 68, 0.15);
    border-radius: 6px;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--loja-danger);
}

/* Botão Esgotado */
.item-footer .btn-secundario[disabled] {
    width: 100%;
    background: rgba(100, 100, 100, 0.2);
    border: 1px solid #3a3a4a;
    color: #6b6b7a;
}

/* ================================================
   MODAL DE COMPRA - ESTILO MODERNO
   ================================================ */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-conteudo {
    background: linear-gradient(145deg, #1a1a2e, #12121a);
    border: 2px solid #2d2d3a;
    border-radius: 20px;
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    animation: modal-slide-in 0.3s ease;
}

@keyframes modal-slide-in {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 25px;
    border-bottom: 1px solid #2d2d3a;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2em;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header h3 i {
    color: var(--loja-primary);
}

.modal-fechar {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #2d2d3a;
    border-radius: 10px;
    color: #8b8b9a;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-fechar:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: var(--loja-danger);
    color: var(--loja-danger);
}

.modal-body {
    padding: 25px;
}

.modal-item-preview {
    display: flex;
    gap: 18px;
    margin-bottom: 22px;
    padding-bottom: 22px;
    border-bottom: 1px solid #2d2d3a;
}

.modal-item-img {
    width: 85px;
    height: 85px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.modal-item-img img {
    max-width: 70px;
    max-height: 70px;
    object-fit: contain;
}

.modal-item-info h4 {
    font-size: 1.1em;
    color: #fff;
    margin: 0 0 10px 0;
}

.modal-item-preco {
    font-size: 1.4em;
    color: var(--loja-gold);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-grupo {
    margin-bottom: 18px;
}

.form-grupo label {
    display: block;
    font-size: 0.85em;
    color: #8b8b9a;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-controle {
    width: 100%;
    padding: 12px 14px;
    background: #0d0d15;
    border: 1px solid #2d2d3a;
    border-radius: 10px;
    color: #fff;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-controle:focus {
    outline: none;
    border-color: var(--loja-primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
}

.form-hint {
    font-size: 0.8em;
    color: #f59e0b;
    margin-top: 6px;
}

.quantidade-controle {
    display: flex;
    align-items: center;
    gap: 12px;
}

.quantidade-controle input {
    width: 80px;
    text-align: center;
    font-weight: 600;
    font-size: 1.1em;
}

.quantidade-controle .btn {
    width: 42px;
    height: 42px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
}

.modal-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 18px;
    background: rgba(255, 215, 0, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.15);
    border-radius: 12px;
    margin-top: 20px;
}

.modal-total span:first-child {
    font-size: 0.95em;
    color: #8b8b9a;
}

.modal-total .total-valor {
    font-size: 1.5em;
    color: var(--loja-gold);
    font-weight: 700;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #2d2d3a;
    display: flex;
    gap: 12px;
}

.modal-footer .btn {
    flex: 1;
    padding: 14px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secundario {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #2d2d3a;
    color: #8b8b9a;
}

.btn-secundario:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.btn-primario {
    background: linear-gradient(90deg, var(--loja-primary), var(--loja-primary-dark));
    border: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primario:hover {
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.35);
    transform: translateY(-2px);
}

/* ================================================
   ESTADO VAZIO
   ================================================ */
.sem-dados {
    text-align: center;
    padding: 60px 30px;
    background: linear-gradient(145deg, #1a1a2e, #16162a);
    border-radius: 16px;
    border: 2px dashed #2d2d3a;
}

.sem-dados i {
    font-size: 4rem;
    color: #4a4a5a;
    margin-bottom: 20px;
    display: block;
}

.sem-dados h3 {
    font-size: 1.3em;
    color: #fff;
    margin: 0 0 10px 0;
}

.sem-dados p {
    font-size: 0.95em;
    color: #8b8b9a;
    margin: 0;
}

/* ================================================
   RESPONSIVO
   ================================================ */
@media (max-width: 992px) {
    .loja-header-info {
        flex-direction: column;
        text-align: center;
    }
    
    .saldo-box {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .loja-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .item-imagem {
        height: 130px;
    }
    
    .form-pesquisa {
        max-width: 100%;
    }
    
    .loja-filtros {
        justify-content: center;
    }
    
    .modal-item-preview {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .loja-grid {
        grid-template-columns: 1fr;
    }
    
    .loja-filtros .btn {
        flex: 1;
        justify-content: center;
    }
    
    .modal-footer {
        flex-direction: column;
    }
}
