/* ═══════════════════════════════════════════════════════════════
   Warhammer Paint Selector – Frontend CSS
   Compatible con WoodMart theme
═══════════════════════════════════════════════════════════════ */

.wps-selector {
    margin: 30px 0;
    border: 1px solid #e2e2e2;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 3px 12px rgba(0,0,0,.07);
    font-size: 14px;
}

/* ── Cabecera ────────────────────────────────────────────────── */
.wps-selector__head {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 14px 20px;
    background: #16213e;
}

.wps-selector__title {
    margin: 0 !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    color: #fff !important;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.wps-icon { font-size: 22px; line-height: 1; }

.wps-scheme-select {
    padding: 7px 12px;
    border-radius: 6px;
    border: 1px solid #aaa;
    font-size: 14px;
    min-width: 200px;
    background: #fff;
    cursor: pointer;
}

/* ── Descripción del esquema ─────────────────────────────────── */
.wps-scheme-desc {
    margin: 10px 20px 0 !important;
    font-size: 13px !important;
    color: #777 !important;
    font-style: italic;
}

/* ── Grupo / zona ────────────────────────────────────────────── */
.wps-group {
    margin: 0;
}

.wps-group + .wps-group {
    border-top: 1px solid #f0f0f0;
}

.wps-group__title {
    padding: 9px 20px 6px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #888;
    background: #fafafa;
    border-bottom: 1px solid #f0f0f0;
}

/* ── Tabla de pinturas ───────────────────────────────────────── */
.wps-paints-table {
    width: 100%;
    border-collapse: collapse;
}

.wps-paints-table thead tr {
    border-bottom: 1px solid #ebebeb;
}

.wps-paints-table thead th {
    padding: 7px 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #aaa;
    text-align: left;
}

.wps-paint td {
    padding: 8px 10px;
    vertical-align: middle;
    border-bottom: 1px solid #f5f5f5;
}

.wps-paint:last-child td { border-bottom: none; }
.wps-paint--oos { opacity: .55; }

/* Thumbnail */
.wps-th-img, .wps-td-img { width: 58px; padding-left: 16px !important; }

.wps-td-img img {
    display: block;
    width: 46px;
    height: 46px;
    object-fit: contain;
    border: 1px solid #eee;
    border-radius: 4px;
}

.wps-thumb-placeholder {
    width: 46px; height: 46px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    background: #f7f7f7;
    border: 1px solid #eee;
    border-radius: 4px;
}

/* Nombre + ref + notas */
.wps-paint-name {
    font-weight: 600;
    color: #222;
    text-decoration: none;
    display: block;
    line-height: 1.3;
}
.wps-paint-name:hover { color: #c0392b; text-decoration: underline; }

.wps-ref-code {
    display: inline-block;
    font-size: 11px;
    color: #888;
    background: #f0f0f0;
    border-radius: 3px;
    padding: 1px 5px;
    margin-top: 2px;
    font-family: monospace;
}

.wps-notes {
    display: block;
    font-size: 12px;
    color: #999;
    font-style: italic;
    margin-top: 2px;
}

.wps-oos-badge {
    display: inline-block;
    font-size: 10px;
    background: #fde8e8;
    color: #c00;
    padding: 1px 6px;
    border-radius: 10px;
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 2px;
}

/* Rol */
.wps-th-role, .wps-td-role { width: 130px; }

.wps-role {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.wps-role--imprimacion { background:#111; color:#fff; }
.wps-role--base        { background:#16213e; color:#fff; }
.wps-role--shade       { background:#2c3e50; color:#fff; }
.wps-role--layer       { background:#2471a3; color:#fff; }
.wps-role--highlight   { background:#5dade2; color:#fff; }
.wps-role--extreme     { background:#aed6f1; color:#1a5276; }
.wps-role--dry         { background:#f0b429; color:#fff; }
.wps-role--contrast    { background:#7d3c98; color:#fff; }
.wps-role--technical   { background:#148f77; color:#fff; }
.wps-role--edge        { background:#c0392b; color:#fff; }
.wps-role--texture     { background:#7f8c8d; color:#fff; }
.wps-role--varnish     { background:#1e8449; color:#fff; }
.wps-role--other       { background:#ddd; color:#555; }

/* Precio */
.wps-th-price, .wps-td-price {
    width: 90px;
    white-space: nowrap;
    font-weight: 600;
}

/* Botón añadir */
.wps-th-btn, .wps-td-btn { width: 88px; text-align: right; padding-right: 14px !important; }

.wps-btn-add {
    padding: 5px 11px !important;
    font-size: 12px !important;
    border-radius: 5px !important;
    cursor: pointer;
    transition: background .15s, transform .1s !important;
    background: #fff !important;
    border: 1px solid #ccc !important;
    color: #333 !important;
}

.wps-btn-add:hover { background: #f0f0f0 !important; transform: scale(1.03); }
.wps-btn-add--done { background: #1e8449 !important; color: #fff !important; border-color: #1e8449 !important; }

/* ── Footer ──────────────────────────────────────────────────── */
.wps-panel__footer {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 14px 20px;
    background: #fafafa;
    border-top: 1px solid #ebebeb;
}

.wps-btn-all {
    background: #c0392b !important;
    color: #fff !important;
    border-color: #c0392b !important;
    font-weight: 700 !important;
    padding: 9px 18px !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    cursor: pointer;
    transition: background .15s, transform .1s !important;
}
.wps-btn-all:hover { background: #a93226 !important; transform: scale(1.02); }
.wps-btn-all:disabled { opacity: .6; pointer-events: none; }

.wps-feedback {
    font-size: 13px;
    font-weight: 600;
    color: #1e8449;
    transition: opacity .4s;
}
.wps-feedback--error { color: #c0392b; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 640px) {
    .wps-selector__head { flex-direction: column; align-items: flex-start; }
    .wps-scheme-select  { width: 100%; }
    .wps-th-role, .wps-td-role,
    .wps-th-price, .wps-td-price { display: none; }
    .wps-btn-all { width: 100%; text-align: center !important; justify-content: center; }
}
