@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

.wkb-kit-builder,
.wkb-kit-builder * {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    box-sizing: border-box;
}

.wkb-kit-builder { margin-top: 1.5rem; }

/* ── Header (progresso + hint) ── */
.wkb-progress-label {
    font-size: 14px; color: #555;
    margin-bottom: .4rem;
    font-weight: 500;
}
.wkb-selected-count, .wkb-target-size {
    font-weight: 700;
    color: #222;
}

.wkb-progress-bar {
    position: relative;
    background: #e5e5e5; border-radius: 20px;
    height: 12px; overflow: hidden;
    margin-bottom: .4rem;
}
.wkb-progress-fill {
    background: #3DBC98; height: 100%;
    border-radius: 20px;
    transition: width .35s ease, background-color .25s ease;
}

/* Marcador (tick) na barra para tamanhos intermediários (ex: 12 quando max é 16) */
.wkb-progress-mark {
    position: absolute;
    top: 0; bottom: 0;
    width: 2px;
    background: #fff;
    z-index: 2;
    transform: translateX(-50%);
}
.wkb-progress-mark::after {
    content: attr(data-size);
    position: absolute;
    top: -22px; left: 50%; transform: translateX(-50%);
    font-size: 11px; font-weight: 600;
    color: #888;
    background: #fff;
    padding: 1px 5px;
    border-radius: 3px;
    border: 1px solid #ddd;
    line-height: 1;
    white-space: nowrap;
}

/* Espaço extra em cima da barra pra caber o label do mark */
.wkb-progress-wrap {
    padding-top: 18px;
    margin-bottom: 1.2rem;
}

.wkb-hint-info {
    font-size: 13px;
    color: #777;
    margin: .5rem 0 0;
    font-weight: 400;
}

/* ── Estados de validação ── */
.wkb-kit-builder.is-valid .wkb-progress-fill {
    background: #2ea07f;  /* verde más fuerte cuando llegó a un tamaño válido */
}
.wkb-kit-builder.is-invalid .wkb-progress-fill {
    background: #f0ad4e;  /* laranja: passou de 12 mas ainda não chegou em 16 */
}

/* ── Lista de variedades ── */
.wkb-products-list {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    margin-bottom: 1rem;
}

.wkb-product-card {
    display: flex;
    align-items: center;
    gap: .85rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    padding: .6rem .85rem;
    transition: box-shadow .2s, border-color .2s, background .2s;
}
.wkb-product-card:hover { box-shadow: 0 3px 12px rgba(0, 0, 0, .08); }
.wkb-product-card.has-qty {
    border-color: #3DBC98;
    background: #f6fdfa;
}
.wkb-product-card.is-pending {
    opacity: .55;
    background: #fafafa;
}

.wkb-product-card img {
    width: 60px; height: 60px;
    object-fit: cover; border-radius: 8px; flex-shrink: 0;
}

.wkb-card-body {
    flex: 1; display: flex; flex-direction: column; gap: .1rem; min-width: 0;
}
.wkb-card-body strong {
    font-size: 14px; font-weight: 600; color: #222;
    line-height: 1.3;
}
.wkb-card-meta {
    display: flex; align-items: center; gap: .5rem;
    font-size: 13px;
}
.wkb-card-weight { color: #888; font-size: 12px; }
.wkb-card-price { font-weight: 600; color: #3DBC98; }
.wkb-card-pending {
    display: inline-block;
    background: #fff4d6; color: #8a6d3b;
    border-radius: 4px; padding: 1px 8px;
    font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: .04em;
}

/* Controle de quantidade */
.wkb-card-actions {
    display: flex; align-items: center; gap: .5rem; flex-shrink: 0;
}

.wkb-qty-wrap { display: flex; align-items: center; gap: .35rem; }
.wkb-qty-btn {
    width: 30px; height: 30px;
    border: 1.5px solid #ccc; border-radius: 50%;
    background: #fff; cursor: pointer;
    font-size: 16px; line-height: 1; font-weight: 600;
    display: flex; align-items: center; justify-content: center;
    transition: all .2s;
    padding: 0;
    color: #555;
    font-family: 'Poppins', sans-serif;
}
.wkb-qty-btn:hover:not(:disabled) {
    border-color: #3DBC98; color: #3DBC98;
}
.wkb-qty-btn:disabled { opacity: .35; cursor: not-allowed; }

.wkb-qty-value {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 32px; height: 30px;
    text-align: center;
    font-size: 15px; font-weight: 600;
    color: #222;
}

/* ── Submit ── */
.wkb-submit-wrap {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; flex-wrap: wrap; margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}
.wkb-total-wrap {
    display: flex; align-items: baseline; gap: .5rem;
}
.wkb-total-label { font-size: 14px; color: #666; font-weight: 500; }
.wkb-total-price { font-size: 1.6rem; font-weight: 700; color: #222; }

.wkb-add-btn {
    padding: .75rem 2rem !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 16px !important; font-weight: 600 !important;
    background-color: #3DBC98 !important;
    border-color: #3DBC98 !important;
    color: #fff !important;
    border-radius: 8px !important;
    text-transform: uppercase; letter-spacing: .03em;
    transition: background .2s !important;
    cursor: pointer;
}
.wkb-add-btn:hover:not(:disabled) {
    background-color: #2ea07f !important; border-color: #2ea07f !important;
}
.wkb-add-btn:disabled {
    opacity: .45; cursor: not-allowed !important; pointer-events: none;
}

.wkb-hint { font-size: 12px; color: #888; margin-top: .5rem; }
.wkb-min-hint {
    font-size: 13px;
    color: #c8861d;
    background: #fff8e8;
    border-left: 3px solid #f0ad4e;
    padding: 8px 12px;
    border-radius: 4px;
    margin: .5rem 0 0;
    font-weight: 500;
}
.wkb-min-hint:empty {
    display: none;
}

/* ── Responsivo ── */
@media (max-width: 480px) {
    .wkb-product-card { flex-wrap: wrap; }
    .wkb-card-actions { width: 100%; justify-content: flex-end; }
    .wkb-add-btn { width: 100% !important; text-align: center; }
    .wkb-submit-wrap { flex-direction: column; align-items: stretch; gap: .75rem; }
    .wkb-total-wrap { justify-content: space-between; }
}
