/* ACU PC Builder — Wizard (estilo paso a paso, sobrio gris claro) */

.acupw {
    --w-accent: #E94E1B;
    /* Colores: siguen al tema del sitio (soporta modo oscuro automáticamente) */
    --w-bg:           var(--color-bg-muted,    #f3f4f6);
    --w-bg-soft:      var(--color-bg-alt,      #eef0f3);
    --w-surface:      var(--color-surface,     #ffffff);
    --w-border:       var(--color-border,      #e5e7eb);
    --w-border-strong: var(--color-border-strong, #d1d5db);
    --w-text:         var(--color-text,        #1f2937);
    --w-muted:        var(--color-text-secondary, #6b7280);
    --w-success:      var(--color-success,     #16a34a);
    --w-danger:       var(--color-error,       #dc2626);
    --w-radius: 10px;
    --w-radius-sm: 6px;
    font-family: var(--w-font, inherit);
    color: var(--w-text);
    background: var(--w-bg);
    padding: 12px 14px;
    border-radius: 12px;
    box-sizing: border-box;
}

.acupw *, .acupw *::before, .acupw *::after { box-sizing: border-box; }

.acupw__loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--w-muted);
    font-size: 14px;
}

/* Header con título y volver */
.acupw__head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding-bottom: 8px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--w-border);
}
.acupw__title {
    font-size: 17px;
    font-weight: 700;
    color: var(--w-text);
    margin: 0;
    flex: 1 1 220px;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.acupw__head-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1 1 420px;
    flex-wrap: wrap;
    gap: 10px;
    min-width: 0;
}
/* Buscador inline en el header */
.acupw__head-search {
    position: relative;
    flex: 1 1 220px;
    min-width: 180px;
    max-width: 260px;
}
.acupw__head-search input {
    width: 100%;
    background: var(--w-surface);
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius-sm);
    padding: 7px 12px 7px 30px;
    font-size: 13px;
    color: var(--w-text);
    outline: none;
    font-family: inherit;
}
.acupw__head-search input:focus { border-color: var(--w-accent); }
.acupw__head-search .acupw__search-ic {
    position: absolute;
    left: 9px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--w-muted);
    font-size: 12px;
    pointer-events: none;
}
.acupw__head-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}
.acupw__head-actions:empty { display: none; }
@media (max-width: 580px) {
    .acupw__head-tools { flex: 1 1 100%; }
    .acupw__head-search { flex: 1; min-width: 0; }
    .acupw__title { display: none; }
}
.acupw__subtitle {
    font-size: 12.5px;
    color: var(--w-muted);
    margin: 0 0 10px;
    line-height: 1.45;
}

/* Layout 2 columnas por defecto (left / top / bottom / footer) */
.acupw__layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 14px;
    align-items: flex-start;
}
/* Layout 3 columnas para posición derecha */
.acupw__layout--3col {
    grid-template-columns: 200px 1fr 220px;
}
@media (max-width: 860px) {
    .acupw__layout,
    .acupw__layout--3col { grid-template-columns: 1fr; }
}

/* Sidebar izquierda (lista de componentes) */
.acupw__sidebar {
    background: var(--w-surface);
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius);
    padding: 10px;
    position: sticky;
    top: 12px;
}
/* Sidebar derecha (total + acciones + nav) */
.acupw__actions-sidebar {
    background: var(--w-surface);
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius);
    padding: 10px;
    position: sticky;
    top: 12px;
}
.acupw__actions-sidebar .acupw__total-card {
    margin-bottom: 0;
    border: none;
    padding: 0 0 10px;
    border-bottom: 1px solid var(--w-border);
    border-radius: 0;
}
.acupw__actions-sidebar .acupw__total-row {
    margin-bottom: 0;
}
.acupw__nav--actions {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--w-border);
}
.acupw__sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.acupw__step-wrap {
    display: flex;
    flex-direction: column;
    position: relative;
}
.acupw__step {
    display: grid;
    grid-template-columns: 32px 1fr;
    align-items: center;
    gap: 8px;
    padding: 6px 30px 6px 6px;
    border-radius: var(--w-radius-sm);
    cursor: pointer;
    border: 1px solid transparent;
    background: transparent;
    transition: background .15s, border-color .15s;
    text-align: left;
    width: 100%;
    color: inherit;
    font: inherit;
}
.acupw__step:hover { background: var(--w-bg-soft); }
.acupw__step.is-active {
    border-color: var(--w-accent);
    background: var(--w-surface);
}
.acupw__step.is-active .acupw__step-icon {
    color: var(--w-accent);
    border-color: var(--w-accent);
}
.acupw__step.is-done .acupw__step-icon {
    color: var(--w-success);
}
.acupw__step-icon {
    width: 32px;
    height: 32px;
    border: 1px solid var(--w-border-strong);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--w-muted);
    background: var(--w-surface);
    flex-shrink: 0;
    overflow: hidden;
}
.acupw__step-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.acupw__step-body { min-width: 0; }
.acupw__step-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--w-muted);
    font-weight: 600;
    line-height: 1;
    margin-bottom: 2px;
}
.acupw__step-name {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--w-text);
    line-height: 1.25;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: break-word;
}
.acupw__step-name.is-empty { color: var(--w-muted); font-weight: 500; }
.acupw__step-remove {
    position: absolute;
    top: 50%;
    right: 4px;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
    color: #9ca3af;
    padding: 0;
    border-radius: 4px;
    transition: color .15s, background .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    z-index: 2;
}
.acupw__step-remove:hover { color: #ef4444; background: rgba(239,68,68,.15); }
.acupw__step-wrap:has(.acupw__step-remove:hover) .acupw__step {
    background: rgba(239,68,68,.08);
    border-color: rgba(239,68,68,.3);
}

/* Qty row debajo del step */
.acupw__step-qty-row {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px 6px 52px;
}
.acupw__step-qty-lbl {
    font-size: 12px;
    color: var(--w-muted);
    font-weight: 600;
}
.acupw__qty-btn {
    background: var(--w-surface);
    border: 1px solid var(--w-border);
    border-radius: 4px;
    width: 22px;
    height: 22px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    color: var(--w-text);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background .15s;
}
.acupw__qty-btn:hover { background: var(--w-bg-soft); }
.acupw__step-qty-input {
    width: 44px;
    padding: 2px 4px;
    border: 1px solid var(--w-border);
    border-radius: 4px;
    font-size: 13px;
    text-align: center;
    background: var(--w-surface);
    color: var(--w-text);
}
.acupw__finish-qty {
    font-size: 11px;
    font-weight: 700;
    color: var(--w-accent);
}

/* Controles de cantidad en la tarjeta (allow_item_qty) */
.acupw__card-qty {
    display: flex;
    align-items: center;
    gap: 5px;
}
.acupw__card-qty-btn {
    background: var(--w-bg);
    border: 1px solid var(--w-border);
    border-radius: 4px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    color: var(--w-text);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background .15s;
}
.acupw__card-qty-btn:hover { background: var(--w-border); }
.acupw__card-qty-val {
    min-width: 22px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--w-text);
}
.acupw__badge--sel {
    color: var(--w-success);
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
}
.acupw__qty-continue { white-space: nowrap; }

/* Total box */
.acupw__total-card {
    background: var(--w-surface);
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius-sm);
    padding: 10px 12px;
    margin-bottom: 8px;
}
.acupw__watts {
    font-size: 11px;
    color: var(--w-muted);
    margin-bottom: 4px;
}
.acupw__total-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 10px;
}
.acupw__total-lbl {
    font-size: 12px;
    font-weight: 600;
    color: var(--w-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
}
.acupw__total-amt {
    font-size: 18px;
    font-weight: 800;
    color: var(--w-text);
}
.acupw__nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}
.acupw__sidebar-actions {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--w-border);
}
.acupw__sidebar-actions .acupw__build-name {
    margin-bottom: 8px;
}
.acupw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 10px;
    border-radius: var(--w-radius-sm);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    cursor: pointer;
    border: 1px solid var(--w-accent);
    background: var(--w-surface);
    color: var(--w-accent);
    transition: background .15s, color .15s;
    line-height: 1.1;
    font-family: inherit;
}
.acupw-btn:hover:not(:disabled) {
    background: var(--w-accent);
    color: #fff;
}
.acupw-btn:disabled { opacity: .5; cursor: not-allowed; }
.acupw-btn--primary {
    background: var(--w-accent);
    color: #fff;
}
.acupw-btn--primary:hover:not(:disabled) {
    filter: brightness(.92);
    background: var(--w-accent);
    color: #fff;
}
.acupw-btn--ghost {
    border-color: var(--w-border-strong);
    color: var(--w-muted);
}
.acupw-btn--ghost:hover:not(:disabled) {
    background: var(--w-bg-soft);
    color: var(--w-text);
    border-color: var(--w-border-strong);
}
.acupw-btn--full { width: 100%; }
.acupw-btn--lg { padding: 11px 14px; font-size: 12px; }

.acupw__finish-actions {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Main */
.acupw__main {
    min-width: 0;
}

/* Ordenar por precio en el header */
.acupw__head-sort {
    flex: 0 1 auto;
    min-width: 0;
}
.acupw__head-sort select {
    background: var(--w-surface);
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius-sm);
    padding: 7px 28px 7px 10px;
    font-size: 13px;
    color: var(--w-muted);
    outline: none;
    font-family: inherit;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236b7280'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 9px center;
    transition: border-color .15s;
    min-width: 210px;
    max-width: 100%;
}
.acupw__head-sort select:focus,
.acupw__head-sort select:hover { border-color: var(--w-accent); color: var(--w-text); }
@media (max-width: 580px) {
    .acupw__head-sort { display: none; }
    .acupw__head-search { max-width: none; }
}

/* Filtros marca */
.acupw__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}
.acupw__filter {
    background: var(--w-surface);
    border: 1.5px solid var(--w-border-strong);
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 700;
    color: var(--w-muted);
    cursor: pointer;
    transition: all .15s;
    font-family: inherit;
}
.acupw__filter:hover { border-color: var(--w-text); color: var(--w-text); }
.acupw__filter.is-active {
    border-color: var(--w-accent);
    color: var(--w-accent);
    background: var(--w-surface);
}

/* Filtros de atributos de notebook */
.acupw__nb-filters {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}
.acupw__nb-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}
.acupw__nb-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--w-muted);
    min-width: 76px;
    flex-shrink: 0;
}
.acupw__nb-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.acupw__nb-btns .acupw__filter {
    padding: 4px 11px;
    font-size: 12px;
}

/* Search bar */
.acupw__search {
    margin-bottom: 14px;
    position: relative;
}
.acupw__search input {
    width: 100%;
    background: var(--w-surface);
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius-sm);
    padding: 10px 14px 10px 36px;
    font-size: 13px;
    color: var(--w-text);
    outline: none;
    font-family: inherit;
}
.acupw__search input:focus { border-color: var(--w-accent); }
.acupw__search-ic {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--w-muted);
    font-size: 13px;
    pointer-events: none;
}

/* Grid de productos */
.acupw__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
@media (max-width: 600px) {
    .acupw__grid { grid-template-columns: 1fr; }
}

.acupw__card {
    background: var(--w-surface);
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius);
    padding: 10px;
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 10px;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s, transform .15s;
    position: relative;
}
.acupw__card:hover {
    border-color: var(--w-accent);
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.acupw__card.is-selected,
.acupw__card.is-selected:hover {
    border-color: var(--w-success);
    box-shadow: 0 0 0 1px var(--w-success), 0 4px 14px rgba(22,163,74,.08);
    background: linear-gradient(0deg, rgba(22,163,74,.03), rgba(22,163,74,.03)), var(--w-surface);
}
.acupw__card-thumb {
    width: 72px;
    height: 72px;
    background: var(--w-surface);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}
.acupw__card-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.acupw__card-thumb i { font-size: 28px; color: #cbd5e0; }
.acupw__card-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.acupw__card-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--w-text);
    line-height: 1.35;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    padding-right: 24px;
}
.acupw__card-info {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(147,197,253,.15);
    color: #93c5fd;
    font-size: 12px;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, color .15s;
    z-index: 2;
}
.acupw__card-info:hover {
    background: #93c5fd;
    color: #1e293b;
}
.acupw__card-price {
    font-size: 16px;
    font-weight: 800;
    color: var(--w-text);
    margin-top: auto;
}
.acupw__card-price-old {
    font-size: 12px;
    color: var(--w-muted);
    text-decoration: line-through;
    margin-right: 6px;
    font-weight: 500;
}
.acupw__card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 4px;
}
.acupw__badge {
    font-size: 11px;
    font-weight: 600;
    color: var(--w-success);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.acupw__badge i { font-size: 11px; }

/* Descuento tag */
.acupw__discount {
    position: absolute;
    top: 0;
    left: 0;
    background: var(--w-success);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: var(--w-radius) 0 8px 0;
    text-transform: uppercase;
    letter-spacing: .3px;
}

/* Status / empty */
.acupw__status {
    text-align: center;
    padding: 40px 20px;
    color: var(--w-muted);
    font-size: 14px;
    grid-column: 1 / -1;
}
.acupw__status i { display: block; font-size: 28px; margin-bottom: 10px; opacity: .6; }

/* Filterbar: filtros de marca + paginación en la misma fila */
.acupw__filterbar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
    flex-wrap: nowrap;
}
.acupw__filterbar .acupw__filters {
    margin-bottom: 0;
    flex: 1 1 auto;
    min-width: 0;
}
.acupw__filterbar .acupw__pagination {
    margin-top: 0;
    margin-left: auto;
    flex-shrink: 0;
}

/* Paginación del grid de productos */
.acupw__pagination { margin-top: 14px; }
.acupw__pag {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}
.acupw__pag-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--w-radius);
    border: 1px solid var(--w-border);
    background: var(--w-surface);
    color: var(--w-text);
    cursor: pointer;
    transition: background .15s, border-color .15s;
    font-size: 13px;
}
.acupw__pag-btn:hover:not(:disabled) { background: var(--w-accent); color: #fff; border-color: var(--w-accent); }
.acupw__pag-btn:disabled { opacity: .35; cursor: default; }
.acupw__pag-info { font-size: 13px; color: var(--w-muted); white-space: nowrap; }
.acupw__pag-perpage {
    height: 34px;
    padding: 0 10px;
    border-radius: var(--w-radius);
    border: 1px solid var(--w-border);
    background: var(--w-surface);
    color: var(--w-text);
    font-size: 13px;
    cursor: pointer;
    outline: none;
    transition: border-color .15s;
    font-family: inherit;
}
.acupw__pag-perpage:focus { border-color: var(--w-accent); }

/* Tabs (grupos de pasos) */
.acupw__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--w-border);
}
.acupw__tab {
    background: var(--w-surface);
    border: 1px solid var(--w-border);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--w-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    transition: all .15s;
}
.acupw__tab:hover { color: var(--w-text); border-color: var(--w-border-strong); }
.acupw__tab.is-active {
    border-color: var(--w-accent);
    color: var(--w-accent);
    background: var(--w-surface);
}
.acupw__tab i { font-size: 12px; }

/* Finish view */
.acupw__finish {
    background: var(--w-surface);
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius);
    padding: 14px;
}
.acupw__finish--compact { padding: 12px 14px; }
.acupw__finish-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
}
.acupw__finish-item {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 7px 10px;
    background: var(--w-bg-soft);
    border-radius: var(--w-radius-sm);
    font-size: 12.5px;
    align-items: center;
}
.acupw__finish-thumb {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--w-border);
    display: flex;
    align-items: center;
    justify-content: center;
}
.acupw__finish-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.acupw__finish-thumb-fallback {
    display: none;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    color: var(--w-muted);
    background: var(--w-surface);
    font-size: 15px;
}
.acupw__finish-thumb-fallback.is-visible { display: inline-flex; }
.acupw__finish-item-info { min-width: 0; }
.acupw__finish-item .cat {
    font-size: 9.5px;
    text-transform: uppercase;
    color: var(--w-muted);
    font-weight: 700;
    margin-bottom: 1px;
    letter-spacing: .3px;
}
.acupw__finish-item .nm {
    font-weight: 500;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.acupw__finish-item .pr {
    font-weight: 700;
    white-space: nowrap;
    font-size: 13px;
}
.acupw__finish-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 8px 10px;
    border-top: 2px solid var(--w-border);
    margin-bottom: 10px;
}
.acupw__finish-total-amt {
    font-size: 20px;
    font-weight: 800;
    color: var(--w-text);
}
.acupw__notice {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 12px;
    background: color-mix(in srgb, var(--color-warning, #f59e0b) 10%, var(--w-surface));
    border: 1px solid color-mix(in srgb, var(--color-warning, #f59e0b) 40%, transparent);
    border-left: 3px solid var(--color-warning, #f59e0b);
    border-radius: var(--w-radius-sm);
    font-size: 12px;
    color: var(--w-text);
    line-height: 1.4;
    margin-bottom: 10px;
}
.acupw__notice i { color: #f59e0b; font-size: 14px; padding-top: 1px; flex-shrink: 0; }
.acupw__notice p { margin: 0; }
.acupw__action-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.acupw__action-panel .acupw__build-name {
    margin-bottom: 0;
}
.acupw__finish-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 6px;
}
.acupw__summary-actions {
    margin-top: 10px;
}
.acupw__build-name {
    width: 100%;
    background: var(--w-surface);
    color: var(--w-text);
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius-sm);
    padding: 8px 12px;
    font-size: 13px;
    margin-bottom: 10px;
    font-family: inherit;
    outline: none;
}
.acupw__build-name:focus { border-color: var(--w-accent); }

/* Modal */
.acupw__modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.55);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.acupw__modal.is-open { display: flex; }
.acupw__modal-box {
    background: var(--w-surface);
    border-radius: var(--w-radius);
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    overflow: hidden;
    font-family: var(--w-font, inherit);
}
.acupw__modal-head {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--w-border);
}
.acupw__modal-head strong { flex: 1; font-size: 15px; }
.acupw__modal-x {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: var(--w-muted);
    padding: 4px;
}
.acupw__modal-body { padding: 16px; }
.acupw__modal-body label {
    display: block;
    font-size: 12px;
    color: var(--w-muted);
    margin: 8px 0 4px;
    font-weight: 600;
}
.acupw__modal-body input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius-sm);
    font-size: 13px;
    outline: none;
    font-family: inherit;
    background: var(--w-bg);
    color: var(--w-text);
}
.acupw__modal-body input:focus { border-color: var(--w-accent); }
.acupw__modal-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    justify-content: flex-end;
}

/* Toast */
.acupw__toast {
    position: fixed;
    top: 24px;
    right: 24px;
    background: #1e1e2e;
    color: #fff;
    padding: 16px 22px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    max-width: 380px;
    word-break: break-word;
    box-shadow: 0 8px 32px rgba(0,0,0,.45);
    z-index: 100000;
    transform: translateX(120%);
    transition: transform .3s;
}
.acupw__toast.is-show { transform: translateX(0); }
.acupw__toast.is-success { background: #1a7f47; }
.acupw__toast.is-error { background: #c0392b; }

/* ============================================================
   MÓVIL: dropdown de paso + barra inferior fija + hojas
   ============================================================ */

/* Elementos solo-móvil ocultos por defecto */
.acupw__mtop,
.acupw__mfooter { display: none; }

@media (max-width: 860px) {
    .acupw {
        padding: 10px 10px 96px;
        border-radius: 8px;
    }
    .acupw__head { margin-bottom: 6px; padding-bottom: 6px; }
    .acupw__head .acupw__title { font-size: 15px; }

    /* Ocultar lista de pasos y nav del sidebar (se reemplazan por dropdown + footer) */
    .acupw__sidebar {
        background: transparent;
        border: none;
        padding: 0;
        position: static;
    }
    .acupw__actions-sidebar { display: none; }
    .acupw__actions-bar { display: none; }
    .acupw__sidebar-list,
    .acupw__total-card { display: none; }

    /* Top bar móvil: dropdown del paso + Componentes */
    .acupw__mtop {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        margin-bottom: 10px;
    }
    .acupw__mselect {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        width: 100%;
        background: var(--w-surface);
        border: 1px solid var(--w-border-strong);
        border-radius: var(--w-radius-sm);
        padding: 12px 14px;
        font-size: 14px;
        font-weight: 500;
        color: var(--w-text);
        cursor: pointer;
        font-family: inherit;
        text-align: left;
        line-height: 1.2;
    }
    .acupw__mselect i { color: var(--w-muted); font-size: 12px; }
    .acupw__mcomponents {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
        background: var(--w-surface);
        border: 1.5px solid var(--w-accent);
        border-radius: var(--w-radius-sm);
        padding: 9px 14px;
        font-size: 12px;
        font-weight: 700;
        color: var(--w-accent);
        letter-spacing: .5px;
        text-transform: uppercase;
        cursor: pointer;
        font-family: inherit;
    }
    .acupw__mcomponents i { font-size: 12px; }

    /* Filtros/tabs/búsqueda más compactos */
    .acupw__subtitle { display: none; }
    .acupw__filters { gap: 6px; margin-bottom: 10px; }
    .acupw__filter { flex: 1; padding: 8px 10px; font-size: 12px; min-width: 0; }
    .acupw__tabs { gap: 4px; margin-bottom: 10px; }
    .acupw__tab { padding: 7px 10px; font-size: 11.5px; }
    .acupw__search { margin-bottom: 10px; }

    /* Cards: una columna, estilo lista */
    .acupw__grid { grid-template-columns: 1fr; gap: 8px; }
    .acupw__card {
        grid-template-columns: 76px 1fr;
        padding: 10px;
        gap: 12px;
        align-items: center;
    }
    .acupw__card-thumb { width: 76px; height: 76px; }
    .acupw__card-name {
        font-size: 12.5px;
        margin-bottom: 4px;
        -webkit-line-clamp: 2;
        padding-right: 22px;
    }
    .acupw__card-info { top: 10px; right: 10px; }
    .acupw__card-price { font-size: 14.5px; }
    .acupw__card-price-old { font-size: 11px; }
    .acupw__card-foot {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    .acupw__badge { font-size: 10.5px; }

    /* Barra inferior fija con watts/total + Volver/Saltear */
    .acupw__mfooter {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--w-surface);
        border-top: 1px solid var(--w-border);
        padding: 8px 12px 10px;
        z-index: 9990;
        box-shadow: 0 -4px 14px rgba(0,0,0,.06);
    }
    .acupw__mfooter-info {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        padding: 2px 0 6px;
        font-size: 12px;
    }
    .acupw__mfooter-watts { color: var(--w-muted); font-size: 11.5px; }
    .acupw__mfooter-total { color: var(--w-text); }
    .acupw__mfooter-total .acupw__total-lbl { font-size: 11px; }
    .acupw__mfooter-amt { font-size: 15px; font-weight: 800; margin-left: 4px; }
    .acupw__mfooter-nav {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .acupw__mfooter-nav .acupw-btn {
        padding: 10px 12px;
        font-size: 12px;
    }

    /* Modal de cotización por encima del footer fijo */
    .acupw__modal { padding-bottom: 110px; }

    /* Finish view más compacta */
    .acupw__finish { padding: 10px; }
    .acupw__finish-item { padding: 8px 10px; font-size: 12px; }
    .acupw__finish-thumb { width: 38px; height: 38px; border-radius: 9px; }
    .acupw__finish-total-amt { font-size: 18px; }
    .acupw__finish-actions-grid { grid-template-columns: 1fr 1fr; }
}

/* Pantallas muy estrechas */
@media (max-width: 380px) {
    .acupw__card { grid-template-columns: 64px 1fr; gap: 10px; }
    .acupw__card-thumb { width: 64px; height: 64px; }
    .acupw__card-name { font-size: 12px; }
    .acupw__card-price { font-size: 13.5px; }
}

/* ============================================================
   Hojas inferiores (bottom sheets) — móvil
   ============================================================ */
.acupw__sheet {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99998;
}
.acupw__sheet.is-open { display: block; }
.acupw__sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15,23,42,.5);
    animation: acupwFade .18s ease;
}
.acupw__sheet-box {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--w-surface);
    border-radius: 14px 14px 0 0;
    max-height: 82vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -10px 30px rgba(0,0,0,.18);
    animation: acupwSlideUp .22s ease;
    font-family: var(--w-font, inherit);
    color: var(--w-text);
}
.acupw__sheet-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 16px 10px;
    border-bottom: 1px solid var(--w-border);
    position: relative;
}
.acupw__sheet-head::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 38px;
    height: 4px;
    background: var(--w-border-strong);
    border-radius: 2px;
}
.acupw__sheet-head strong { flex: 1; font-size: 14.5px; }
.acupw__sheet-x {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--w-muted);
    font-size: 16px;
    padding: 4px 8px;
}
.acupw__sheet-body {
    padding: 10px 12px 18px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.acupw__sheet-body .acupw__step {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    gap: 10px;
    padding: 10px;
    margin-bottom: 4px;
    border: 1px solid var(--w-border);
    background: var(--w-surface);
}
.acupw__sheet-body .acupw__step-icon { width: 40px; height: 40px; font-size: 16px; }
.acupw__sheet-body .acupw__step-name { white-space: normal; font-size: 12.5px; }
.acupw__sheet-body .acupw__step-label { font-size: 10.5px; }
.acupw__step-check { color: var(--w-success); align-self: center; }
.acupw__step-chev { color: var(--w-muted); align-self: center; font-size: 12px; }

body.acupw-sheet-open { overflow: hidden; }

@keyframes acupwSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
@keyframes acupwFade {
    from { opacity: 0; }
    to { opacity: 1; }
}
