/* Configurador "Armá tu PC" — estilos (el :root con color_sistema queda inline en el template) */
.atp, .atp *, .atp *::before, .atp *::after { box-sizing: border-box; }

/* Breadcrumb (igual patrón catálogo) */
.atp .breadcrumb__title { font-size: 22px; font-weight: 800; color: var(--atp-ink); }
.atp .breadcrumb__list span a:hover { color: var(--clr-accent); }
.atp .breadcrumb__lead { color: var(--atp-muted); font-size: 14px; margin-top: 6px; max-width: 620px; }

/* Rail de categorías (igual patrón .tp-shop-sidebar) */
.atp-rail {
    position: sticky; top: 80px; background: #fff; border-radius: 14px;
    box-shadow: 0 2px 14px rgba(0,0,0,.06); padding: 18px 14px;
}
.atp-rail-title {
    font-size: 13px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
    color: #888; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid #f0f0f0;
}
.atp-rail a {
    display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px;
    font-size: 13px; font-weight: 600; color: #555; text-decoration: none;
    transition: background var(--transition), color var(--transition);
}
.atp-rail a i { width: 16px; text-align: center; color: var(--atp-muted); }
.atp-rail a .chk { margin-left: auto; color: #27ae60; opacity: 0; font-size: 12px; }
.atp-rail a.has-items .chk { opacity: 1; }
.atp-rail a.has-items i, .atp-rail a.active i { color: var(--clr-accent); }
.atp-rail a:hover, .atp-rail a.active { background: var(--clr-accent-light); color: var(--clr-accent); }
.atp-rail-progress { margin-top: 14px; padding-top: 12px; border-top: 1px solid #f0f0f0; }
.atp-rail-progress .track { height: 6px; border-radius: 30px; background: #eef0f4; overflow: hidden; }
.atp-rail-progress .fill { height: 100%; width: 0; background: var(--clr-accent); border-radius: 30px; transition: width .4s var(--transition); }
.atp-rail-progress p { font-size: 11px; color: var(--atp-muted); margin: 8px 0 0; }
.atp-rail-progress b { color: var(--atp-ink); }

/* Secciones */
.atp-section { margin-bottom: 34px; scroll-margin-top: 90px; }
.atp-section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; padding-left: 12px; border-left: 3px solid var(--clr-accent); }
.atp-section-head i { color: var(--clr-accent); font-size: 18px; }
.atp-section-head h3 { font-size: 17px; font-weight: 800; color: var(--atp-ink); margin: 0; text-transform: uppercase; letter-spacing: .3px; }
.atp-section-head .cnt { font-size: 12px; color: var(--atp-muted); }
.atp-section-head .req { font-size: 9px; font-weight: 700; text-transform: uppercase; color: #fff; background: #e67e22; padding: 2px 7px; border-radius: 20px; }

/* Card producto (igual patrón .tp-product-item) */
.atp-card {
    background: #fff; border-radius: 14px; border-top: 3px solid transparent;
    box-shadow: 0 2px 12px rgba(0,0,0,.06); overflow: hidden; height: 100%;
    display: flex; flex-direction: column;
    transition: box-shadow var(--transition), border-top-color var(--transition), transform var(--transition);
}
.atp-card:hover { box-shadow: 0 10px 32px rgba(0,0,0,.13); border-top-color: var(--clr-accent); transform: translateY(-4px); }
.atp-card.picked { border-top-color: var(--clr-accent); box-shadow: 0 0 0 2px var(--clr-accent) inset, 0 6px 18px rgba(0,0,0,.1); }
.atp-thumb { height: 150px; background: #f7f8fa center/contain no-repeat; margin: 10px 10px 0; border-radius: 10px; }
.atp-body { padding: 12px 14px; flex: 1; display: flex; flex-direction: column; }
.atp-tag { font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: #aaa; }
.atp-name { color: var(--atp-ink); font-weight: 700; font-size: 13.5px; line-height: 1.3; margin: 3px 0 6px; min-height: 35px;
    display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.atp-price { color: var(--clr-accent); font-weight: 800; font-size: 17px; margin-bottom: 10px; }
.atp-actions { margin-top: auto; display: flex; align-items: center; gap: 8px; }
.atp-qty { display: flex; align-items: center; border: 1.5px solid var(--clr-accent-mid); border-radius: 30px; overflow: hidden; flex: none; background: #fff; }
.atp-qty button { border: none; background: #fff; color: var(--clr-accent); width: 30px; min-width: 30px; height: 34px; font-size: 16px; cursor: pointer; line-height: 1; flex: none; padding: 0; }
.atp-qty button:hover { background: var(--clr-accent-light); }
.atp-qty input.q { width: 38px; min-width: 38px; height: 34px; border: none; text-align: center; font-weight: 700; font-size: 14px; color: var(--atp-ink); background: #fff; -moz-appearance: textfield; flex: none; padding: 0; }
.atp-qty input::-webkit-outer-spin-button, .atp-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.atp-add {
    flex: 1; border: none; background: var(--clr-accent); color: #fff; font-weight: 700; font-size: 12.5px;
    border-radius: 30px; height: 34px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px;
    transition: background var(--transition), box-shadow var(--transition);
}
.atp-add:hover { background: var(--clr-accent-hover); box-shadow: 0 6px 18px var(--clr-accent-mid); }
.atp-add.ghost { background: #fff; color: var(--clr-accent); border: 1.5px solid var(--clr-accent-mid); }

/* Card personalizado */
.atp-custom { background: #fff; border: 2px dashed var(--clr-accent-mid); border-radius: 14px; padding: 16px; }
.atp-custom input { width: 100%; border: 1.5px solid var(--atp-line); border-radius: 10px; padding: 9px 12px; font-size: 13px; margin-bottom: 10px; }
.atp-custom input:focus { outline: none; border-color: var(--clr-accent); }

/* Resumen (igual patrón .tp-shop-sidebar, blanco) */
.atp-summary { position: sticky; top: 80px; background: #fff; border-radius: 14px; box-shadow: 0 2px 14px rgba(0,0,0,.08); overflow: hidden; }
.atp-summary-head { padding: 16px 18px; border-bottom: 1px solid var(--atp-line); display: flex; align-items: center; gap: 10px; }
.atp-summary-head i { color: var(--clr-accent); font-size: 18px; }
.atp-summary-head h4 { font-size: 15px; font-weight: 800; color: var(--atp-ink); margin: 0; flex: 1; }
.atp-count-badge { background: var(--clr-accent); color: #fff; font-weight: 800; font-size: 13px; min-width: 26px; height: 26px; border-radius: 30px; display: flex; align-items: center; justify-content: center; padding: 0 8px; }
.atp-lines { max-height: 40vh; overflow-y: auto; padding: 6px 18px; }
.atp-empty { text-align: center; color: var(--atp-muted); font-size: 13px; padding: 26px 6px; line-height: 1.6; }
.atp-empty i { font-size: 32px; color: #d8dbe0; display: block; margin-bottom: 8px; }
.atp-line { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--atp-line); align-items: flex-start; }
.atp-line:last-child { border-bottom: none; }
.atp-line-img { width: 42px; height: 42px; border-radius: 8px; object-fit: contain; background: #f7f8fa; border: 1px solid var(--atp-line); flex: none; }
.atp-line-img.noimg { display: flex; align-items: center; justify-content: center; color: #c3c7cf; font-size: 16px; }
.atp-line-b { flex: 1; min-width: 0; }
.atp-line-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.atp-line-qty { display: inline-flex; align-items: center; border: 1px solid var(--atp-line); border-radius: 20px; overflow: hidden; }
.atp-line-qty button { border: none; background: #fff; color: var(--clr-accent); width: 24px; height: 24px; font-size: 14px; line-height: 1; cursor: pointer; padding: 0; }
.atp-line-qty button:hover { background: var(--clr-accent-light); }
.atp-line-qty span { min-width: 22px; text-align: center; font-weight: 700; font-size: 12px; color: var(--atp-ink); }
.atp-line-cat { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--atp-muted); }
.atp-line-name { font-size: 12.5px; color: var(--atp-ink); font-weight: 600; margin: 1px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.atp-line-meta { font-size: 12px; color: var(--clr-accent); font-weight: 700; }
.atp-line-meta small { color: var(--atp-muted); font-weight: 400; }
.atp-line-x { background: none; border: none; color: #c3c7cf; cursor: pointer; font-size: 14px; align-self: flex-start; }
.atp-line-x:hover { color: #e74c3c; }
.atp-totals { padding: 14px 18px; border-top: 1px solid var(--atp-line); background: #fbfcfd; }
.atp-trow { display: flex; justify-content: space-between; font-size: 13px; color: #6b7178; padding: 3px 0; }
.atp-trow.grand { color: var(--atp-ink); font-size: 20px; font-weight: 800; padding-top: 10px; margin-top: 6px; border-top: 1px dashed var(--atp-line); }
.atp-trow.grand span:last-child { color: var(--clr-accent); }
.atp-cta { width: 100%; height: 46px; border: none; border-radius: 30px; background: var(--clr-accent); color: #fff; font-weight: 800; font-size: 13.5px; letter-spacing: .3px; text-transform: uppercase; cursor: pointer; margin-top: 12px; transition: background var(--transition), box-shadow var(--transition); }
.atp-cta:hover { background: var(--clr-accent-hover); box-shadow: 0 8px 22px var(--clr-accent-mid); }
.atp-cta:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.atp-share { width: 100%; height: 38px; border: 1.5px solid var(--atp-line); border-radius: 30px; background: #fff; color: #6b7178; font-size: 12.5px; cursor: pointer; margin-top: 8px; }
.atp-share:hover { border-color: var(--clr-accent); color: var(--clr-accent); }

/* FAB móvil con contador */
.atp-fab { display: none; }
@media (max-width: 991px) {
    .atp-rail { position: static; top: auto; }
    .atp-summary { position: static; margin-top: 20px; }
    .atp-fab {
        display: flex; position: fixed; left: 14px; right: 14px; bottom: 14px; z-index: 60;
        align-items: center; gap: 12px; padding: 10px 14px; background: #fff; border-radius: 14px;
        box-shadow: 0 10px 30px rgba(0,0,0,.18); border: 1px solid var(--atp-line);
    }
    .atp-fab .fab-ico { position: relative; color: var(--clr-accent); font-size: 22px; }
    .atp-fab .fab-badge { position: absolute; top: -8px; right: -10px; background: #e74c3c; color: #fff; font-size: 10px; font-weight: 700; min-width: 16px; height: 16px; border-radius: 30px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
    .atp-fab .fab-total { flex: 1; }
    .atp-fab .fab-total .l { font-size: 10px; color: var(--atp-muted); text-transform: uppercase; }
    .atp-fab .fab-total .a { font-size: 18px; font-weight: 800; color: var(--atp-ink); }
    .atp-fab button { border: none; background: var(--clr-accent); color: #fff; font-weight: 700; padding: 10px 16px; border-radius: 30px; font-size: 12.5px; text-transform: uppercase; }
}
@media (prefers-reduced-motion: reduce) { .atp *, .atp *::before, .atp *::after { transition: none !important; } }
