/**
 * FC Player Shop - Squad Detail UI
 * Layout baseado no carrinho (fc-cart-ui.css)
 * - Grid 4 colunas PC / 2 colunas mobile
 * - Badge coins flutuante no card
 * - Botão "Adicionar" dentro da barra de preço
 */

/* =========================
   GRID FIXO (4 / 2)
   ========================= */
.fc-players-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
}

@media (max-width: 768px) {
    .fc-players-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
}

/* =========================
   WRAPPER TÉCNICO (SEM VISUAL)
   ========================= */
.fc-player-item {
    position: relative;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* =========================
   CARD (ÚNICA CAIXA VISUAL)
   ========================= */
.fc-player-card-wrapper {
    position: relative;
    width: 100%;
    max-width: 300px;
    border-radius: 18px;

    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);

    overflow: hidden;
    margin-bottom: 0;
}

/* Badge de coins flutuante no topo esquerdo */
.fc-player-item::before {
    content: attr(data-coins-value);
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 7;

    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 6px 10px;
    border-radius: 999px;

    background: rgba(10, 10, 10, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(4px);

    font-size: 13px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

/* Ícone de coin no badge */
.fc-player-item[data-coins-value]::before {
    background-image: url("https://chamacoins.com.br/wp-content/uploads/2025/11/ChatGPT-Image-22-de-out.-de-2025-18_17_45-1-1.png");
    background-position: 10px center;
    background-size: 14px;
    background-repeat: no-repeat;
    background-color: rgba(10, 10, 10, 0.72);
    padding-left: 30px;
}

/* =========================
   BARRA DE PREÇO + BOTÃO
   (mesma largura do card)
   ========================= */
.fc-player-price-info {
    width: 100%;
    max-width: 300px;

    min-height: 44px;
    padding: 8px 10px;
    border-radius: 12px;

    background: rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.10);

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

/* Container do preço à esquerda */
.fc-price-container {
    display: flex;
    align-items: baseline;
    gap: 4px;
    flex-shrink: 1;
    min-width: 0;
}

.fc-price-row {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 0;
}

.fc-price-label {
    font-size: 15px;
    color: var(--fc-primary);
    font-weight: 700;
    line-height: 1;
}

.fc-price-coins {
    display: none; /* Coins vai no badge flutuante */
}

.fc-price-brl {
    padding-top: 0;
    border-top: none;
}

.fc-price-value {
    font-size: 18px;
    font-weight: 800;
    color: var(--fc-primary);
    line-height: 1;
    white-space: nowrap;
}

/* =========================
   BOTÃO ADICIONAR (bem compacto)
   ========================= */
.fc-add-to-cart-btn {
    width: auto;
    padding: 7px 12px;
    background: var(--fc-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1;
}

.fc-add-to-cart-btn:hover:not(:disabled) {
    background: var(--fc-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 111, 0, 0.4);
}

.fc-add-to-cart-btn.fc-btn-in-cart {
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.14);
    cursor: not-allowed;
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
}

.fc-add-to-cart-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.fc-add-to-cart-btn svg {
    width: 14px;
    height: 14px;
}

/* =========================
   HEADER DO SQUAD DETAIL
   ========================= */
.fc-squad-detail-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 16px 120px;
}

.fc-squad-detail-header {
    margin-bottom: 48px;
}

.fc-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--fc-dark-light);
    border: 2px solid var(--fc-border);
    border-radius: 8px;
    text-decoration: none;
    color: white;
    font-weight: 600;
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.fc-back-btn:hover {
    background: var(--fc-dark-lighter);
    border-color: var(--fc-primary);
}

.fc-squad-title-section {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.fc-squad-title-section h1 {
    font-size: 38px;
    font-weight: 700;
    color: white;
    margin: 0;
}

.fc-squad-date-badge {
    padding: 6px 16px;
    background: var(--fc-primary);
    color: white;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.fc-squad-info {
    color: var(--fc-text-light);
    font-size: 16px;
}

.fc-squad-player-count {
    font-weight: 600;
}

/* =========================
   RESPONSIVIDADE
   ========================= */
@media (max-width: 768px) {
    .fc-squad-title-section {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .fc-squad-title-section h1 {
        font-size: 28px;
    }
    
    .fc-player-price-info {
        min-height: 40px;
        padding: 6px 8px;
    }
    
    .fc-price-label {
        font-size: 14px;
    }
    
    .fc-price-value {
        font-size: 18px;
    }
    
    .fc-add-to-cart-btn {
        padding: 6px 10px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .fc-player-item[data-coins-value]::before {
        font-size: 11px;
        padding: 4px 7px;
        padding-left: 24px;
        background-size: 11px;
        background-position: 7px center;
        
    }
    .fc-squad-detail-container{padding:0px;}
    .fc-price-label {
        font-size: 13px;
    }
    
    .fc-price-value {
        font-size: 14px;
        font-weight: 800;
    }
    
    .fc-add-to-cart-btn {
        padding: 5px 8px;
        font-size: 10px;
    }
    
    .fc-add-to-cart-btn svg {
        width: 12px;
        height: 12px;
    }
}