/* ===== Tienda pública (planes.php) — mismo estilo visual del área de clientes ===== */
:root {
    --tp-azul: #2563EB;
    --tp-azul-oscuro: #12233F;
}
* { box-sizing: border-box; }
body.tp-body { margin: 0; font-family: 'Segoe UI', Arial, sans-serif; background: #F4F6FA; color: #12151C; }
.tp-wrap { max-width: 1180px; margin: 0 auto; padding: 28px 20px 60px; }

.tp-encabezado h1 { font-size: 24px; margin: 0 0 4px; }
.tp-encabezado p { color: #8A93A6; font-size: 14px; margin: 0 0 22px; }

/* ===== Layout de dos columnas (categorías + planes) ===== */
.tienda-layout { display: flex; align-items: flex-start; gap: 22px; }
.tienda-sidebar {
    width: 230px; flex: none; background: #fff; border: 1px solid #E4E7EC;
    border-radius: 14px; padding: 16px 12px; position: sticky; top: 20px;
}
.tienda-sidebar-titulo { font-weight: 800; font-size: 13px; color: #12151C; padding: 4px 10px 10px; }
.tienda-sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.tienda-sidebar nav a {
    display: block; padding: 9px 10px; border-radius: 8px; font-size: 13.3px;
    color: #4B5468; text-decoration: none; font-weight: 600;
}
.tienda-sidebar nav a:hover { background: #F4F6FA; text-decoration: none; }
.tienda-sidebar nav a.activo { background: #EAF1FF; color: var(--tp-azul); }
.tienda-contenido { flex: 1; min-width: 0; }
.tienda-categoria-titulo { font-size: 19px; color: #12151C; margin: 4px 0 4px; }
.tienda-categoria-sub { color: #8A93A6; font-size: 13.5px; margin: 0 0 18px; }

/* ===== Tarjetas de planes ===== */
.planes-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 620px) { .planes-grid { grid-template-columns: 1fr 1fr; } }
.plan-card {
    background: #fff; border: 1px solid #E4E7EC; border-radius: 14px;
    padding: 18px 20px; display: flex; flex-direction: column;
}
.plan-card .plan-nombre { font-weight: 800; font-size: 16px; color: #12151C; line-height: 1.3; margin-bottom: 10px; }
.plan-card .plan-fila-imgprecio { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.plan-card .plan-fila-imgprecio img { width: 150px; height: 84px; object-fit: contain; flex: none; }
.plan-card .plan-precio-caja { text-align: right; }
.plan-card .plan-precio { font-weight: 800; font-size: 21px; color: #12151C; }
.plan-card .plan-precio span { font-size: 11.5px; font-weight: 500; color: #8A93A6; }
.plan-card .plan-periodo-label { font-size: 12px; color: #8A93A6; }
.plan-card .plan-descripcion { color: #5C6579; font-size: 12.8px; line-height: 1.5; margin: 4px 0 10px; }
.plan-card .plan-caracteristicas { list-style: none; padding: 0; margin: 0 0 16px; flex: 1; }
.plan-card .plan-caracteristicas li { font-size: 12.8px; color: #5C6579; padding: 6px 0; border-top: 1px solid #F1F2F5; }
.plan-card .plan-caracteristicas li:first-child { border-top: none; }
.plan-btn {
    display: flex; align-items: center; justify-content: center; gap: 7px;
    background: var(--tp-azul); color: #fff; font-weight: 700; font-size: 13.5px;
    border: none; border-radius: 9px; padding: 12px 20px; cursor: pointer;
    text-decoration: none !important; width: 100%; margin-top: auto;
}
.plan-btn:hover { background: #1D4ED8; text-decoration: none !important; }

@media (max-width: 860px) {
    .tienda-layout { flex-direction: column; }
    .tienda-sidebar { width: 100%; position: static; }
}

/* ===== Checkout: campo de cupón ===== */
.tp-cupon-caja { background: #fff; border: 1px solid #E4E7EC; border-radius: 12px; padding: 16px 18px; margin: 16px 0; }
.tp-cupon-caja summary { font-weight: 700; font-size: 13.5px; color: var(--tp-azul); cursor: pointer; list-style: none; }
.tp-cupon-caja summary::-webkit-details-marker { display: none; }
.tp-cupon-fila { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.tp-cupon-fila input[type="text"] { flex: 1; min-width: 160px; padding: 10px 12px; border: 1px solid #D0D5DD; border-radius: 8px; font-size: 13.5px; text-transform: uppercase; }
.tp-cupon-fila button { background: var(--tp-azul); color: #fff; border: none; border-radius: 8px; padding: 10px 18px; font-weight: 700; font-size: 13px; cursor: pointer; }
.tp-cupon-aplicado { background: #E7FBF4; color: #0D9268; border-radius: 8px; padding: 10px 12px; font-size: 13px; font-weight: 600; margin-top: 10px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tp-cupon-aplicado a { color: #0D9268; font-weight: 700; text-decoration: underline; }
.tp-resumen-total { background: #fff; border: 1px solid #E4E7EC; border-radius: 12px; padding: 16px 18px; margin: 16px 0; }
.tp-resumen-fila { display: flex; justify-content: space-between; font-size: 13.5px; color: #5C6579; padding: 5px 0; }
.tp-resumen-fila.total { font-weight: 800; color: #12151C; font-size: 16px; border-top: 1px solid #EEF1F6; margin-top: 6px; padding-top: 10px; }
.tp-resumen-fila.descuento { color: #0D9268; }

/* ===== Checkout público (registro.php) ===== */
.tpreg-wrap { max-width: 620px; margin: 0 auto; padding: 32px 20px 60px; }
.tpreg-header h1 { font-size: 22px; margin: 0 0 4px; }
.tpreg-header .paso { color: #8A93A6; font-size: 13px; margin-bottom: 14px; }
.tpreg-barra { height: 6px; background: #E4E7EC; border-radius: 999px; overflow: hidden; margin-bottom: 24px; }
.tpreg-barra > div { height: 100%; background: var(--tp-azul); border-radius: 999px; transition: width .3s; }
.tpreg-card { background: #fff; border: 1px solid #E4E7EC; border-radius: 14px; padding: 24px; }
.tpreg-campo { margin-bottom: 14px; }
.tpreg-campo label { display: block; font-size: 12.5px; font-weight: 700; color: #344054; margin-bottom: 5px; }
.tpreg-campo input[type="text"], .tpreg-campo input[type="email"], .tpreg-campo input[type="password"], .tpreg-campo select, .tpreg-campo input[type="file"] {
    width: 100%; padding: 11px 12px; border: 1px solid #D0D5DD; border-radius: 8px; font-size: 13.8px; box-sizing: border-box;
}
.tpreg-opcion { display: block; border: 1px solid #E4E7EC; border-radius: 9px; padding: 11px 14px; margin-bottom: 8px; font-size: 13.5px; cursor: pointer; }
.tpreg-opcion:has(input:checked) { border-color: var(--tp-azul); background: #EAF1FF; }
.tpreg-opcion input { margin-right: 8px; }
.tpreg-acciones { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; gap: 10px; }
.tpreg-btn-continuar { background: var(--tp-azul); color: #fff; border: none; border-radius: 9px; padding: 12px 24px; font-weight: 700; font-size: 14px; cursor: pointer; }
.tpreg-btn-continuar:hover { background: #1D4ED8; }
.tpreg-btn-volver { color: #5C6579; font-size: 13.5px; text-decoration: none; font-weight: 600; }
.tpreg-alerta { padding: 12px 14px; border-radius: 9px; font-size: 13px; margin-bottom: 16px; }
.tpreg-alerta.error { background: #FEE4E2; color: #B42318; }
.tpreg-alerta.info { background: #EAF1FF; color: #1D4ED8; }

/* ===== Paso 1 del checkout: producto a la izquierda, ciclo/cupón/factura a la derecha ===== */
.tp-pedido-layout { display: flex; gap: 28px; align-items: flex-start; flex-wrap: wrap; }
.tp-pedido-info { flex: 1; min-width: 240px; }
.tp-pedido-nombre { font-weight: 800; font-size: 19px; color: #12151C; margin-bottom: 8px; }
.tp-pedido-descripcion { color: #5C6579; font-size: 13.5px; line-height: 1.6; margin: 0 0 12px; }
.tp-pedido-lado { flex: 1; min-width: 260px; }
.tp-btn-actualizar { width: 100%; background: #F4F6FA; color: #344054; border: 1px solid #D0D5DD; border-radius: 8px; padding: 9px; font-weight: 700; font-size: 12.5px; cursor: pointer; margin-top: 4px; }
.tp-btn-actualizar:hover { background: #EAF1FF; }
@media (max-width: 700px) {
    .tp-pedido-layout { flex-direction: column; }
}
