/* ===========================================================
   kk-po — Personalizaciones de producto (frontend)
   =========================================================== */

.kk-po-wrapper {
    margin: 1.5rem 0;
}

.kk-po-field {
    margin-bottom: 1.25rem;
}

.kk-po-label {
    display: block;
    margin-bottom: .35rem;
    font-weight: 600;
    font-size: .95rem;
}

.kk-po-required {
    color: #d33;
}

.kk-po-help {
    display: block;
    margin-top: .25rem;
    color: #888;
    font-size: .85rem;
}

.kk-po-heading {
    margin: 1.5rem 0 .5rem;
    padding-bottom: .25rem;
    border-bottom: 1px solid #eee;
    font-size: 1.05rem;
    font-weight: 600;
}

/* ---------- select / text ---------- */

.kk-po-field .kk-po-input,
.kk-po-field select.kk-po-input {
    width: 100%;
    max-width: 420px;
    padding: .5rem .65rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    font-size: .95rem;
}

.kk-po-field .kk-po-input:focus,
.kk-po-field select.kk-po-input:focus {
    outline: none;
    border-color: #888;
}

/* ---------- buttons (radio horizontal) ---------- */

.kk-po-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.kk-po-button {
    display: inline-flex;
    align-items: center;
    padding: .45rem .9rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: .9rem;
    user-select: none;
    transition: all .15s ease;
}

.kk-po-button input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.kk-po-button:hover {
    border-color: #888;
}

.kk-po-button.is-selected {
    background: #222;
    border-color: #222;
    color: #fff;
}

/* ---------- swatches (color e imagen) ---------- */

.kk-po-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.kk-po-swatch {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: .35rem;
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    user-select: none;
    transition: border-color .15s ease;
    max-width: 110px;
    text-align: center;
}

.kk-po-swatch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.kk-po-swatch:hover {
    border-color: #ccc;
}

.kk-po-swatch.is-selected {
    border-color: #222;
}

.kk-po-swatch-label {
    margin-top: .25rem;
    font-size: .8rem;
    line-height: 1.2;
}

/* color */

.kk-po-swatch-color-dot {
    display: inline-block;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #ddd;
    box-shadow: inset 0 0 0 2px #fff;
}

/* imagen */

.kk-po-swatch-image img,
.kk-po-swatch-img-placeholder {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    background: #f4f4f4;
}

.kk-po-swatch-img-placeholder {
    display: block;
    border: 1px dashed #ccc;
}

/* ---------- Panel de totales ---------- */

.kk-po-totals {
    margin: 1.25rem 0;
    padding: .85rem 1rem;
    background: #fafafa;
    border: 1px solid #e3e3e3;
    border-radius: 6px;
    font-size: .95rem;
}

.kk-po-totals-base,
.kk-po-totals-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.kk-po-totals-base {
    color: #666;
}

.kk-po-totals-label {
    font-weight: 500;
}

.kk-po-totals-amount {
    font-variant-numeric: tabular-nums;
}

.kk-po-totals-extras {
    list-style: none;
    margin: .35rem 0;
    padding: 0;
    border-top: 1px dashed #ddd;
    padding-top: .35rem;
}

.kk-po-totals-extras:empty {
    display: none;
}

.kk-po-extra {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    color: #555;
    font-size: .85rem;
    padding: .15rem 0;
}

.kk-po-extra-amount {
    color: #2d7a2d;
    font-weight: 500;
}

.kk-po-totals-total {
    margin-top: .5rem;
    padding-top: .5rem;
    border-top: 2px solid #222;
    font-size: 1.1rem;
    font-weight: 700;
}
